Debug School

Subham Chowdhury
Subham Chowdhury

Posted on

What is Namespace,troubleshoot PODs,ReplicationController,ReplicaSet & Deployement by Subham

Namespace:-
Namespace is the logical separation of the resources of k8s cluster which will be shared across multiple pods.
There are 4 types of Namespaces

  1. System namespace - Used for System PODS
  2. Public Namespace - Used for PODs to be shared across Namespace
  3. User Namespace - Used for User defined pods
  4. Default Namespace - Used for PODs which are not created mapped to any Namespace

Troubleshoot PODs:
In order to troubleshoot PODs we have few commands which are frequently Used. These commands are as follows:
Logs
exec
cp
port-forward
auth
debug

ReplicationController:
With this feature we can create n number of Pods through replication controller yaml file. Here the kind is ReplicationController. The controller will automatically detect if there is mismatch in the desire vs actual number of pods and do the needful to make it same. It is currently deprecated as it w3as too much buggy and the function can be achieved by ReplicaSet

ReplicaSet:
The job of this resource is same as Replication Controller however this is more stable and also can match label under specs.

Deployment:
This is the most preferred way of deploying the POds and we can provide the replica index , image all in a single command to do so. It consists of 5 part

  1. Replica
  2. Controller
  3. Versioning
  4. Rollout
  5. Rollback It follows Rolling Update Deployment Pattern which is the default one. It also has another pattern which recreate. In the previous pattern the one container is destroyed and created , say out of 3 container and hence there is zero downtime in update. IN recreate pattern all the container are brought down and then created. SO there is some downtime.

Top comments (0)