Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Sid
Sid

Posted on • Edited on

     

Kubernetes - All things kubectl

First things first - how do we pronounce "kubectl" :) Based on what I heard right now, it's now (and officially) called as "Kube Control"

List Nodes

# Usual Outputkubectl get nodes# Wide variant (provided more fields w.r.t. node like internal & external IP, OS Image, Kernel version and container runtime etc.kubectl get nodes-o wide# Machine friendly outputkubectl get nodes-o yamlkubectl get nodes-o json# Awesome node monitoring and all other node info, also lists all pods across all namespaces running on that nodekubectl describe node/<node-name-from-nodes-command>

kubectl describe basically works with all resources in format as follows

kubectl describe"<resource-kind>/<resource-name>"

Get Services

Get's all deployed services that someone can "talk" to

kubectl get svc

Namespaces

# Get all namespaceskubectl get ns

Most commands can take -n or -A (for all namespaces) as a modifier to run command on

Get Pods

# Gets all pods across all namespaceskubectl get pods-A# Gets all pods in a specific namespacekubectl get pods-n"<namespace-name>"

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

An electronics engineer fascinated by software engineering for last 15+ years!
  • Location
    India
  • Education
    Masters in IT, Electronics and TeleComm Engineer
  • Work
    Senior Principal Software Engineer at Accenture Security, formerly Symantec
  • Joined

More fromSid

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp