In this section we will install kubernetes onto the Fedora host(s) that we are using for the Kargo Hypervisor.
a. Export Variables
export SSH_USER='kc2admin'
export SSH_PASS='kc2admin'
export HOSTS="192.168.1.51 192.168.1.52 192.168.1.53"
export VIRTUAL_IP="192.168.1.50"
export CLUSTER_DOMAIN="kubespray.home.arpa"
b. Deploy Kubespray
touch /tmp/kubeconfig;
docker run -it --rm --pull always \
--volume /tmp/kubeconfig:/config:z \
-e KUBE_API_FQDN="api.${CLUSTER_DOMAIN}" \
-e HOSTS="${HOSTS}" \
-e VRRP_IP="${VIRTUAL_IP}" \
quay.io/containercraft/konductor:kubespray -e crio_version="1.22" \
--user ${SSH_USER} -e ansible_ssh_pass=${SSH_PASS} -e ansible_sudo_pass=${SSH_PASS}
mkdir -p ~/.kube && cp /tmp/kubeconfig ~/.kube/kubespray && chmod 600 ~/.kube/kubespray
export KUBECONFIG=~/.kube/kubespray
kubectl get po -A
kubectl taint nodes --all --overwrite node-role.kubernetes.io/master-
kubectl label nodes --all --overwrite node-role.kubernetes.io/master=''
kubectl label nodes --all --overwrite node-role.kubernetes.io/control-plane=''
kubectl label nodes --all --overwrite node-role.kubernetes.io/worker=''
helm install kube-prometheus bitnami/kube-prometheus --namespace prometheus --create-namespace