@@ -21,3 +21,56 @@ Then the tarball can be loaded into the docker registry, on the control plane no
Verify the image is in fact the correct architecture:
`docker image inspect <tag_name>`
## Cluster Setup
After the images are built, the next step is likely to bring up a cluster. The `clusterSetup.sh` script does this, with some assumptions about your application. The high level steps are as follows:
- turn off swap: `swapoff -a`
- start cluster, config is for pod subnet (may take time): `kubeadm init --config kubeadm-config.yml`
- remove taint from control plane: `kubectl taint nodes --all node-role.kubernetes.io/master-`
- label node(s) if deployment calls for it (ones in this repo do via `nodeSelector: <tag>=<value>` in the deployment): `kubectl label nodes <node_name> <tag=<value>`
There are a number of non-intuitive kubernetes commands that are super helpful for specific tasks:
- drain a particular node so that it can be removed: `kubectl drain <node name> --delete-emptydir-data --force --ignore-daemonsets` then `kubectl delete node <node_name>`
- get which pods are on which nodes (a travesty this one): `kubectl get pod -o=custom-columns=NAME:.metadata.name,STATUS:.status.phase,NODE:.spec.nodeName --all-namespaces`
- another option to see pod location: `kubectl get pods --all-namespaces -o wide`