mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 22:17:14 +00:00
Fix vagrant kube-up
This commit is contained in:
parent
9036f2cf82
commit
df0ca1c54c
@ -27,6 +27,9 @@ export KUBE_MASTER_IP=${MASTER_IP}
|
|||||||
export INSTANCE_PREFIX="kubernetes"
|
export INSTANCE_PREFIX="kubernetes"
|
||||||
export MASTER_NAME="${INSTANCE_PREFIX}-master"
|
export MASTER_NAME="${INSTANCE_PREFIX}-master"
|
||||||
|
|
||||||
|
# Should the master serve as a node
|
||||||
|
REGISTER_MASTER_KUBELET=${REGISTER_MASTER:-false}
|
||||||
|
|
||||||
# Map out the IPs, names and container subnets of each minion
|
# Map out the IPs, names and container subnets of each minion
|
||||||
export MINION_IP_BASE=${MINION_IP_BASE-"10.245.1."}
|
export MINION_IP_BASE=${MINION_IP_BASE-"10.245.1."}
|
||||||
MINION_CONTAINER_SUBNET_BASE="10.246"
|
MINION_CONTAINER_SUBNET_BASE="10.246"
|
||||||
|
@ -20,3 +20,6 @@ NUM_MINIONS=2
|
|||||||
|
|
||||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
|
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
|
||||||
source "${KUBE_ROOT}/cluster/vagrant/config-default.sh"
|
source "${KUBE_ROOT}/cluster/vagrant/config-default.sh"
|
||||||
|
|
||||||
|
# Do not register the master kubelet during testing
|
||||||
|
REGISTER_MASTER_KUBELET=${REGISTER_MASTER:-false}
|
||||||
|
@ -172,20 +172,20 @@ if [[ ! -f "${known_tokens_file}" ]]; then
|
|||||||
cat > "${kubelet_kubeconfig_file}" << EOF
|
cat > "${kubelet_kubeconfig_file}" << EOF
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Config
|
kind: Config
|
||||||
users:
|
|
||||||
- name: kubelet
|
|
||||||
user:
|
|
||||||
token: ${KUBELET_TOKEN}
|
|
||||||
clusters:
|
clusters:
|
||||||
- name: local
|
- cluster:
|
||||||
cluster:
|
|
||||||
insecure-skip-tls-verify: true
|
insecure-skip-tls-verify: true
|
||||||
|
name: local
|
||||||
contexts:
|
contexts:
|
||||||
- context:
|
- context:
|
||||||
cluster: local
|
cluster: local
|
||||||
user: kubelet
|
user: kubelet
|
||||||
name: service-account-context
|
name: service-account-context
|
||||||
current-context: service-account-context
|
current-context: service-account-context
|
||||||
|
users:
|
||||||
|
- name: kubelet
|
||||||
|
user:
|
||||||
|
token: ${KUBELET_TOKEN}
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -199,20 +199,20 @@ EOF
|
|||||||
cat > "${kube_proxy_kubeconfig_file}" << EOF
|
cat > "${kube_proxy_kubeconfig_file}" << EOF
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Config
|
kind: Config
|
||||||
users:
|
|
||||||
- name: kube-proxy
|
|
||||||
user:
|
|
||||||
token: ${KUBE_PROXY_TOKEN}
|
|
||||||
clusters:
|
clusters:
|
||||||
- name: local
|
- cluster:
|
||||||
cluster:
|
insecure-skip-tls-verify: true
|
||||||
insecure-skip-tls-verify: true
|
name: local
|
||||||
contexts:
|
contexts:
|
||||||
- context:
|
- context:
|
||||||
cluster: local
|
cluster: local
|
||||||
user: kube-proxy
|
user: kube-proxy
|
||||||
name: service-account-context
|
name: service-account-context
|
||||||
current-context: service-account-context
|
current-context: service-account-context
|
||||||
|
users:
|
||||||
|
- name: kube-proxy
|
||||||
|
user:
|
||||||
|
token: ${KUBE_PROXY_TOKEN}
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user