Openstack image that is kubeadm ready for user-data.
Take advantage of Glance to build images to launch kubernetes quicky!
- Get an ubuntu image
wget https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img
- Convert to raw
qemu-img convert -f qcow2 -O raw ./bionic-server-cloudimg-amd64.img.2 ./bionic-server-cloudimg-amd64.raw
- Create the image
openstack image create --disk-format raw --container-format bare --file ./bionic-server-cloudimg-amd64.raw ubuntu-18.04
cd packer/k8s-base
- Adjust the config.json's
source_image
property to the image ID generated from theubuntu-18.04
image - Adjust the config.json's other properties to match your cloud, such as the identity endpoint
- Set and auth variables within file or as env vars in accordance with the documentation
- run
packer build config.json
- Call the template at https://github.com/sfxworks/kubernetes-on-openstack/blob/master/terraform
- Fill in all values
- Launch the deployment
Your environment is ready!
Tip, you can set userdata for your master/worker nodes for quick launches, such as
kubeadm init
andkubeadm join
. Note thebootstrapTokens
in thekubeadm-config.yaml
file.
##TODO
- Dynamically configure everything via terraform
heat - kubectl plugin for quick installs/boostrap
- include/incorperate git version control of cluster such as fluxctl