Member-only story
10 Must-Know Kubernetes Commands for DevOps Engineers
Kubernetes is an open-source container orchestration tool that was initially developed by Google and now maintained by Cloud Native Computing Foundation. kubectl
is the command line tool to manage kubernetes clusters. Whoever likes writing commands rather than using Kubernetes Dashboard will end up using kubectl
. In that sense you will find quite a few commands in this article that for my point of view every Cloud Developer should know.
The structure of kubectl
commands is built in following way:
kubectl [command] [Type] [Name] [flags]
[command]
is basically the imperative way associated with specific verb like create/apply/get/delete
that instructs to do the special activity. [Type]
refers to specific kubernetes resource pods, services, replicasets, statefulsets etc. [Name]
points to the exact name of resource which is by the way case-sensitive. [flags]
are extra options that give special functionalities.
Without further due, here is a whole list of commands, that I think are pretty important ones in every Cloud Developers daily work.
# get resource(s)
$ kubectl get services
$ kubectl get pods --all-namespaces
$ kubectl get pods -o wide
$ kubectl get rc <rc-name>
$ kubectl get secrets
# interaction with config…