DevOps Classroom notes 24/Jan/2024

Kubernetes kubeadm setup

  • workflow
    Preview

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)
    Preview
  • 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

Preview
Preview

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

Preview
Preview
* to understand what are options in a resource

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

Preview

  • 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 Reply

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

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube