Hands-on Projects — Build It End to End›Platform builds · Cheat sheet & self-check

Platform builds · wrap-up

Cheat sheet & self-check

Every command from this section on one page.

03 · Bare-metal HA lab: kube-vip, MetalLB, ingress, TLS

Control plane HA

kube-vip manifest pod --interface enp1s0 --address 192.168.122.100 --controlplane --arp --leaderElectionGenerate 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/16First 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 + L2AdvertisementMetalLB
helm upgrade --install ingress-nginx ingress-nginx --repo https://kubernetes.github.io/ingress-nginx -n ingress-nginx --create-namespaceIngress controller (gets a MetalLB IP)
cert-manager.io/cluster-issuer: lab-ca (Ingress annotation)Automatic TLS
virsh shutdown cp1 && kubectl get nodesFailover test

04 · EKS with Terraform and an ALB

Terraform & access

terraform init && terraform plan -out tfplan && terraform apply tfplanCreate VPC + EKS
aws eks update-kubeconfig --name hello-eks --region eu-west-1kubectl access
kubectl delete ingress hello -n demo (before destroy)Let the controller delete the ALB
terraform destroyRemove everything

Image & load balancer

aws ecr get-login-password | docker login --username AWS --password-stdin <acct>.dkr.ecr.<region>.amazonaws.comLog 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-controllerInstall the controller
kubectl get ingress -n demo (ADDRESS = ALB DNS name)Find the app URL