K8s Useful Commands
Contents
Useful k8s commands 💡 💕
Table of contents
- How to create pods
- How to view all objects in k8s
- How to find or count the number of k8s objects - namespace, pods, service
- How to delete or terminate the pod force
- Print lables of an object or pods
How to create pods
How to create pods
|
|
This command will create a nginx pods
|
|
How to view all objects in k8s
This command will list all the objects under the currect namespace
|
|
How to find or count the number of k8s objects - namespace, pods, service
To simplify the output we are using --no-headers
attributes alone with the commands
|
|
How to delete or terminate the pod force
Sometime we want to delete to pod without waiting time. The below command is useful to delete the pod without waiting time or delte / terminate the pod immediately
|
|
Reading the documentation in commandline
One of the easyway to copy the syntax without referring web documentation
First search the command in the command line documentation
|
|
|
|
This will list the envFrom syntax spec , before and after 10 lines
Print lables of an object or pods
|
|