Starters

Priyan JPriyan J
2 min read
  • A node may be a VM or physical machine, depending on the cluster.

  • The scheduler distributes work or containers across multiple nodes.

  • Have a good understanding of YAML files and when to use them:

    • List, dictionary, List of Dictionaries.

Pods

    • kubectl get pods -o wide

      • kubectl describe pods <POD_NAME>

      • kubectl delete pod <POD_NAME> --grace-period=0

      • kubectl get pod -o yaml

      • kubectl run redis --image=redis123 --dry-run=client -o yaml > redis.yaml

Replication Controller vs Replica Set

    • kubectl get replicaset

      • kubectl scale replicaset <REPLICASET_NAME> --replicas=2

      • kubectl delete replicaset <REPLICASET_NAME>

      • Check for apiVersion: kubectl api-resources | grep replicaset

      • kubectl scale replicaset new-replica-set --replicas=0

Deployments

  • [Deploy, Upgrade, Rolling Updates, Rollback, Pause, Resume]

  • Rollout and Versioning

  • Recreate (Face downtime) vs RollingUpdate (Take down one by one)

  • Summarize Commands

    • kubectl create –f <DEPLOYMENT_YAML_FILE>

    • kubectl get deployments

    • kubectl apply –f <DEPLOYMENT_YAML_FILE>

    • kubectl set image deployment/<DEPLOYMENT_NAME> <CONTAINER_NAME>=<NEW_IMAGE>

    • kubectl rollout status deployment/<DEPLOYMENT_NAME>

    • kubectl rollout history deployment/<DEPLOYMENT_NAME>

    • kubectl rollout undo deployment/<DEPLOYMENT_NAME>

  • Networking in Kubernetes

Services

    • Enable connectivity between a group of pods and an external source

      • Node port (30000 to 32767), Cluster IP (Virtual IP), Load Balancer

      • NodePort:

        • minikube service myapp-svc --url
      • Cluster IP:

        • It is the default setting
      • Load Balancer:

        • Works as expected only with Cloud Providers like GCloud, AWS, Azure.

        • Otherwise act as Nodeport.

Microservices

P. S.

Credits: mumshad mannambeth

GitHub Repo

0
Subscribe to my newsletter

Read articles from Priyan J directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Priyan J
Priyan J