{"id":19957002,"url":"https://github.com/anmolnagpal/kubernetes-commands","last_synced_at":"2025-10-13T12:36:57.611Z","repository":{"id":94619065,"uuid":"184944526","full_name":"anmolnagpal/kubernetes-commands","owner":"anmolnagpal","description":"Kubernetes Cheat Sheet","archived":false,"fork":false,"pushed_at":"2019-05-04T22:17:41.000Z","size":12,"stargazers_count":4,"open_issues_count":0,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-01T15:45:02.091Z","etag":null,"topics":["cheets","commands","devops","k8s","kubernetes"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anmolnagpal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-04T21:08:54.000Z","updated_at":"2024-07-11T16:21:11.000Z","dependencies_parsed_at":"2023-04-25T09:16:45.841Z","dependency_job_id":null,"html_url":"https://github.com/anmolnagpal/kubernetes-commands","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anmolnagpal/kubernetes-commands","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anmolnagpal%2Fkubernetes-commands","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anmolnagpal%2Fkubernetes-commands/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anmolnagpal%2Fkubernetes-commands/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anmolnagpal%2Fkubernetes-commands/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anmolnagpal","download_url":"https://codeload.github.com/anmolnagpal/kubernetes-commands/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anmolnagpal%2Fkubernetes-commands/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279015057,"owners_count":26085643,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cheets","commands","devops","k8s","kubernetes"],"created_at":"2024-11-13T01:36:17.472Z","updated_at":"2025-10-13T12:36:57.596Z","avatar_url":"https://github.com/anmolnagpal.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://i.imgur.com/IYVX7a8.png\" /\u003e\u003c/p\u003e\n\nWhat is Kubernetes?\n\n\u003e Kubernetes is a platform for managing containerized workloads. Kubernetes orchestrates computing, networking and storage to provide a seamless portability across infrastructure providers\n\n## Cluster Info\n```yaml\n\u003e kubectl config\n\u003e kubectl cluster -info\n\u003e kubectl get componentstatuses\n```\n\n## Viewing Resource Information\n\n#### Nodes\n```bash\n\u003e kubectl get no\n\u003e kubectl get no -o wide\n\u003e kubectl describe no\n\u003e kubectl get no -o yaml\n\u003e kubectl get node --selector=[label_name]\n\u003e kubectl get nodes -o jsonpath='{.items[*].status.addresses[?(@.type==\"ExternalIP\")].address}'\n\u003e kubectl top node [ node_name]\n```\n#### Pods\n```bash\n\u003e kubectl get po\n\u003e kubectl get po -o wide\n\u003e kubectl describe po\n\u003e kubectl get po --show -labels\n\u003e kubectl get po -l app=nginx\n\u003e kubectl get po -o yaml\n\u003e kubectl get pod [pod_name] -o yaml --export\n\u003e kubectl get pod [pod_name] -o yaml --export \u003e nameoffile.yaml\n\u003e kubectl get pods --field-selector status.phase=Running\n```\n\n#### Namespaces\n```bash\n\u003e kubectl get ns\n\u003e kubectl get ns -o yaml\n\u003e kubectl describe ns\n```\n\n#### Services\n```bash\n\u003e kubectl get svc\n\u003e kubectl describe svc\n\u003e kubectl get svc -o wide\n\u003e kubectl get svc -o yaml\n\u003e kubectl get svc --show-labels\n```\n\n#### Deployments\n```bash\n\u003e kubectl get deploy\n\u003e kubectl describe deploy\n\u003e kubectl get deploy -o wide\n\u003e kubectl get deploy -o yaml\n```\n\n#### ConfigMaps\n```bash\n\u003e kubectl get cm\n\u003e kubectl get cm -n=[namespace]\n\u003e kubectl get cm -n=[namespace] -o yaml \n\u003e kubectl get cm --all -namespaces\n\u003e kubectl get cm --all -namespaces -o yaml\n```\n\n#### Logs\n```bash\n\u003e kubectl logs [pod_name]\n\u003e kubectl logs [pod_name] -n=[namespace]\n\u003e kubectl logs --since=1h [pod_name]\n\u003e kubectl logs --tail=20 [pod_name]\n\u003e kubectl logs -f -c [container_name][pod_name]\n\u003e kubectl logs [pod_name] \u003e pod.log\n```\n\n#### Secrets\n```bash\n\u003e kubectl get secrets\n\u003e kubeclt get secrets -n=[namespace]\n\u003e kubectl get secrets -n=[namespace] -o yaml \n\u003e kubectl get secrets --all -namespaces\n\u003e kubectl get secrets -o yaml\n```\n\n#### ReplicaSets\n```bash\n\u003e kubectl get rs\n\u003e kubectl describe rs\n\u003e kubectl get rs -o wide\n\u003e kubectl get rs -o yaml\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanmolnagpal%2Fkubernetes-commands","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanmolnagpal%2Fkubernetes-commands","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanmolnagpal%2Fkubernetes-commands/lists"}