DevOps Classroom Series – 10/Feb/2020

Kubernetes Objects

  • Are persistent entities of K8s system
  • Every object has
    • Object Spec:
    • Object Status:

Basic Workflow

  • Write an Specification in YAML format and save in a file
  • To Create/modify
kubectl apply -f <pathofyaml>
  • To delete
kubectl delete -f <pathofyml>
  • To get status
kubectl get <object-kind>



  • Atomic unit of creation in k8s

  • Pod contains container(s)

  • Each pod gets an ip address

  • When we have more than one container in the pod all the containers inside pod can be accessed over pod ip. For inter container communication with in pod the containers have to use localhost

  • In k8s scaling is number of pods will be increased not containers Preview

  • When you multi container pod

    • one container would be main car container
    • others would be side car containers
  • Lets try to create Pod Specification. Refer to pod specification from here

  • Refer to

    • metadata
    • spec
    • kind
    • apiVersion
  • From the reference try to fill the values in a yaml file (learning)

apiVersion: v1
kind: Pod
  name: learning
    - image: jenkins:1.609.2
      name: jenkins

  • Login into kubeadm master and execute kubectl apply -f learning.yml
  • wath for status with changes
kubectl get pods -w
  • Get full info of pods
kubectl get pods -o wide
  • Delete the pods
kubectl delete -f learning.yml

Leave a Reply

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

About learningthoughtsadmin