Update tls-bootstrap-worker-node-2.md

pull/584/head
vpalazhi 2019-12-02 21:06:52 -05:00 committed by GitHub
parent 0e0c7f22aa
commit 44a4016264
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -124,8 +124,15 @@ EOF
# Create bootstrap context on node03
# Important: Replace the kube-apiserver IP address in the command below with the correct one.
This can be obtained by running the below command on the master node:
```
kubectl config --kubeconfig=/tmp/bootstrap-kubeconfig set-cluster bootstrap --server='https://172.17.0.65:6443' --certificate-authority=/etc/kubernetes/pki/ca.crt
kubectl cluster-info
```
Create the kubeconfig file:
```
kubectl config --kubeconfig=/tmp/bootstrap-kubeconfig set-cluster bootstrap --server='https://<replace kube-apiserver IP>:6443' --certificate-authority=/etc/kubernetes/pki/ca.crt
kubectl config --kubeconfig=/tmp/bootstrap-kubeconfig set-credentials kubelet-bootstrap --token=09426c.g262dkeidk3dx21x
kubectl config --kubeconfig=/tmp/bootstrap-kubeconfig set-context bootstrap --user=kubelet-bootstrap --cluster=bootstrap
kubectl config --kubeconfig=/tmp/bootstrap-kubeconfig use-context bootstrap