Kubernetes 101

Important/Useful Commands :

  1. Get logs of a particular pod - kubectl logs -n <namespace>/<pod-name>

  2. Get cluster info - kubectl cluster-info dump

  3. Get kubelet version - kubelet --version

  4. Initialize a Kubernetes control plane node - kubeadm init --v=5

  5. Add --pod-network-cidr flag to the above cmd to specify the range of IP addresses to be used for pods. This is required for network plugins like Calico and Flannel.

  6. Add --ignore-preflight-errors=all to the 4th point cmd to ignore all errors during preflight checks.

  7. Get all nodes - kubectl get nodes

  8. Create namespace - kubectl create -n <namespace>

Last updated