DevOps Classroom notes 24/Jan/2024

Kubernetes kubeadm setup

  • workflow

kubectl: kubernetes commandline tool

  • kubectl is the commandline to communicate with k8s cluster.
  • kubectl tool needs a configuration file (kubeconfig), general location of configuration is ~/.kube/config
  • Setup auto-completion Refer Here

Atomic unit of k8s = Pod

  • K8s creates pods and container runs in the Pod
  • Pod can have one or more containers
  • Each Pod in k8s gets a unique ipaddress
  • For multi container pods, the communication between containers in the same pod will be on localhost (127.0.0.1)
  • To run any application in k8s we have to create a Pod

K8s ways of working

  • For k8s everything is object. The objects are exposed over api. we can find out all the resources we can create in a cluster by executing a simple command
kubectl api-resources


  • kubectl hint: we can get the information of any object
kubectl get <resource-type>
kubectl get <resource-type> -o wide



* to understand what are options in a resource

kubectl explain <resource-type>
  • To view a particular object
kubectl describe <resource-type>  <resource-name> 

  • Creating objects in k8s can be done in two ways
    • imperative:
      • We construct a command line to create a object
      • Refer Here
    • declarative
      • We express what we want (desired state) in a yaml file
      • this helps in automation, reusable, consistent
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a comment

Turn on JavaScript to leave a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company
Exit mobile version
%%footer%%