Certified Kubernetes Security Specialist (CKS) Preparation Part 2 — Create and Reset K8s Clusters

If you have not yet checked the first part of this series, please go ahead and check Part1.

Create K8s Clusters

Before we even start the learning journey of CKS, we would need to have an environment to test and break. For that, kubeadm is a good tool of rapidly bootstrapping everything together for new K8s clusters.

  • Each machine with the spec of at least 2 GiB of RAM and 2 CPUs
  • Machines should be able to communicate with each other without issues through either private network or public network

Reset K8s Clusters

Along the way of CKS learning, you would definitely require resetting K8s clusters for testing functions and features, here are some of the commands I use for that purpose.

  • sudo rm -rf /etc/kubernetes
  • sudo iptables -F && iptables -t nat -F && iptables -t mangle -F && iptables -X
  • sudo apt-get update
  • sudo kubeadm init

Learning new things about Kubernetes every day. Hopefully, the learning notes could help people on the same journey!