DevOps Classroom Series – 13/Nov/2020


  • This is a command-line utility which we would be using to interact with k8s cluster.
  • This utility creates api-request internally and forwards them to kube-api server
  • Refer Here for kubectl cheat sheet.

Kubernetes Objects

  • k8s objects are persistent entities in the k8s system.
  • These objects are used to represent the state of your cluster
  • Every k8s object has
    • Specification: This is also referred as object Spec
    • Status: This is also referred as object status
  • How can we describe a k8s object (Specification):
    • K8s objects can be describe in the json format using k8s rest api or in yaml format via kubectl
    • For api version Refer Here

K8s Pods

  • Pods are the atomic unit of computing that you create in k8s
  • A pod represents an application/microservice running in k8s cluster.
  • Pods will have containers in it. Preview
  • Each container within a pod runs its own cgroup, but they share number of Linux namespaces like net, mnt etc. Preview
  • In k8s to create any object we have two ways
    • imperative:
      • We can create objects by executing commands Refer Here
    • declarative:
      • We create an object specification in a yaml file.
      • Send/apply this yaml which has a specification & k8s master will do the rest to create/maintain the specification sent
      • To create this specification we will be using k8s api reference
  • Refer Here for the sample pod created Preview Preview Preview Preview
  • To be effecient with k8s workflow
    • We need to understand k8s objects
    • we need to understand expressing object spec in yaml
    • we need to be able read the status from k8s cluster
  • Expectation:
    • Configure kubectl
    • Bookmark kubectl cheat
    • create sample pod & delete it in k8s cluster.

Leave a Reply

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

About learningthoughtsadmin