Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
fc04b550
Commit
fc04b550
authored
Nov 23, 2015
by
Brad Erickson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minion->Node rename: NODE_NAMES, NODE_NAME, NODE_PORT
parent
6fe68a73
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
63 additions
and
63 deletions
+63
-63
util.sh
cluster/aws/util.sh
+7
-7
apiserver.sh
cluster/centos/master/scripts/apiserver.sh
+2
-2
kubelet.sh
cluster/centos/node/scripts/kubelet.sh
+2
-2
upgrade.sh
cluster/gce/upgrade.sh
+3
-3
util.sh
cluster/gce/util.sh
+10
-10
util.sh
cluster/gke/util.sh
+5
-5
kube-util.sh
cluster/kube-util.sh
+1
-1
config-default.sh
cluster/mesos/docker/config-default.sh
+1
-1
config-default.sh
cluster/vagrant/config-default.sh
+1
-1
provision-master.sh
cluster/vagrant/provision-master.sh
+2
-2
provision-minion.sh
cluster/vagrant/provision-minion.sh
+4
-4
util.sh
cluster/vagrant/util.sh
+5
-5
config-default.sh
cluster/vsphere/config-default.sh
+1
-1
config-test.sh
cluster/vsphere/config-test.sh
+1
-1
util.sh
cluster/vsphere/util.sh
+15
-15
networking.md
docs/design/networking.md
+2
-2
kube-dump.sh
hack/kube-dump.sh
+1
-1
No files found.
cluster/aws/util.sh
View file @
fc04b550
...
...
@@ -187,28 +187,28 @@ function query-running-minions () {
function
find-running-minions
()
{
NODE_IDS
=()
MINION
_NAMES
=()
NODE
_NAMES
=()
for
id
in
$(
query-running-minions
"Reservations[].Instances[].InstanceId"
)
;
do
NODE_IDS+
=(
"
${
id
}
"
)
# We use the minion ids as the name
MINION
_NAMES+
=(
"
${
id
}
"
)
NODE
_NAMES+
=(
"
${
id
}
"
)
done
}
function
detect-minions
()
{
find-running-minions
# This is inefficient, but we want
MINION
_NAMES / NODE_IDS to be ordered the same as KUBE_NODE_IP_ADDRESSES
# This is inefficient, but we want
NODE
_NAMES / NODE_IDS to be ordered the same as KUBE_NODE_IP_ADDRESSES
KUBE_NODE_IP_ADDRESSES
=()
for
((
i
=
0
;
i<
${#
MINION
_NAMES
[@]
}
;
i++
))
;
do
for
((
i
=
0
;
i<
${#
NODE
_NAMES
[@]
}
;
i++
))
;
do
local
minion_ip
if
[[
"
${
ENABLE_NODE_PUBLIC_IP
}
"
==
"true"
]]
;
then
minion_ip
=
$(
get_instance_public_ip
${
MINION
_NAMES
[
$i
]
})
minion_ip
=
$(
get_instance_public_ip
${
NODE
_NAMES
[
$i
]
})
else
minion_ip
=
$(
get_instance_private_ip
${
MINION
_NAMES
[
$i
]
})
minion_ip
=
$(
get_instance_private_ip
${
NODE
_NAMES
[
$i
]
})
fi
echo
"Found minion
${
i
}
:
${
MINION
_NAMES
[
$i
]
}
@
${
minion_ip
}
"
echo
"Found minion
${
i
}
:
${
NODE
_NAMES
[
$i
]
}
@
${
minion_ip
}
"
KUBE_NODE_IP_ADDRESSES+
=(
"
${
minion_ip
}
"
)
done
...
...
cluster/centos/master/scripts/apiserver.sh
View file @
fc04b550
...
...
@@ -38,7 +38,7 @@ KUBE_API_ADDRESS="--address=${MASTER_ADDRESS}"
KUBE_API_PORT="--port=8080"
# --kubelet-port=10250: Kubelet port
MINION
_PORT="--kubelet-port=10250"
NODE
_PORT="--kubelet-port=10250"
# --allow-privileged=false: If true, allow privileged containers.
KUBE_ALLOW_PRIV="--allow-privileged=false"
...
...
@@ -75,7 +75,7 @@ KUBE_APISERVER_OPTS=" \${KUBE_LOGTOSTDERR} \\
\$
{KUBE_ETCD_SERVERS}
\\
\$
{KUBE_API_ADDRESS}
\\
\$
{KUBE_API_PORT}
\\
\$
{
MINION
_PORT}
\\
\$
{
NODE
_PORT}
\\
\$
{KUBE_ALLOW_PRIV}
\\
\$
{KUBE_SERVICE_ADDRESSES}
\\
\$
{KUBE_ADMISSION_CONTROL}
\\
...
...
cluster/centos/node/scripts/kubelet.sh
View file @
fc04b550
...
...
@@ -30,7 +30,7 @@ KUBE_LOG_LEVEL="--v=4"
NODE_ADDRESS="--address=
${
NODE_ADDRESS
}
"
# --port=10250: The port for the Kubelet to serve on. Note that "kubectl logs" will not work if you set this flag.
MINION
_PORT="--port=10250"
NODE
_PORT="--port=10250"
# --hostname-override="": If non-empty, will use this string as identification instead of the actual hostname.
NODE_HOSTNAME="--hostname-override=
${
NODE_ADDRESS
}
"
...
...
@@ -49,7 +49,7 @@ EOF
KUBE_PROXY_OPTS
=
"
\$
{KUBE_LOGTOSTDERR}
\\
\$
{KUBE_LOG_LEVEL}
\\
\$
{NODE_ADDRESS}
\\
\$
{
MINION
_PORT}
\\
\$
{
NODE
_PORT}
\\
\$
{NODE_HOSTNAME}
\\
\$
{KUBELET_API_SERVER}
\\
\$
{KUBE_ALLOW_PRIV}
\\
...
...
cluster/gce/upgrade.sh
View file @
fc04b550
...
...
@@ -121,15 +121,15 @@ function prepare-upgrade() {
}
# Reads kube-env metadata from first node in
MINION
_NAMES.
# Reads kube-env metadata from first node in
NODE
_NAMES.
#
# Assumed vars:
#
MINION
_NAMES
#
NODE
_NAMES
# PROJECT
# ZONE
function
get-node-env
()
{
# TODO(zmerlynn): Make this more reliable with retries.
gcloud compute
--project
${
PROJECT
}
ssh
--zone
${
ZONE
}
${
MINION
_NAMES
[0]
}
--command
\
gcloud compute
--project
${
PROJECT
}
ssh
--zone
${
ZONE
}
${
NODE
_NAMES
[0]
}
--command
\
"curl --fail --silent -H 'Metadata-Flavor: Google'
\
'http://metadata/computeMetadata/v1/instance/attributes/kube-env'"
2>/dev/null
}
...
...
cluster/gce/util.sh
View file @
fc04b550
...
...
@@ -214,13 +214,13 @@ function upload-server-tars() {
# Assumed vars:
# NODE_INSTANCE_PREFIX
# Vars set:
#
MINION
_NAMES
#
NODE
_NAMES
function
detect-minion-names
{
detect-project
MINION
_NAMES
=(
$(
gcloud compute instance-groups managed list-instances
\
NODE
_NAMES
=(
$(
gcloud compute instance-groups managed list-instances
\
"
${
NODE_INSTANCE_PREFIX
}
-group"
--zone
"
${
ZONE
}
"
--project
"
${
PROJECT
}
"
\
--format
=
yaml |
grep
instance: |
cut
-d
' '
-f
2
)
)
echo
"
MINION_NAMES=
${
MINION
_NAMES
[*]
}
"
>
&2
echo
"
NODE_NAMES=
${
NODE
_NAMES
[*]
}
"
>
&2
}
# Detect the information about the minions
...
...
@@ -228,20 +228,20 @@ function detect-minion-names {
# Assumed vars:
# ZONE
# Vars set:
#
MINION
_NAMES
#
NODE
_NAMES
# KUBE_NODE_IP_ADDRESSES (array)
function
detect-minions
()
{
detect-project
detect-minion-names
KUBE_NODE_IP_ADDRESSES
=()
for
((
i
=
0
;
i<
${#
MINION
_NAMES
[@]
}
;
i++
))
;
do
for
((
i
=
0
;
i<
${#
NODE
_NAMES
[@]
}
;
i++
))
;
do
local
minion_ip
=
$(
gcloud compute instances describe
--project
"
${
PROJECT
}
"
--zone
"
${
ZONE
}
"
\
"
${
MINION
_NAMES
[
$i
]
}
"
--fields
networkInterfaces[0].accessConfigs[0].natIP
\
"
${
NODE
_NAMES
[
$i
]
}
"
--fields
networkInterfaces[0].accessConfigs[0].natIP
\
--format
=
text |
awk
'{ print $2 }'
)
if
[[
-z
"
${
minion_ip
-
}
"
]]
;
then
echo
"Did not find
${
MINION
_NAMES
[
$i
]
}
"
>
&2
echo
"Did not find
${
NODE
_NAMES
[
$i
]
}
"
>
&2
else
echo
"Found
${
MINION
_NAMES
[
$i
]
}
at
${
minion_ip
}
"
echo
"Found
${
NODE
_NAMES
[
$i
]
}
at
${
minion_ip
}
"
KUBE_NODE_IP_ADDRESSES+
=(
"
${
minion_ip
}
"
)
fi
done
...
...
@@ -1105,8 +1105,8 @@ function kube-push {
push-master
for
((
i
=
0
;
i<
${#
MINION
_NAMES
[@]
}
;
i++
))
;
do
push-node
"
${
MINION
_NAMES
[
$i
]
}
"
&
for
((
i
=
0
;
i<
${#
NODE
_NAMES
[@]
}
;
i++
))
;
do
push-node
"
${
NODE
_NAMES
[
$i
]
}
"
&
done
wait-for-jobs
...
...
cluster/gke/util.sh
View file @
fc04b550
...
...
@@ -171,7 +171,7 @@ function test-setup() {
detect-minions
>
&2
# At this point, CLUSTER_NAME should have been used, so its value is final.
MINION_TAG
=
$(
$GCLOUD
compute instances describe
${
MINION
_NAMES
[0]
}
--project
=
"
${
PROJECT
}
"
--zone
=
"
${
ZONE
}
"
|
grep
-o
"gke-
${
CLUSTER_NAME
}
-.
\{
8
\}
-node"
|
head
-1
)
MINION_TAG
=
$(
$GCLOUD
compute instances describe
${
NODE
_NAMES
[0]
}
--project
=
"
${
PROJECT
}
"
--zone
=
"
${
ZONE
}
"
|
grep
-o
"gke-
${
CLUSTER_NAME
}
-.
\{
8
\}
-node"
|
head
-1
)
OLD_MINION_TAG
=
"k8s-
${
CLUSTER_NAME
}
-node"
# Open up port 80 & 8080 so common containers on minions can be reached.
...
...
@@ -209,7 +209,7 @@ function detect-master() {
# Assumed vars:
# none
# Vars set:
#
MINION
_NAMES
#
NODE
_NAMES
function
detect-minions
()
{
echo
"... in gke:detect-minions()"
>
&2
detect-minion-names
...
...
@@ -220,16 +220,16 @@ function detect-minions() {
# Assumed vars:
# none
# Vars set:
#
MINION
_NAMES
#
NODE
_NAMES
function
detect-minion-names
{
echo
"... in gke:detect-minion-names()"
>
&2
detect-project
detect-node-instance-group
MINION
_NAMES
=(
$(
gcloud compute instance-groups managed list-instances
\
NODE
_NAMES
=(
$(
gcloud compute instance-groups managed list-instances
\
"
${
NODE_INSTANCE_GROUP
}
"
--zone
"
${
ZONE
}
"
--project
"
${
PROJECT
}
"
\
--format
=
yaml |
grep
instance: |
cut
-d
' '
-f
2
)
)
echo
"
MINION_NAMES=
${
MINION
_NAMES
[*]
}
"
echo
"
NODE_NAMES=
${
NODE
_NAMES
[*]
}
"
}
# Detect instance group name generated by gke
...
...
cluster/kube-util.sh
View file @
fc04b550
...
...
@@ -26,7 +26,7 @@ function detect-master {
# Get minion names if they are not static.
function
detect-minion-names
{
echo
"
MINION_NAMES: [
${
MINION
_NAMES
[*]
}
]"
1>&2
echo
"
NODE_NAMES: [
${
NODE
_NAMES
[*]
}
]"
1>&2
}
# Get minion IP addresses and store in KUBE_NODE_IP_ADDRESSES[]
...
...
cluster/mesos/docker/config-default.sh
View file @
fc04b550
...
...
@@ -19,7 +19,7 @@
NUM_MINIONS
=
${
NUM_MINIONS
:-
2
}
INSTANCE_PREFIX
=
"
${
INSTANCE_PREFIX
:-
kubernetes
}
"
MASTER_NAME
=
"
${
INSTANCE_PREFIX
}
-master"
MINION
_NAMES
=(
$(
eval echo
${
INSTANCE_PREFIX
}
-minion-
{
1..
${
NUM_MINIONS
}
}
)
)
NODE
_NAMES
=(
$(
eval echo
${
INSTANCE_PREFIX
}
-minion-
{
1..
${
NUM_MINIONS
}
}
)
)
SERVICE_CLUSTER_IP_RANGE
=
10.10.10.0/24
...
...
cluster/vagrant/config-default.sh
View file @
fc04b550
...
...
@@ -39,7 +39,7 @@ MASTER_CONTAINER_SUBNET="${NODE_CONTAINER_SUBNET_BASE}.0.1/24"
CONTAINER_SUBNET
=
"
${
NODE_CONTAINER_SUBNET_BASE
}
.0.0/16"
for
((
i
=
0
;
i < NUM_MINIONS
;
i++
))
do
NODE_IPS[
$i
]=
"
${
NODE_IP_BASE
}$((
i+3
))
"
MINION
_NAMES[
$i
]=
"
${
INSTANCE_PREFIX
}
-minion-
$((
i+1
))
"
NODE
_NAMES[
$i
]=
"
${
INSTANCE_PREFIX
}
-minion-
$((
i+1
))
"
NODE_CONTAINER_SUBNETS[
$i
]=
"
${
NODE_CONTAINER_SUBNET_BASE
}
.
$((
i+1
))
.1/24"
NODE_CONTAINER_ADDRS[
$i
]=
"
${
NODE_CONTAINER_SUBNET_BASE
}
.
$((
i+1
))
.1"
NODE_CONTAINER_NETMASKS[
$i
]=
"255.255.255.0"
...
...
cluster/vagrant/provision-master.sh
View file @
fc04b550
...
...
@@ -68,8 +68,8 @@ fi
# Setup hosts file to support ping by hostname to each minion in the cluster from apiserver
for
((
i
=
0
;
i<
${#
MINION
_NAMES
[@]
}
;
i++
))
;
do
minion
=
${
MINION
_NAMES
[
$i
]
}
for
((
i
=
0
;
i<
${#
NODE
_NAMES
[@]
}
;
i++
))
;
do
minion
=
${
NODE
_NAMES
[
$i
]
}
ip
=
${
NODE_IPS
[
$i
]
}
if
[
!
"
$(
cat
/etc/hosts |
grep
$minion
)
"
]
;
then
echo
"Adding
$minion
to hosts file"
...
...
cluster/vagrant/provision-minion.sh
View file @
fc04b550
...
...
@@ -70,7 +70,7 @@ EOF
# Set the host name explicitly
# See: https://github.com/mitchellh/vagrant/issues/2430
hostnamectl set-hostname
${
MINION
_NAME
}
hostnamectl set-hostname
${
NODE
_NAME
}
if
[[
"
$(
grep
'VERSION_ID'
/etc/os-release
)
"
=
~ ^VERSION_ID
=
21
]]
;
then
# Workaround to vagrant inability to guess interface naming sequence
...
...
@@ -94,11 +94,11 @@ if [ ! "$(cat /etc/hosts | grep $MASTER_NAME)" ]; then
echo
"Adding
$MASTER_NAME
to hosts file"
echo
"
$MASTER_IP
$MASTER_NAME
"
>>
/etc/hosts
fi
echo
"
$NODE_IP
$
MINION
_NAME
"
>>
/etc/hosts
echo
"
$NODE_IP
$
NODE
_NAME
"
>>
/etc/hosts
# Setup hosts file to support ping by hostname to each minion in the cluster
for
((
i
=
0
;
i<
${#
MINION
_NAMES
[@]
}
;
i++
))
;
do
minion
=
${
MINION
_NAMES
[
$i
]
}
for
((
i
=
0
;
i<
${#
NODE
_NAMES
[@]
}
;
i++
))
;
do
minion
=
${
NODE
_NAMES
[
$i
]
}
ip
=
${
NODE_IPS
[
$i
]
}
if
[
!
"
$(
cat
/etc/hosts |
grep
$minion
)
"
]
;
then
echo
"Adding
$minion
to hosts file"
...
...
cluster/vagrant/util.sh
View file @
fc04b550
...
...
@@ -124,7 +124,7 @@ function create-provision-scripts {
echo
"INSTANCE_PREFIX='
${
INSTANCE_PREFIX
}
'"
echo
"MASTER_NAME='
${
INSTANCE_PREFIX
}
-master'"
echo
"MASTER_IP='
${
MASTER_IP
}
'"
echo
"
MINION_NAMES=(
${
MINION
_NAMES
[@]
}
)"
echo
"
NODE_NAMES=(
${
NODE
_NAMES
[@]
}
)"
echo
"NODE_IPS=(
${
NODE_IPS
[@]
}
)"
echo
"NODE_IP='
${
MASTER_IP
}
'"
echo
"CONTAINER_SUBNET='
${
CONTAINER_SUBNET
}
'"
...
...
@@ -163,13 +163,13 @@ function create-provision-scripts {
awk
'!/^#/'
"
${
KUBE_ROOT
}
/cluster/vagrant/provision-master.sh"
)
>
"
${
KUBE_TEMP
}
/master-start.sh"
for
((
i
=
0
;
i<
${#
MINION
_NAMES
[@]
}
;
i++
))
;
do
for
((
i
=
0
;
i<
${#
NODE
_NAMES
[@]
}
;
i++
))
;
do
(
echo
"#! /bin/bash"
echo
"MASTER_NAME='
${
MASTER_NAME
}
'"
echo
"MASTER_IP='
${
MASTER_IP
}
'"
echo
"
MINION_NAMES=(
${
MINION
_NAMES
[@]
}
)"
echo
"
MINION_NAME=(
${
MINION
_NAMES
[
$i
]
}
)"
echo
"
NODE_NAMES=(
${
NODE
_NAMES
[@]
}
)"
echo
"
NODE_NAME=(
${
NODE
_NAMES
[
$i
]
}
)"
echo
"NODE_IPS=(
${
NODE_IPS
[@]
}
)"
echo
"NODE_IP='
${
NODE_IPS
[
$i
]
}
'"
echo
"NODE_ID='
$i
'"
...
...
@@ -222,7 +222,7 @@ function verify-cluster {
# verify each minion has all required daemons
local
i
for
((
i
=
0
;
i<
${#
MINION
_NAMES
[@]
}
;
i++
))
;
do
for
((
i
=
0
;
i<
${#
NODE
_NAMES
[@]
}
;
i++
))
;
do
echo
"Validating
${
VAGRANT_NODE_NAMES
[
$i
]
}
"
local
machine
=
${
VAGRANT_NODE_NAMES
[
$i
]
}
local
-a
required_daemon
=(
"salt-minion"
"kubelet"
"docker"
)
...
...
cluster/vsphere/config-default.sh
View file @
fc04b550
...
...
@@ -26,7 +26,7 @@ MASTER_NAME="${INSTANCE_PREFIX}-master"
MASTER_MEMORY_MB
=
1024
MASTER_CPU
=
1
MINION
_NAMES
=(
$(
eval echo
${
INSTANCE_PREFIX
}
-minion-
{
1..
${
NUM_MINIONS
}
}
)
)
NODE
_NAMES
=(
$(
eval echo
${
INSTANCE_PREFIX
}
-minion-
{
1..
${
NUM_MINIONS
}
}
)
)
NODE_IP_RANGES
=(
$(
eval echo
"10.244.{1..
${
NUM_MINIONS
}
}.0/24"
)
)
NODE_MEMORY_MB
=
2048
NODE_CPU
=
1
...
...
cluster/vsphere/config-test.sh
View file @
fc04b550
...
...
@@ -26,7 +26,7 @@ MASTER_NAME="${INSTANCE_PREFIX}-master"
MASTER_MEMORY_MB
=
1024
MASTER_CPU
=
1
MINION
_NAMES
=(
$(
eval echo
${
INSTANCE_PREFIX
}
-minion-
{
1..
${
NUM_MINIONS
}
}
)
)
NODE
_NAMES
=(
$(
eval echo
${
INSTANCE_PREFIX
}
-minion-
{
1..
${
NUM_MINIONS
}
}
)
)
NODE_IP_RANGES
=(
$(
eval echo
"10.244.{1..
${
NUM_MINIONS
}
}.0/24"
)
)
NODE_MEMORY_MB
=
1024
NODE_CPU
=
1
...
...
cluster/vsphere/util.sh
View file @
fc04b550
...
...
@@ -45,17 +45,17 @@ function detect-master {
# Detect the information about the minions
#
# Assumed vars:
#
MINION
_NAMES
#
NODE
_NAMES
# Vars set:
# KUBE_NODE_IP_ADDRESS (array)
function
detect-minions
{
KUBE_NODE_IP_ADDRESSES
=()
for
((
i
=
0
;
i<
${#
MINION
_NAMES
[@]
}
;
i++
))
;
do
local
minion_ip
=
$(
govc vm.ip
${
MINION
_NAMES
[
$i
]
})
for
((
i
=
0
;
i<
${#
NODE
_NAMES
[@]
}
;
i++
))
;
do
local
minion_ip
=
$(
govc vm.ip
${
NODE
_NAMES
[
$i
]
})
if
[[
-z
"
${
minion_ip
-
}
"
]]
;
then
echo
"Did not find
${
MINION
_NAMES
[
$i
]
}
"
>
&2
echo
"Did not find
${
NODE
_NAMES
[
$i
]
}
"
>
&2
else
echo
"Found
${
MINION
_NAMES
[
$i
]
}
at
${
minion_ip
}
"
echo
"Found
${
NODE
_NAMES
[
$i
]
}
at
${
minion_ip
}
"
KUBE_NODE_IP_ADDRESSES+
=(
"
${
minion_ip
}
"
)
fi
done
...
...
@@ -266,10 +266,10 @@ function kube-up {
echo
"Starting minion VMs (this can take a minute)..."
for
((
i
=
0
;
i<
${#
MINION
_NAMES
[@]
}
;
i++
))
;
do
for
((
i
=
0
;
i<
${#
NODE
_NAMES
[@]
}
;
i++
))
;
do
(
echo
"#! /bin/bash"
echo
"readonly MY_NAME=
${
MINION
_NAMES
[
$i
]
}
"
echo
"readonly MY_NAME=
${
NODE
_NAMES
[
$i
]
}
"
grep
-v
"^#"
"
${
KUBE_ROOT
}
/cluster/vsphere/templates/hostname.sh"
echo
"KUBE_MASTER=
${
KUBE_MASTER
}
"
echo
"KUBE_MASTER_IP=
${
KUBE_MASTER_IP
}
"
...
...
@@ -278,8 +278,8 @@ function kube-up {
)
>
"
${
KUBE_TEMP
}
/minion-start-
${
i
}
.sh"
(
kube-up-vm
"
${
MINION
_NAMES
[
$i
]
}
"
-c
${
NODE_CPU
-1
}
-m
${
NODE_MEMORY_MB
-1024
}
kube-run
"
${
MINION
_NAMES
[
$i
]
}
"
"
${
KUBE_TEMP
}
/minion-start-
${
i
}
.sh"
kube-up-vm
"
${
NODE
_NAMES
[
$i
]
}
"
-c
${
NODE_CPU
-1
}
-m
${
NODE_MEMORY_MB
-1024
}
kube-run
"
${
NODE
_NAMES
[
$i
]
}
"
"
${
KUBE_TEMP
}
/minion-start-
${
i
}
.sh"
)
&
done
...
...
@@ -312,8 +312,8 @@ function kube-up {
printf
" OK
\n
"
local
i
for
((
i
=
0
;
i<
${#
MINION
_NAMES
[@]
}
;
i++
))
;
do
printf
"Waiting for
${
MINION
_NAMES
[
$i
]
}
to become available..."
for
((
i
=
0
;
i<
${#
NODE
_NAMES
[@]
}
;
i++
))
;
do
printf
"Waiting for
${
NODE
_NAMES
[
$i
]
}
to become available..."
until
curl
--max-time
5
\
--fail
--output
/dev/null
--silent
"http://
${
KUBE_NODE_IP_ADDRESSES
[
$i
]
}
:10250/healthz"
;
do
printf
"."
...
...
@@ -347,10 +347,10 @@ function kube-up {
# Basic sanity checking
local
i
for
((
i
=
0
;
i<
${#
MINION
_NAMES
[@]
}
;
i++
))
;
do
for
((
i
=
0
;
i<
${#
NODE
_NAMES
[@]
}
;
i++
))
;
do
# Make sure docker is installed
kube-ssh
"
${
KUBE_NODE_IP_ADDRESSES
[
$i
]
}
"
which docker
>
/dev/null
||
{
echo
"Docker failed to install on
${
MINION
_NAMES
[
$i
]
}
. Your cluster is unlikely"
>
&2
echo
"Docker failed to install on
${
NODE
_NAMES
[
$i
]
}
. Your cluster is unlikely"
>
&2
echo
"to work correctly. Please run ./cluster/kube-down.sh and re-create the"
>
&2
echo
"cluster. (sorry!)"
>
&2
exit
1
...
...
@@ -372,8 +372,8 @@ function kube-up {
function
kube-down
{
govc vm.destroy
${
MASTER_NAME
}
&
for
((
i
=
0
;
i<
${#
MINION
_NAMES
[@]
}
;
i++
))
;
do
govc vm.destroy
${
MINION
_NAMES
[i]
}
&
for
((
i
=
0
;
i<
${#
NODE
_NAMES
[@]
}
;
i++
))
;
do
govc vm.destroy
${
NODE
_NAMES
[i]
}
&
done
wait
...
...
docs/design/networking.md
View file @
fc04b550
...
...
@@ -132,11 +132,11 @@ differentiate it from `docker0`) is set up outside of Docker proper.
Example of GCE's advanced routing rules:
```
sh
gcloud compute routes add
"
${
MINION
_NAMES
[
$i
]
}
"
\
gcloud compute routes add
"
${
NODE
_NAMES
[
$i
]
}
"
\
--project
"
${
PROJECT
}
"
\
--destination-range
"
${
NODE_IP_RANGES
[
$i
]
}
"
\
--network
"
${
NETWORK
}
"
\
--next-hop-instance
"
${
MINION
_NAMES
[
$i
]
}
"
\
--next-hop-instance
"
${
NODE
_NAMES
[
$i
]
}
"
\
--next-hop-instance-zone
"
${
ZONE
}
"
&
```
...
...
hack/kube-dump.sh
View file @
fc04b550
...
...
@@ -32,7 +32,7 @@ source "${KUBE_ROOT}/cluster/${KUBERNETES_PROVIDER}/util.sh"
detect-project &> /dev/null
echo
"kube-dump.sh: Getting docker statuses on all nodes..."
ALL_NODES
=(
${
MINION
_NAMES
[*]
}
${
MASTER_NAME
}
)
ALL_NODES
=(
${
NODE
_NAMES
[*]
}
${
MASTER_NAME
}
)
for
NODE
in
${
ALL_NODES
[*]
}
;
do
echo
"kube-dump.sh: Node
$NODE
:"
ssh-to-node
"
${
NODE
}
"
'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment