Update tls-bootstrap-worker-node-2.md
parent
0e0c7f22aa
commit
44a4016264
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue