

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Kubernetes is a platform for managing containerized workloads
Typology: Cheat Sheet
1 / 2
This page cannot be seen from the preview
Don't miss anything!
Nodes $ kubect l get no $ kubect l get no - o wi de $ kubect l descr i be no $ kubect l get no - o yaml $ kubect l get node - - sel ect or =[ l abel _name] $ kubect l get nodes - o j sonpat h=' {. i t ems[ * ]. st at us. addr esses [ ?( @. t ype==" Ext er nal I P" ) ]. addr ess} ' $ kubect l t op node [ node_name] Pods $ kubect l get po $ kubect l get po - o wi de $ kubect l descr i be po $ kubect l get po - - show- l abel s $ kubect l get po - l app=ngi nx $ kubect l get po - o yaml $ kubect l get pod [ pod_name] - o yaml
StorageClass $ kubect l get sc $ kubect l get sc - o yaml Multiple Resources $ kubect l get svc, po $ kubect l get depl oy, no $ kubect l get al l $ kubect l get al l - - al l - namespaces Deployments/Namespaces $ kubect l edi t depl oy [ depl oy_name] $ kubect l del et e depl oy [ depl oy_name] $ kubect l expose depl oy [ depl oy_name]
page 2 Cordon/Uncordon $ kubect l cor don [ node_name] $ kubect l uncor don [ node_name] Drain $ kubect l dr ai n [ node_name] Nodes/Pods $ kubect l del et e node [ node_name] $ kubect l del et e pod [ pod_name] $ kubect l edi t node [ node_name] $ kubect l edi t pod [ pod_name] Annotate $ kubect l annot at e po [ pod_name] [ annot at i on] $ kubect l annot at e no [ node_name]
Creating a Pod $ kubect l cr eat e - f [ name_of _f i l e] $ kubect l appl y - f [ name_of _f i l e] $ kubect l r un [ pod_name] - - i mage=ngi nx
API Call $ kubect l get - - r aw / api s/ met r i cs. k8s. i o/ Cluster Info $ kubect l conf i g $ kubect l cl ust er - i nf o $ kubect l get component st at uses Interactive Pod $ kubect l r un [ pod_name] - - i mage=busybox
pod. yaml Getting Help $ kubect l - h $ kubect l cr eat e - h $ kubect l r un - h $ kubect l expl ai n depl oy. spec Creating a Service $ kubect l cr eat e svc nodepor t [ svc_name]