1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 10:02:10 +02:00
tldr/pages/common/kubectl-get.md
Sebastiaan Speck 7510205497
pages/*: fix small typos (#11831)
* pages/*: fix small typos

* Update ssh-copy-id.md

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* ansible-inventory: fix typo

* Update pages/linux/zathura.md

Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>

* gcloud: fix typo

* fdesetup: mark as placeholder

* icalbuddy: use general placeholder

* ip: make it a placeholder

* git-svn: fix typo

* pages/*: fix typos

* kubectl-get: add mnemonics and long options

* kubectl-describe: add mnemonics and long options

* pip-install: use short option

* Update icalbuddy.md

Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>

---------

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
2023-12-27 11:52:49 +05:30

797 B

kubectl get

Get Kubernetes objects and resources. More information: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#get.

  • Get all namespaces in the current cluster:

kubectl get namespaces

  • Get nodes in a specified [n]amespace:

kubectl get nodes --namespace {{namespace}}

  • Get pods in a specified [n]amespace:

kubectl get pods --namespace {{namespace}}

  • Get deployments in a specified [n]amespace:

kubectl get deployments --namespace {{namespace}}

  • Get services in a specified [n]amespace:

kubectl get services --namespace {{namespace}}

  • Get all resources in a specified [n]amespace:

kubectl get all --namespace {{namespace}}

  • Get Kubernetes objects defined in a YAML manifest [f]ile:

kubectl get --file {{path/to/manifest.yaml}}