mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Update bringup: don't pass in dummy pod-cidr
We no longer pass in a "dummy" pod-cidr (10.123.45.0/29), and rely on reconcile-cidr=true instead (which is the default).
This commit is contained in:
parent
f8eb179c2d
commit
68c0b4268b
@ -91,7 +91,6 @@ EOF
|
|||||||
if [[ ! -z "${KUBELET_APISERVER:-}" ]] && [[ ! -z "${KUBELET_CERT:-}" ]] && [[ ! -z "${KUBELET_KEY:-}" ]]; then
|
if [[ ! -z "${KUBELET_APISERVER:-}" ]] && [[ ! -z "${KUBELET_CERT:-}" ]] && [[ ! -z "${KUBELET_KEY:-}" ]]; then
|
||||||
cat <<EOF >>/etc/salt/minion.d/grains.conf
|
cat <<EOF >>/etc/salt/minion.d/grains.conf
|
||||||
kubelet_api_servers: '${KUBELET_APISERVER}'
|
kubelet_api_servers: '${KUBELET_APISERVER}'
|
||||||
cbr-cidr: 10.123.45.0/29
|
|
||||||
EOF
|
EOF
|
||||||
else
|
else
|
||||||
# If the kubelet is running disconnected from a master, give it a fixed
|
# If the kubelet is running disconnected from a master, give it a fixed
|
||||||
@ -110,7 +109,6 @@ salt-node-role() {
|
|||||||
grains:
|
grains:
|
||||||
roles:
|
roles:
|
||||||
- kubernetes-pool
|
- kubernetes-pool
|
||||||
cbr-cidr: 10.123.45.0/29
|
|
||||||
cloud: aws
|
cloud: aws
|
||||||
api_servers: '${API_SERVERS}'
|
api_servers: '${API_SERVERS}'
|
||||||
EOF
|
EOF
|
||||||
|
@ -954,7 +954,6 @@ EOF
|
|||||||
if [[ ! -z "${KUBELET_APISERVER:-}" ]] && [[ ! -z "${KUBELET_CERT:-}" ]] && [[ ! -z "${KUBELET_KEY:-}" ]]; then
|
if [[ ! -z "${KUBELET_APISERVER:-}" ]] && [[ ! -z "${KUBELET_CERT:-}" ]] && [[ ! -z "${KUBELET_KEY:-}" ]]; then
|
||||||
cat <<EOF >>/etc/salt/minion.d/grains.conf
|
cat <<EOF >>/etc/salt/minion.d/grains.conf
|
||||||
kubelet_api_servers: '${KUBELET_APISERVER}'
|
kubelet_api_servers: '${KUBELET_APISERVER}'
|
||||||
cbr-cidr: 10.123.45.0/29
|
|
||||||
EOF
|
EOF
|
||||||
else
|
else
|
||||||
# If the kubelet is running disconnected from a master, give it a fixed
|
# If the kubelet is running disconnected from a master, give it a fixed
|
||||||
@ -973,7 +972,6 @@ function salt-node-role() {
|
|||||||
grains:
|
grains:
|
||||||
roles:
|
roles:
|
||||||
- kubernetes-pool
|
- kubernetes-pool
|
||||||
cbr-cidr: 10.123.45.0/29
|
|
||||||
cloud: gce
|
cloud: gce
|
||||||
api_servers: '${KUBERNETES_MASTER_NAME}'
|
api_servers: '${KUBERNETES_MASTER_NAME}'
|
||||||
EOF
|
EOF
|
||||||
|
@ -484,11 +484,8 @@ function start-kubelet {
|
|||||||
if [[ ! -z "${KUBELET_APISERVER:-}" && ! -z "${KUBELET_CERT:-}" && ! -z "${KUBELET_KEY:-}" ]]; then
|
if [[ ! -z "${KUBELET_APISERVER:-}" && ! -z "${KUBELET_CERT:-}" && ! -z "${KUBELET_KEY:-}" ]]; then
|
||||||
flags+=" --api-servers=https://${KUBELET_APISERVER}"
|
flags+=" --api-servers=https://${KUBELET_APISERVER}"
|
||||||
flags+=" --register-schedulable=false"
|
flags+=" --register-schedulable=false"
|
||||||
# need at least a /29 pod cidr for now due to #32844
|
|
||||||
# TODO: determine if we still allow non-hostnetwork pods to run on master, clean up master pod setup
|
|
||||||
# WARNING: potential ip range collision with 10.123.45.0/29
|
|
||||||
flags+=" --pod-cidr=10.123.45.0/29"
|
|
||||||
else
|
else
|
||||||
|
# Standalone mode (not widely used?)
|
||||||
flags+=" --pod-cidr=${MASTER_IP_RANGE}"
|
flags+=" --pod-cidr=${MASTER_IP_RANGE}"
|
||||||
fi
|
fi
|
||||||
else # For nodes
|
else # For nodes
|
||||||
|
@ -155,7 +155,7 @@ assemble_kubelet_flags() {
|
|||||||
if [ ! -z "${KUBELET_APISERVER:-}" ] && \
|
if [ ! -z "${KUBELET_APISERVER:-}" ] && \
|
||||||
[ ! -z "${KUBELET_CERT:-}" ] && \
|
[ ! -z "${KUBELET_CERT:-}" ] && \
|
||||||
[ ! -z "${KUBELET_KEY:-}" ]; then
|
[ ! -z "${KUBELET_KEY:-}" ]; then
|
||||||
KUBELET_CMD_FLAGS="${KUBELET_CMD_FLAGS} --api-servers=https://${KUBELET_APISERVER} --register-schedulable=false --pod-cidr=10.123.45.0/29"
|
KUBELET_CMD_FLAGS="${KUBELET_CMD_FLAGS} --api-servers=https://${KUBELET_APISERVER} --register-schedulable=false"
|
||||||
else
|
else
|
||||||
KUBELET_CMD_FLAGS="${KUBELET_CMD_FLAGS} --pod-cidr=${MASTER_IP_RANGE}"
|
KUBELET_CMD_FLAGS="${KUBELET_CMD_FLAGS} --pod-cidr=${MASTER_IP_RANGE}"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user