30.12.2025 Kubernetes Class Notes
kubectl exec
---------------
it is kubectl command
which is used to enter into "Pod" and "Container" also
how to enter into my container
-------------------------------------
kubectl exec -i -t kkpod1 -c kkcon1 -- /bin/bash
kubectl exec -it kkpod1 -c kkcon1 -- /bin/bash
1... interactive -i --user can able to interactive with terminal
2... terminal -t --provides kind of terminal setup
3... /bin/bash --provides bash environment
4... -- (two hypens) --it separates kubectl commands and arguments from the other commands
5... -c (container) --it specifies container
cluster--->nodes--->pods---->containers---->application+deps
1.cluster
---------
the overall Kubernetes environment
where we have multiple nodes
2.Nodes
-------
it is nothing but a virtual machine(server)
that holds multiple pods
3.pods
---------
it is a place
that holds multiple containers
smallest deployable unit in the Kubernetes cluster
that hols multiple containers
4.containers
--------------
it is a place
where we store our application and deps also
how to access your application
------------------------------------
there are different ways to access application
1. port forwarding
2. service
3. Direct Pod Access
4. Ingress
Comments
Post a Comment