DevOps Classroom Series – 08/Apr/2021

Pod

  • This is smallest deployable units of computing in k8s
  • A Pod consists of one or more containers with shared network and storage resources
  • Each Pod will recieve a unique ip address
  • To create any object in k8s we need to create a template
  • To write the spec navigate to api reference Refer Here
  • Refer Here for the pods specs created
  • Now lets try to apply the pod spec created
  • Each pod will get one ip address

kubernetes namespace

  • K8s supports multiple virtual cluster backed by same physical cluster and these virtual clusters are called as namespace
  • In k8s for any object we have two kinds of scopes
    • cluster scope
    • namespace scope

Commonly used kubectl commands

  • get object: In the resources which are scoped to namespace we can use -n to specify the namespace
kubectl get pods -n default

  • describe object-type object-name:
  • logs object-name:
  • apply -f filename.yaml
  • Other Commands
  • We can use short names
  • To get to know the information of cluster

Kubernetes HTTP Request Flow

The K8s API

  • K8s api uses JSON over http for its requests and responses.
  • k8s api allows clients to create, update, delete or read the description of object via standard http methods
  • Trace the HTTP requests: To trace http request we will be using kubectl get pods -n kube-system. To this we will be adding verbose level –v=8
kubectl get pods -n kube-system --v=8

*

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 Network Integration by Acurax Social Media Branding Company
Exit mobile version
%%footer%%