# Kubernetes



# Deploy a Cluster with kubeadm

> **Note**: These instructions are based on the Computer Science Club of the University of Waterloo's OpenStack instance.

## Build image

The first step is to build an image using packer. This image will contain all of the tools required to run a Kubernetes node.

> *TODO: Push packer build to a [git repository](https://git.zacharyseguin.ca).*

```bash
# 0. Locate ourserlves
cd $PACKER_DIR/kubernetes

# 1. Load openstack-rc
source ../openstack-rc

# 2. Update image

# 2.1. Update the image name (Kubernetes version and build date)
vim packer.json

# 2.2. Ansible deployment (update kubectl, kubelet and kubeadm version)
vim ansible/provision.yaml

# 3. Run build
#   note: token generated with `openstack token issue`
export OS_TOKEN="TOKEN_FROM_OPENSTACK"
packer build packer.json
```

## Deploy infrastructure

> *TODO: Document deploying infrastructure using Terraform*

## Initialize control plane

> *TODO: Document initializing infrastructure*