Platform builds · wrap-up
Cheat sheet & self-check
Every command from this section on one page.
Control plane HA
kube-vip manifest pod --interface enp1s0 --address 192.168.122.100 --controlplane --arp --leaderElection | Generate the kube-vip static pod (see kube-vip docs) |
sudo kubeadm init --control-plane-endpoint 192.168.122.100:6443 --upload-certs --pod-network-cidr 10.244.0.0/16 | First control plane |
sudo kubeadm join 192.168.122.100:6443 … --control-plane --certificate-key <key> | cp2, cp3 |
Services & HTTPS
IPAddressPool 192.168.122.200-192.168.122.220 + L2Advertisement | MetalLB |
helm upgrade --install ingress-nginx ingress-nginx --repo https://kubernetes.github.io/ingress-nginx -n ingress-nginx --create-namespace | Ingress controller (gets a MetalLB IP) |
cert-manager.io/cluster-issuer: lab-ca (Ingress annotation) | Automatic TLS |
virsh shutdown cp1 && kubectl get nodes | Failover test |
Terraform & access
terraform init && terraform plan -out tfplan && terraform apply tfplan | Create VPC + EKS |
aws eks update-kubeconfig --name hello-eks --region eu-west-1 | kubectl access |
kubectl delete ingress hello -n demo (before destroy) | Let the controller delete the ALB |
terraform destroy | Remove everything |
Image & load balancer
aws ecr get-login-password | docker login --username AWS --password-stdin <acct>.dkr.ecr.<region>.amazonaws.com | Log in to ECR |
helm install aws-load-balancer-controller eks/aws-load-balancer-controller -n kube-system --set clusterName=hello-eks --set serviceAccount.create=false --set serviceAccount.name=aws-load-balancer-controller | Install the controller |
kubectl get ingress -n demo (ADDRESS = ALB DNS name) | Find the app URL |