mirror of
https://github.com/kelseyhightower/kubernetes-the-hard-way.git
synced 2025-08-09 04:12:41 +03:00
Update tls-bootstrap-worker-node-2.md
This commit is contained in:
@@ -124,8 +124,15 @@ EOF
|
|||||||
|
|
||||||
# Create bootstrap context on node03
|
# 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-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 set-context bootstrap --user=kubelet-bootstrap --cluster=bootstrap
|
||||||
kubectl config --kubeconfig=/tmp/bootstrap-kubeconfig use-context bootstrap
|
kubectl config --kubeconfig=/tmp/bootstrap-kubeconfig use-context bootstrap
|
||||||
|
Reference in New Issue
Block a user