The ansible scripts used here are using kubeadm method of installing an onpremise kubernetes cluster. It also installed an onpremise harbor for the container registry to be used by the onpremise kubernetes
- enable sshkeys on all target machines and ensure no password prompt needed for ssh connections
- update inventory.ini and var.yml accordingly
Note: This script has only been validated on a fresh installed Ubuntu 22.04 machines.
Run below commands:
sudo apt install ansible -y
ansible-playbook -i inventory.ini onpremise-kubernetes.yml
To push your local docker images into the harbor container registry, run below:
docker tag <image>:<tag> <k8_master_ip>:8443/k8s/<image>:<tag>
docker push <k8_master_ip>:8443/k8s/<image>:<tag>