Add instructions on how to setup kubectl

reviewable/pr4046/r2
Ming Zhao 2017-10-10 11:44:44 -07:00
parent ce900b8391
commit 3db6e572dc
1 changed files with 7 additions and 0 deletions

View File

@ -179,6 +179,13 @@ as root:
kubeadm join --token <token> <master-ip>:<master-port> --discovery-token-ca-cert-hash sha256:<hash>
```
To let kubectl work in the following steps, you need to run these commands as a regular user (which is part of the output above):
```
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
```
Make a record of the `kubeadm join` command that `kubeadm init` outputs. You
will need this in a moment.