Debug School

Rajesh Kumar
Rajesh Kumar

Posted on

Kubernetes Day 1 Notes Nov 2026


Master
- Api Server        -> POD -> Container --> Image --> Google Registry
- Etcd              -> POD -> Container --> Image --> Google Registry
- Controller mgr    -> POD -> Container --> Image --> Google Registry
- Schedular     -> POD -> Container --> Image --> Google Registry   
- Proxy        -> POD -> Container --> Image --> Google Registry

- Kubectl
- Kubelet
- Docker 
- ContainerD
- Kubeadm init

Worker

- Proxy        -> POD -> Container --> Image --> Google Registry

- Kubectl
- Kubelet
- Docker 
- ContainerD
- Kubeadm join


Workstations
- Kubectl           ~/.kube/config (Yaml)


        ~/.kube/config

        cluster add - Api Server 
        user - 
        cert - 
        context - cluster add  + Users


kubeadm join 172.31.10.122:6443 --token owxbzk.mr4to3szdkc4qra0 --discovery-token-ca-cert-hash sha256:51547d7414361b8642aec5e484b68e2076d7f62335649966066296581f2b993d


Demo - Certifications

Desktop - Minikube - https://minikube.sigs.k8s.io/docs/
AWS - EKS - https://aws.amazon.com/eks/
AZURE - https://azure.microsoft.com/en-in/solutions/kubernetes-on-azure/get-started/
Google - GKE
Docker Desktop
Rancher Desktop - 



 20  cd
   21  ls
   22  kubectl
   23* clea
   24  kubectl get nodes
   25  kubectl cluster-info
   26  history
   27  kubectl get nodes
   28  clear
   29  kubectl
   30  kubectl version
   31  kubectl get nodes
   32  kubectl get pods --all-namespaces
   33  kubectl api-resources
   34  kubectl api-versions
   35  kubectl cluster-info
   36  history

Enter fullscreen mode Exit fullscreen mode

Top comments (2)

Collapse
 
rajesh_kumar profile image
Rajesh Kumar •
What I am supposed to expect from K8?

            Azure           K8

Compute     vm              pod - rc -- deploy - jobs - corncobs - statefulsets, deamonsets

Storage     disk                pv pvc sc 

Networking  vac             calico

Security        IAM             rbac


Tech

API SERVER
            GET POST PUT DELETE
            CREATE READ UPDATE DELETE


            Create
                    cmd 
                            create 
                    yaml
                            create -f yamlfile

            Read
                    cmd 
                            get 
                            describe
                    yaml
                            get -f yamlfile


            Update
                    cmd 
                            edit 
                    yaml
                            apply -f yamlfile
            Delete
                    cmd 
                            delete 
                    yaml
                            delete -f yamlfile


5  kubectl get ns
   16  kubectl edit ns dev
   17  kubectl describe ns dev
   18  kubectl delete ns dev
   19  kubectl  get ns


apiVersion: v1
kind: Namespace
metadata:
  name: devops1
  labels:
    kubernetes.io/metadata.name: devops1


31  vi ns.yaml
   32  kubectl create -f ns.yaml
   33  kubectl get -f yaml
   34  kubectl get -f ns.yaml
   35  history



apiVersion: v1
kind: Pod
metadata:
  name: Rajesh
  labels:
    app: helloworld
spec:
  containers:
  - name: devopsschool1
    image: scmgalaxy/nginx-devopsschoolv1
    ports:
    - name: nginx-port
      containerPort: 80


36  clear
   37  ls
   38  vi pod.yaml
   39  kubectl get pods
   40  kubectl get ns
   41  kubectl get pods -nqa
   42  ls
   43  kubectl create -f pod.yaml
   44  vi pod.yaml
   45  kubectl create -f pod.yaml
   46  kubectl get pods
   47  kubectl get pods -o wide
   48  kubectl create -f pod.yaml
   49  kubectl create -f pod.yaml -nqa
   50* vi pod.ya
   51  kubectl apply -f pod.yaml 
   52  kubectl describe pod rajesh
   53  kubectl deltete pod rajesh
   54  kubectl delete pod rajesh
   55  kubectl get pods
   56  kubectl apply -f pod.yaml 
   57  kubectl get pods
   58  history


https://www.devopsschool.com/blog/working-with-kubernetes-cluster-using-kubectl-part-6-namespaces/
https://www.devopsschool.com/blog/kubernetes-pod-example-programs/
https://www.devopsschool.com/blog/working-with-kubernetes-cluster-using-kubectl-part-8-pods/
Enter fullscreen mode Exit fullscreen mode
Collapse
 
rajesh_kumar profile image
Rajesh Kumar •

Troubleshooting and Debugging Commands:
  describe        Show details of a specific resource or group of resources
  logs            Print the logs for a container in a pod

  attach          Attach to a running container

  exec            Execute a command in a container

  port-forward    Forward one or more local ports to a pod

  proxy           Run a proxy to the Kubernetes API server

  cp              Copy files and directories to and from containers

  auth            Inspect authorization

  debug           Create debugging sessions for troubleshooting workloads and nodes

  events          List events




kubectl port-forward --address 0.0.0.0 pod/deepa 8888:80




kubectl debug -f pod.yaml -it --image=httpd


   63  kubectl describe pod deepa
   64  clear
   65  ls
   66  kubectl get ns
   67  kubectl describe ns dee
   68  clear
   69  l
   70  kubectl get pods
   71  kubectl logs deepa
   72  kubectl get pods -o wide
   73  curl http://192.168.131.70 
   74  kubectl get pods -o wide
   75  kubectl logs deepa
   76  kubectl attach deepa
   77  kubectl exec deepa -- ls
   78  kubectl exec -it deepa -- /bin/bash
   79  clear
   80  kubectl port-forward -h
   81  clear
   82  kubectl port-forward --address 0.0.0.0 pod/deepa 8888:80
   83  ls
   84  kubectl cp pod.yaml deepa:/tmp
   85  kubectl exec deepa -- ls /tmp
   86  kubectlauth
   87  kubectl auth
   88  kubectl auth can-i read pod
   89  kubectl auth whoami
   90  kubectl debug
   91  kubectl debug -h
   92  clear
   93  ls
   94  kubectl debug -f pod.yaml -it --image=httpd
   95  clear
   96  ls
   97  kubectl events
   98  history


Enter fullscreen mode Exit fullscreen mode