Debug School

Yogeshwari
Yogeshwari

Posted on

Assignment Day#2 Learning Summary

Namespace:
Namespace is the logical separation of a cluster. It helps to isolate the pods. Scope of the pod is namespace. "default" is the default namespace in the cluster. All the pods will be created in default namespace when namespace is not specified.
To create the namespace:
kubectl create ns
Below are two ways to perform CRUD (Create,Read,Update and Delete) operations of the resource in cluster:
Create:

  1. YAML - create -f yaml
  2. Command - create Read:
  3. YAML - get-f yaml
  4. Command - get, describe Update:
  5. YAML - apply -f yaml
  6. Command - edit Delete:
  7. YAML - delete -f yaml
  8. Command - delete

POD
It is the basic unit of the cluster
Create the Pod:
kubectl create -y pod.yaml -nyogi
Display the pods:
kubectl get pods -nyogi
kubectl get pods -o wide -nyogi
To see the container logs:
kubectl logs yogi-pod -nyogi
Portforwarding:
kubectl port-forward --address 0.0.0.0 pod/yogi-pod -nyogi 8999:80
Replication Controller and ReplicaSet
Controls the number of pods to be running in the cluster
Replication controller is now deprecated and replaced by ReplicaSet
Deployment

  1. Replication
  2. Controller
  3. Versioning
  4. Rollout
  5. Rollback Below are the deployment strategy followed in Kubernetes: Recreate RollingUpdate RollingUpdate is the default deployment strategy in kubernetes.

Top comments (0)