Add instructions on how to setup kubectl

This commit is contained in:
Ming Zhao
2017-10-10 11:44:44 -07:00
committed by zacharysarah
parent cb9b4fb30b
commit d3a058b5be
@@ -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.