@enjoys/context-engine 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +213 -0
- package/data/commands/air.json +59 -0
- package/data/commands/ansible.json +24 -0
- package/data/commands/apachectl.json +87 -0
- package/data/commands/apt-get.json +81 -0
- package/data/commands/apt.json +91 -0
- package/data/commands/awk.json +26 -0
- package/data/commands/aws-vault.json +140 -0
- package/data/commands/aws.json +229 -0
- package/data/commands/az.json +36 -0
- package/data/commands/bazel.json +103 -0
- package/data/commands/brew.json +140 -0
- package/data/commands/bun.json +230 -0
- package/data/commands/caddy.json +194 -0
- package/data/commands/cargo.json +1048 -0
- package/data/commands/cat.json +18 -0
- package/data/commands/cd.json +48 -0
- package/data/commands/certbot.json +148 -0
- package/data/commands/chmod.json +97 -0
- package/data/commands/choco.json +134 -0
- package/data/commands/chown.json +59 -0
- package/data/commands/clickhouse-client.json +74 -0
- package/data/commands/cloudflare.json +226 -0
- package/data/commands/cmake.json +110 -0
- package/data/commands/cockroach.json +92 -0
- package/data/commands/conda.json +94 -0
- package/data/commands/consul.json +125 -0
- package/data/commands/cp.json +86 -0
- package/data/commands/curl.json +44 -0
- package/data/commands/cypress.json +100 -0
- package/data/commands/deno.json +29 -0
- package/data/commands/django-admin.json +86 -0
- package/data/commands/dnf.json +137 -0
- package/data/commands/docker.json +1100 -0
- package/data/commands/doctl.json +156 -0
- package/data/commands/eslint.json +69 -0
- package/data/commands/find.json +44 -0
- package/data/commands/firebase.json +97 -0
- package/data/commands/flask.json +79 -0
- package/data/commands/flyctl.json +148 -0
- package/data/commands/gcloud.json +227 -0
- package/data/commands/gh.json +39 -0
- package/data/commands/git.json +527 -0
- package/data/commands/glab.json +116 -0
- package/data/commands/go.json +161 -0
- package/data/commands/gofmt.json +51 -0
- package/data/commands/golangci-lint.json +89 -0
- package/data/commands/gradle.json +44 -0
- package/data/commands/grep.json +47 -0
- package/data/commands/gunicorn.json +83 -0
- package/data/commands/helm.json +1104 -0
- package/data/commands/hg.json +92 -0
- package/data/commands/httpd.json +147 -0
- package/data/commands/influx.json +119 -0
- package/data/commands/iptables.json +86 -0
- package/data/commands/java.json +31 -0
- package/data/commands/jest.json +82 -0
- package/data/commands/journalctl.json +88 -0
- package/data/commands/just.json +93 -0
- package/data/commands/k6.json +84 -0
- package/data/commands/kubectl.json +1277 -0
- package/data/commands/linode-cli.json +117 -0
- package/data/commands/locust.json +83 -0
- package/data/commands/ls.json +115 -0
- package/data/commands/make.json +86 -0
- package/data/commands/mocha.json +75 -0
- package/data/commands/mongosh.json +73 -0
- package/data/commands/mv.json +68 -0
- package/data/commands/mvn.json +45 -0
- package/data/commands/mysql.json +81 -0
- package/data/commands/nest.json +69 -0
- package/data/commands/netlify.json +92 -0
- package/data/commands/next.json +71 -0
- package/data/commands/nft.json +105 -0
- package/data/commands/nginx.json +146 -0
- package/data/commands/nmap.json +92 -0
- package/data/commands/node.json +43 -0
- package/data/commands/nomad.json +139 -0
- package/data/commands/npm.json +1265 -0
- package/data/commands/npx.json +58 -0
- package/data/commands/nx.json +82 -0
- package/data/commands/openssl.json +288 -0
- package/data/commands/packer.json +92 -0
- package/data/commands/pacman.json +82 -0
- package/data/commands/pg_dump.json +83 -0
- package/data/commands/pg_restore.json +74 -0
- package/data/commands/pip.json +95 -0
- package/data/commands/pipenv.json +79 -0
- package/data/commands/pipx.json +53 -0
- package/data/commands/playwright.json +97 -0
- package/data/commands/pnpm.json +29 -0
- package/data/commands/poetry.json +96 -0
- package/data/commands/prettier.json +71 -0
- package/data/commands/ps.json +31 -0
- package/data/commands/psql.json +124 -0
- package/data/commands/pulumi.json +130 -0
- package/data/commands/pytest.json +92 -0
- package/data/commands/python.json +30 -0
- package/data/commands/railway.json +91 -0
- package/data/commands/redis-cli.json +148 -0
- package/data/commands/render.json +72 -0
- package/data/commands/rm.json +79 -0
- package/data/commands/rsync.json +36 -0
- package/data/commands/rust.json +35 -0
- package/data/commands/rustup.json +103 -0
- package/data/commands/scp.json +60 -0
- package/data/commands/sed.json +28 -0
- package/data/commands/sqlite3.json +68 -0
- package/data/commands/ssh-keygen.json +112 -0
- package/data/commands/ssh.json +37 -0
- package/data/commands/sudo.json +147 -0
- package/data/commands/supabase.json +108 -0
- package/data/commands/svn.json +75 -0
- package/data/commands/systemctl.json +31 -0
- package/data/commands/tar.json +35 -0
- package/data/commands/tcpdump.json +77 -0
- package/data/commands/terraform.json +824 -0
- package/data/commands/terragrunt.json +83 -0
- package/data/commands/tsc.json +85 -0
- package/data/commands/turbo.json +72 -0
- package/data/commands/ufw.json +76 -0
- package/data/commands/unzip.json +59 -0
- package/data/commands/uvicorn.json +73 -0
- package/data/commands/vault.json +144 -0
- package/data/commands/vercel.json +98 -0
- package/data/commands/vite.json +63 -0
- package/data/commands/vitest.json +88 -0
- package/data/commands/wasm-pack.json +90 -0
- package/data/commands/wget.json +38 -0
- package/data/commands/winget.json +131 -0
- package/data/commands/wireshark.json +81 -0
- package/data/commands/yarn.json +28 -0
- package/data/commands/yum.json +98 -0
- package/data/commands/zip.json +59 -0
- package/index.d.ts +131 -0
- package/index.js +189 -0
- package/index.mjs +21 -0
- package/package.json +64 -0
|
@@ -0,0 +1,1277 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "kubectl",
|
|
3
|
+
"description": "Kubernetes command-line tool for managing clusters",
|
|
4
|
+
"category": "container-orchestration",
|
|
5
|
+
"platforms": ["linux", "macos", "windows"],
|
|
6
|
+
"shells": ["bash", "zsh", "fish", "powershell"],
|
|
7
|
+
"subcommands": [
|
|
8
|
+
{
|
|
9
|
+
"name": "get",
|
|
10
|
+
"description": "Display one or many resources",
|
|
11
|
+
"args": [
|
|
12
|
+
{ "name": "<resource>", "type": "string", "required": true, "description": "Resource type (pods, services, deployments, nodes, etc.)" },
|
|
13
|
+
{ "name": "<name>", "type": "string", "required": false, "description": "Name of specific resource" }
|
|
14
|
+
],
|
|
15
|
+
"options": [
|
|
16
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
17
|
+
{ "name": "--all-namespaces", "short": "-A", "description": "List resources across all namespaces" },
|
|
18
|
+
{ "name": "--output", "short": "-o", "description": "Output format (json|yaml|wide|name|jsonpath=...|custom-columns=...)", "type": "string" },
|
|
19
|
+
{ "name": "--selector", "short": "-l", "description": "Label selector (e.g. app=nginx)", "type": "string" },
|
|
20
|
+
{ "name": "--field-selector", "description": "Field selector (e.g. status.phase=Running)", "type": "string" },
|
|
21
|
+
{ "name": "--watch", "short": "-w", "description": "Watch for changes after listing" },
|
|
22
|
+
{ "name": "--show-labels", "description": "Show all labels as the last column" },
|
|
23
|
+
{ "name": "--sort-by", "description": "Sort list by JSONPath expression", "type": "string" },
|
|
24
|
+
{ "name": "--no-headers", "description": "Do not print column headers" },
|
|
25
|
+
{ "name": "--chunk-size", "description": "Return large lists in chunks", "type": "number" },
|
|
26
|
+
{ "name": "--ignore-not-found", "description": "Treat 'resource not found' as successful retrieval" },
|
|
27
|
+
{ "name": "--raw", "description": "Raw URI to request from the server", "type": "string" }
|
|
28
|
+
],
|
|
29
|
+
"examples": [
|
|
30
|
+
"kubectl get pods",
|
|
31
|
+
"kubectl get pods -n kube-system",
|
|
32
|
+
"kubectl get pods -A",
|
|
33
|
+
"kubectl get pods -o wide",
|
|
34
|
+
"kubectl get pods -o yaml",
|
|
35
|
+
"kubectl get pods -l app=nginx",
|
|
36
|
+
"kubectl get pods --field-selector status.phase=Running",
|
|
37
|
+
"kubectl get pods --sort-by=.metadata.creationTimestamp",
|
|
38
|
+
"kubectl get pods -o jsonpath='{.items[*].metadata.name}'",
|
|
39
|
+
"kubectl get svc,deployments -n my-namespace",
|
|
40
|
+
"kubectl get nodes -o custom-columns='NAME:.metadata.name,STATUS:.status.conditions[-1].type'",
|
|
41
|
+
"kubectl get pod my-pod -o json",
|
|
42
|
+
"kubectl get all -n default",
|
|
43
|
+
"kubectl get events --sort-by=.lastTimestamp",
|
|
44
|
+
"kubectl get pods -w"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "apply",
|
|
49
|
+
"description": "Apply a configuration to a resource by file or stdin",
|
|
50
|
+
"args": [],
|
|
51
|
+
"options": [
|
|
52
|
+
{ "name": "--filename", "short": "-f", "description": "Filename, directory, or URL to apply", "type": "path" },
|
|
53
|
+
{ "name": "--kustomize", "short": "-k", "description": "Process kustomization directory", "type": "path" },
|
|
54
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
55
|
+
{ "name": "--recursive", "short": "-R", "description": "Process the directory recursively" },
|
|
56
|
+
{ "name": "--selector", "short": "-l", "description": "Label selector to filter on", "type": "string" },
|
|
57
|
+
{ "name": "--prune", "description": "Automatically delete resources not in the applied set" },
|
|
58
|
+
{ "name": "--dry-run", "description": "Strategy for dry-run (none|server|client)", "type": "string" },
|
|
59
|
+
{ "name": "--force", "description": "Delete and re-create resource if needed" },
|
|
60
|
+
{ "name": "--server-side", "description": "Use server-side apply" },
|
|
61
|
+
{ "name": "--field-manager", "description": "Name of the manager for server-side apply", "type": "string" },
|
|
62
|
+
{ "name": "--force-conflicts", "description": "Force apply even with field conflicts (server-side)" },
|
|
63
|
+
{ "name": "--validate", "description": "Validation mode (strict|warn|ignore)", "type": "string" },
|
|
64
|
+
{ "name": "--record", "description": "Record current kubectl command in resource annotation" },
|
|
65
|
+
{ "name": "--overwrite", "description": "Overwrite existing annotations/labels" }
|
|
66
|
+
],
|
|
67
|
+
"examples": [
|
|
68
|
+
"kubectl apply -f deployment.yaml",
|
|
69
|
+
"kubectl apply -f https://raw.githubusercontent.com/kubernetes/website/main/content/en/examples/application/deployment.yaml",
|
|
70
|
+
"kubectl apply -f ./manifests/",
|
|
71
|
+
"kubectl apply -f deployment.yaml -n staging",
|
|
72
|
+
"kubectl apply -k ./overlays/production",
|
|
73
|
+
"kubectl apply -f - <<EOF\napiVersion: v1\nkind: ConfigMap\nmetadata:\n name: my-config\ndata:\n key: value\nEOF",
|
|
74
|
+
"kubectl apply -f deployment.yaml --dry-run=client",
|
|
75
|
+
"kubectl apply -f deployment.yaml --server-side",
|
|
76
|
+
"kubectl apply -f deployment.yaml --server-side --force-conflicts",
|
|
77
|
+
"kubectl apply -R -f ./manifests/"
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "delete",
|
|
82
|
+
"description": "Delete resources by filenames, stdin, resources and names, or by resources and label selector",
|
|
83
|
+
"args": [
|
|
84
|
+
{ "name": "<resource>", "type": "string", "required": false, "description": "Resource type" },
|
|
85
|
+
{ "name": "<name>", "type": "string", "required": false, "description": "Resource name(s)" }
|
|
86
|
+
],
|
|
87
|
+
"options": [
|
|
88
|
+
{ "name": "--filename", "short": "-f", "description": "Filename, directory, or URL for resource manifests", "type": "path" },
|
|
89
|
+
{ "name": "--kustomize", "short": "-k", "description": "Process kustomization directory", "type": "path" },
|
|
90
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
91
|
+
{ "name": "--all", "description": "Delete all resources of the specified type" },
|
|
92
|
+
{ "name": "--all-namespaces", "short": "-A", "description": "Delete resources in all namespaces" },
|
|
93
|
+
{ "name": "--selector", "short": "-l", "description": "Label selector to filter on", "type": "string" },
|
|
94
|
+
{ "name": "--grace-period", "description": "Seconds to wait before force deletion (-1 for default)", "type": "number" },
|
|
95
|
+
{ "name": "--force", "description": "Immediately remove resources from API and bypass graceful deletion" },
|
|
96
|
+
{ "name": "--cascade", "description": "Cascade strategy (background|orphan|foreground)", "type": "string" },
|
|
97
|
+
{ "name": "--now", "description": "Signal immediate shutdown (grace-period=1)" },
|
|
98
|
+
{ "name": "--wait", "description": "Wait for resources to be fully deleted (default true)" },
|
|
99
|
+
{ "name": "--ignore-not-found", "description": "Treat 'resource not found' errors as successful" },
|
|
100
|
+
{ "name": "--dry-run", "description": "Strategy for dry-run (none|server|client)", "type": "string" },
|
|
101
|
+
{ "name": "--timeout", "description": "Time to wait before giving up on deletion", "type": "string" }
|
|
102
|
+
],
|
|
103
|
+
"examples": [
|
|
104
|
+
"kubectl delete pod my-pod",
|
|
105
|
+
"kubectl delete pod my-pod -n staging",
|
|
106
|
+
"kubectl delete -f deployment.yaml",
|
|
107
|
+
"kubectl delete pods -l app=nginx",
|
|
108
|
+
"kubectl delete pods --all -n test",
|
|
109
|
+
"kubectl delete pod my-pod --grace-period=0 --force",
|
|
110
|
+
"kubectl delete deployment,svc my-app",
|
|
111
|
+
"kubectl delete namespace my-namespace",
|
|
112
|
+
"kubectl delete -k ./overlays/staging",
|
|
113
|
+
"kubectl delete pod my-pod --dry-run=client"
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "describe",
|
|
118
|
+
"description": "Show details of a specific resource or group of resources",
|
|
119
|
+
"args": [
|
|
120
|
+
{ "name": "<resource>", "type": "string", "required": true, "description": "Resource type" },
|
|
121
|
+
{ "name": "<name>", "type": "string", "required": false, "description": "Resource name" }
|
|
122
|
+
],
|
|
123
|
+
"options": [
|
|
124
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
125
|
+
{ "name": "--all-namespaces", "short": "-A", "description": "Describe in all namespaces" },
|
|
126
|
+
{ "name": "--selector", "short": "-l", "description": "Label selector to filter", "type": "string" },
|
|
127
|
+
{ "name": "--show-events", "description": "Show events associated with the resource (default true)" },
|
|
128
|
+
{ "name": "--chunk-size", "description": "Return large lists in chunks", "type": "number" }
|
|
129
|
+
],
|
|
130
|
+
"examples": [
|
|
131
|
+
"kubectl describe pod my-pod",
|
|
132
|
+
"kubectl describe pod my-pod -n production",
|
|
133
|
+
"kubectl describe node worker-1",
|
|
134
|
+
"kubectl describe svc my-service",
|
|
135
|
+
"kubectl describe deployment my-app",
|
|
136
|
+
"kubectl describe ingress my-ingress",
|
|
137
|
+
"kubectl describe pvc my-volume",
|
|
138
|
+
"kubectl describe pods -l app=nginx"
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "logs",
|
|
143
|
+
"description": "Print the logs for a container in a pod",
|
|
144
|
+
"args": [
|
|
145
|
+
{ "name": "<pod>", "type": "string", "required": true, "description": "Pod name or resource/name (e.g. deployment/my-app)" }
|
|
146
|
+
],
|
|
147
|
+
"options": [
|
|
148
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
149
|
+
{ "name": "--container", "short": "-c", "description": "Container name (for multi-container pods)", "type": "string" },
|
|
150
|
+
{ "name": "--follow", "short": "-f", "description": "Stream logs in real time" },
|
|
151
|
+
{ "name": "--previous", "short": "-p", "description": "Print logs from the previous instance of the container" },
|
|
152
|
+
{ "name": "--since", "description": "Show logs newer than a relative duration (e.g. 5m, 1h)", "type": "string" },
|
|
153
|
+
{ "name": "--since-time", "description": "Show logs after a specific RFC3339 timestamp", "type": "string" },
|
|
154
|
+
{ "name": "--timestamps", "description": "Include timestamps on each line" },
|
|
155
|
+
{ "name": "--tail", "description": "Number of lines to show from the end", "type": "number" },
|
|
156
|
+
{ "name": "--all-containers", "description": "Get logs from all containers in the pod" },
|
|
157
|
+
{ "name": "--selector", "short": "-l", "description": "Label selector to filter pods", "type": "string" },
|
|
158
|
+
{ "name": "--max-log-requests", "description": "Max number of concurrent log requests (when using -l)", "type": "number" },
|
|
159
|
+
{ "name": "--limit-bytes", "description": "Maximum bytes of logs to return", "type": "number" },
|
|
160
|
+
{ "name": "--prefix", "description": "Prefix each line with pod name and container name" },
|
|
161
|
+
{ "name": "--ignore-errors", "description": "If watching/following, allow errors to be ignored" }
|
|
162
|
+
],
|
|
163
|
+
"examples": [
|
|
164
|
+
"kubectl logs my-pod",
|
|
165
|
+
"kubectl logs my-pod -n production",
|
|
166
|
+
"kubectl logs my-pod -c sidecar",
|
|
167
|
+
"kubectl logs my-pod -f",
|
|
168
|
+
"kubectl logs my-pod --previous",
|
|
169
|
+
"kubectl logs my-pod --since=1h",
|
|
170
|
+
"kubectl logs my-pod --tail=100",
|
|
171
|
+
"kubectl logs my-pod --timestamps",
|
|
172
|
+
"kubectl logs my-pod --all-containers",
|
|
173
|
+
"kubectl logs -l app=nginx --prefix",
|
|
174
|
+
"kubectl logs deployment/my-app",
|
|
175
|
+
"kubectl logs job/my-job",
|
|
176
|
+
"kubectl logs -l app=nginx --since=30m --tail=50"
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"name": "exec",
|
|
181
|
+
"description": "Execute a command in a container",
|
|
182
|
+
"args": [
|
|
183
|
+
{ "name": "<pod>", "type": "string", "required": true, "description": "Pod name" },
|
|
184
|
+
{ "name": "<command>", "type": "string", "required": true, "description": "Command to execute" }
|
|
185
|
+
],
|
|
186
|
+
"options": [
|
|
187
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
188
|
+
{ "name": "--container", "short": "-c", "description": "Container name", "type": "string" },
|
|
189
|
+
{ "name": "--stdin", "short": "-i", "description": "Pass stdin to the container" },
|
|
190
|
+
{ "name": "--tty", "short": "-t", "description": "Allocate a TTY" },
|
|
191
|
+
{ "name": "--quiet", "short": "-q", "description": "Only print output from the remote session" }
|
|
192
|
+
],
|
|
193
|
+
"examples": [
|
|
194
|
+
"kubectl exec my-pod -- ls /app",
|
|
195
|
+
"kubectl exec -it my-pod -- /bin/bash",
|
|
196
|
+
"kubectl exec -it my-pod -- /bin/sh",
|
|
197
|
+
"kubectl exec my-pod -c sidecar -- cat /var/log/app.log",
|
|
198
|
+
"kubectl exec -it my-pod -n production -- /bin/bash",
|
|
199
|
+
"kubectl exec my-pod -- env",
|
|
200
|
+
"kubectl exec my-pod -- wget -qO- http://localhost:8080/health",
|
|
201
|
+
"kubectl exec my-pod -- printenv | grep DATABASE"
|
|
202
|
+
]
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"name": "port-forward",
|
|
206
|
+
"description": "Forward one or more local ports to a pod",
|
|
207
|
+
"args": [
|
|
208
|
+
{ "name": "<resource>", "type": "string", "required": true, "description": "Pod or resource (pod/name, deployment/name, svc/name)" },
|
|
209
|
+
{ "name": "<ports>", "type": "string", "required": true, "description": "Port pairs (local:remote)" }
|
|
210
|
+
],
|
|
211
|
+
"options": [
|
|
212
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
213
|
+
{ "name": "--address", "description": "Addresses to listen on (comma separated)", "type": "string" },
|
|
214
|
+
{ "name": "--pod-running-timeout", "description": "Timeout for waiting for at least one pod to be running", "type": "string" }
|
|
215
|
+
],
|
|
216
|
+
"examples": [
|
|
217
|
+
"kubectl port-forward my-pod 8080:80",
|
|
218
|
+
"kubectl port-forward my-pod 8080:80 -n production",
|
|
219
|
+
"kubectl port-forward svc/my-service 8080:80",
|
|
220
|
+
"kubectl port-forward deployment/my-app 3000:3000",
|
|
221
|
+
"kubectl port-forward my-pod 8080:80 9090:9090",
|
|
222
|
+
"kubectl port-forward --address 0.0.0.0 my-pod 8080:80",
|
|
223
|
+
"kubectl port-forward pod/my-pod 5432:5432"
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"name": "create deployment",
|
|
228
|
+
"description": "Create a deployment with the specified name",
|
|
229
|
+
"args": [
|
|
230
|
+
{ "name": "<name>", "type": "string", "required": true, "description": "Deployment name" }
|
|
231
|
+
],
|
|
232
|
+
"options": [
|
|
233
|
+
{ "name": "--image", "description": "Container image to use", "type": "string" },
|
|
234
|
+
{ "name": "--replicas", "short": "-r", "description": "Number of replicas", "type": "number" },
|
|
235
|
+
{ "name": "--port", "description": "Container port to expose", "type": "number" },
|
|
236
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
237
|
+
{ "name": "--dry-run", "description": "Strategy for dry-run (none|server|client)", "type": "string" },
|
|
238
|
+
{ "name": "--output", "short": "-o", "description": "Output format (json|yaml|name)", "type": "string" },
|
|
239
|
+
{ "name": "--save-config", "description": "Save the configuration of the resource in annotation" }
|
|
240
|
+
],
|
|
241
|
+
"examples": [
|
|
242
|
+
"kubectl create deployment nginx --image=nginx",
|
|
243
|
+
"kubectl create deployment my-app --image=myapp:latest --replicas=3",
|
|
244
|
+
"kubectl create deployment my-app --image=myapp:v1 --port=8080",
|
|
245
|
+
"kubectl create deployment my-app --image=myapp --dry-run=client -o yaml",
|
|
246
|
+
"kubectl create deployment my-app --image=myapp -n staging"
|
|
247
|
+
]
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"name": "create service clusterip",
|
|
251
|
+
"description": "Create a ClusterIP service",
|
|
252
|
+
"args": [
|
|
253
|
+
{ "name": "<name>", "type": "string", "required": true, "description": "Service name" }
|
|
254
|
+
],
|
|
255
|
+
"options": [
|
|
256
|
+
{ "name": "--tcp", "description": "Port pairs (port:targetPort)", "type": "string" },
|
|
257
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
258
|
+
{ "name": "--dry-run", "description": "Strategy for dry-run (none|server|client)", "type": "string" },
|
|
259
|
+
{ "name": "--output", "short": "-o", "description": "Output format", "type": "string" },
|
|
260
|
+
{ "name": "--clusterip", "description": "Assign a static ClusterIP or set to 'None'", "type": "string" }
|
|
261
|
+
],
|
|
262
|
+
"examples": [
|
|
263
|
+
"kubectl create service clusterip my-svc --tcp=80:8080",
|
|
264
|
+
"kubectl create service clusterip my-svc --tcp=80:8080 --dry-run=client -o yaml",
|
|
265
|
+
"kubectl create service clusterip my-svc --clusterip=None --tcp=80:8080"
|
|
266
|
+
]
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"name": "create service nodeport",
|
|
270
|
+
"description": "Create a NodePort service",
|
|
271
|
+
"args": [
|
|
272
|
+
{ "name": "<name>", "type": "string", "required": true, "description": "Service name" }
|
|
273
|
+
],
|
|
274
|
+
"options": [
|
|
275
|
+
{ "name": "--tcp", "description": "Port pairs (port:targetPort)", "type": "string" },
|
|
276
|
+
{ "name": "--node-port", "description": "Port on each node (30000-32767)", "type": "number" },
|
|
277
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
278
|
+
{ "name": "--dry-run", "description": "Strategy for dry-run (none|server|client)", "type": "string" },
|
|
279
|
+
{ "name": "--output", "short": "-o", "description": "Output format", "type": "string" }
|
|
280
|
+
],
|
|
281
|
+
"examples": [
|
|
282
|
+
"kubectl create service nodeport my-svc --tcp=80:8080",
|
|
283
|
+
"kubectl create service nodeport my-svc --tcp=80:8080 --node-port=30080"
|
|
284
|
+
]
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"name": "create service loadbalancer",
|
|
288
|
+
"description": "Create a LoadBalancer service",
|
|
289
|
+
"args": [
|
|
290
|
+
{ "name": "<name>", "type": "string", "required": true, "description": "Service name" }
|
|
291
|
+
],
|
|
292
|
+
"options": [
|
|
293
|
+
{ "name": "--tcp", "description": "Port pairs (port:targetPort)", "type": "string" },
|
|
294
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
295
|
+
{ "name": "--dry-run", "description": "Strategy for dry-run (none|server|client)", "type": "string" },
|
|
296
|
+
{ "name": "--output", "short": "-o", "description": "Output format", "type": "string" }
|
|
297
|
+
],
|
|
298
|
+
"examples": [
|
|
299
|
+
"kubectl create service loadbalancer my-svc --tcp=80:8080",
|
|
300
|
+
"kubectl create service loadbalancer my-svc --tcp=443:8443 --dry-run=client -o yaml"
|
|
301
|
+
]
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"name": "create namespace",
|
|
305
|
+
"description": "Create a namespace with the specified name",
|
|
306
|
+
"args": [
|
|
307
|
+
{ "name": "<name>", "type": "string", "required": true, "description": "Namespace name" }
|
|
308
|
+
],
|
|
309
|
+
"options": [
|
|
310
|
+
{ "name": "--dry-run", "description": "Strategy for dry-run (none|server|client)", "type": "string" },
|
|
311
|
+
{ "name": "--output", "short": "-o", "description": "Output format", "type": "string" },
|
|
312
|
+
{ "name": "--save-config", "description": "Save the configuration in annotation" }
|
|
313
|
+
],
|
|
314
|
+
"examples": [
|
|
315
|
+
"kubectl create namespace staging",
|
|
316
|
+
"kubectl create namespace production",
|
|
317
|
+
"kubectl create ns my-namespace --dry-run=client -o yaml"
|
|
318
|
+
]
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"name": "create configmap",
|
|
322
|
+
"description": "Create a configmap from literal values, files, or directories",
|
|
323
|
+
"args": [
|
|
324
|
+
{ "name": "<name>", "type": "string", "required": true, "description": "ConfigMap name" }
|
|
325
|
+
],
|
|
326
|
+
"options": [
|
|
327
|
+
{ "name": "--from-literal", "description": "Key-value pair (key=value)", "type": "string" },
|
|
328
|
+
{ "name": "--from-file", "description": "File or directory to populate configmap from", "type": "path" },
|
|
329
|
+
{ "name": "--from-env-file", "description": "Env file to populate configmap from", "type": "path" },
|
|
330
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
331
|
+
{ "name": "--dry-run", "description": "Strategy for dry-run (none|server|client)", "type": "string" },
|
|
332
|
+
{ "name": "--output", "short": "-o", "description": "Output format", "type": "string" },
|
|
333
|
+
{ "name": "--append-hash", "description": "Append a hash to the configmap name" }
|
|
334
|
+
],
|
|
335
|
+
"examples": [
|
|
336
|
+
"kubectl create configmap my-config --from-literal=key1=value1 --from-literal=key2=value2",
|
|
337
|
+
"kubectl create configmap my-config --from-file=config.properties",
|
|
338
|
+
"kubectl create configmap my-config --from-file=./configs/",
|
|
339
|
+
"kubectl create configmap my-config --from-env-file=.env",
|
|
340
|
+
"kubectl create configmap my-config --from-literal=DB_HOST=db.example.com -n production",
|
|
341
|
+
"kubectl create configmap my-config --from-file=key=path/to/file --dry-run=client -o yaml"
|
|
342
|
+
]
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"name": "create secret generic",
|
|
346
|
+
"description": "Create a secret from literal values, files, or directories",
|
|
347
|
+
"args": [
|
|
348
|
+
{ "name": "<name>", "type": "string", "required": true, "description": "Secret name" }
|
|
349
|
+
],
|
|
350
|
+
"options": [
|
|
351
|
+
{ "name": "--from-literal", "description": "Key-value pair (key=value)", "type": "string" },
|
|
352
|
+
{ "name": "--from-file", "description": "File to populate secret from", "type": "path" },
|
|
353
|
+
{ "name": "--from-env-file", "description": "Env file to populate secret from", "type": "path" },
|
|
354
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
355
|
+
{ "name": "--type", "description": "Secret type (Opaque|kubernetes.io/tls|etc.)", "type": "string" },
|
|
356
|
+
{ "name": "--dry-run", "description": "Strategy for dry-run (none|server|client)", "type": "string" },
|
|
357
|
+
{ "name": "--output", "short": "-o", "description": "Output format", "type": "string" },
|
|
358
|
+
{ "name": "--append-hash", "description": "Append a hash to the secret name" }
|
|
359
|
+
],
|
|
360
|
+
"examples": [
|
|
361
|
+
"kubectl create secret generic my-secret --from-literal=username=admin --from-literal=password=secret123",
|
|
362
|
+
"kubectl create secret generic my-secret --from-file=ssh-privatekey=~/.ssh/id_rsa",
|
|
363
|
+
"kubectl create secret generic my-secret --from-env-file=.env",
|
|
364
|
+
"kubectl create secret generic my-secret --from-literal=password=s3cr3t -n production",
|
|
365
|
+
"kubectl create secret generic db-creds --from-literal=DB_PASSWORD=pass --dry-run=client -o yaml"
|
|
366
|
+
]
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"name": "create secret tls",
|
|
370
|
+
"description": "Create a TLS secret from a certificate and key pair",
|
|
371
|
+
"args": [
|
|
372
|
+
{ "name": "<name>", "type": "string", "required": true, "description": "Secret name" }
|
|
373
|
+
],
|
|
374
|
+
"options": [
|
|
375
|
+
{ "name": "--cert", "description": "Path to TLS certificate file", "type": "path" },
|
|
376
|
+
{ "name": "--key", "description": "Path to TLS private key file", "type": "path" },
|
|
377
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
378
|
+
{ "name": "--dry-run", "description": "Strategy for dry-run (none|server|client)", "type": "string" },
|
|
379
|
+
{ "name": "--output", "short": "-o", "description": "Output format", "type": "string" }
|
|
380
|
+
],
|
|
381
|
+
"examples": [
|
|
382
|
+
"kubectl create secret tls my-tls --cert=tls.crt --key=tls.key",
|
|
383
|
+
"kubectl create secret tls my-tls --cert=cert.pem --key=key.pem -n production"
|
|
384
|
+
]
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"name": "edit",
|
|
388
|
+
"description": "Edit a resource on the server using the default editor",
|
|
389
|
+
"args": [
|
|
390
|
+
{ "name": "<resource>", "type": "string", "required": true, "description": "Resource type" },
|
|
391
|
+
{ "name": "<name>", "type": "string", "required": true, "description": "Resource name" }
|
|
392
|
+
],
|
|
393
|
+
"options": [
|
|
394
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
395
|
+
{ "name": "--output", "short": "-o", "description": "Output format for the saved resource", "type": "string" },
|
|
396
|
+
{ "name": "--save-config", "description": "Save the configuration in annotation" },
|
|
397
|
+
{ "name": "--validate", "description": "Validation mode (strict|warn|ignore)", "type": "string" },
|
|
398
|
+
{ "name": "--windows-line-endings", "description": "Use Windows line endings" },
|
|
399
|
+
{ "name": "--field-manager", "description": "Name of the field manager used for server-side apply", "type": "string" },
|
|
400
|
+
{ "name": "--subresource", "description": "Subresource to edit (e.g. status)", "type": "string" }
|
|
401
|
+
],
|
|
402
|
+
"examples": [
|
|
403
|
+
"kubectl edit deployment my-app",
|
|
404
|
+
"kubectl edit svc my-service -n production",
|
|
405
|
+
"kubectl edit configmap my-config",
|
|
406
|
+
"kubectl edit pod my-pod",
|
|
407
|
+
"KUBE_EDITOR=nano kubectl edit deployment my-app",
|
|
408
|
+
"kubectl edit deployment my-app -o json"
|
|
409
|
+
]
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"name": "scale",
|
|
413
|
+
"description": "Set a new size for a deployment, replica set, or stateful set",
|
|
414
|
+
"args": [
|
|
415
|
+
{ "name": "<resource>", "type": "string", "required": true, "description": "Resource to scale (e.g. deployment/my-app)" }
|
|
416
|
+
],
|
|
417
|
+
"options": [
|
|
418
|
+
{ "name": "--replicas", "description": "Target number of replicas", "type": "number" },
|
|
419
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
420
|
+
{ "name": "--current-replicas", "description": "Precondition for expected current replica count", "type": "number" },
|
|
421
|
+
{ "name": "--resource-version", "description": "Precondition for expected resource version", "type": "string" },
|
|
422
|
+
{ "name": "--timeout", "description": "Timeout for waiting for the scaling to complete", "type": "string" },
|
|
423
|
+
{ "name": "--all", "description": "Select all resources of the specified type" },
|
|
424
|
+
{ "name": "--selector", "short": "-l", "description": "Label selector to filter", "type": "string" },
|
|
425
|
+
{ "name": "--dry-run", "description": "Strategy for dry-run (none|server|client)", "type": "string" }
|
|
426
|
+
],
|
|
427
|
+
"examples": [
|
|
428
|
+
"kubectl scale deployment my-app --replicas=5",
|
|
429
|
+
"kubectl scale deployment my-app --replicas=3 -n production",
|
|
430
|
+
"kubectl scale --replicas=0 deployment/my-app",
|
|
431
|
+
"kubectl scale deployment my-app --current-replicas=3 --replicas=5",
|
|
432
|
+
"kubectl scale statefulset my-db --replicas=3",
|
|
433
|
+
"kubectl scale --replicas=2 -f deployment.yaml",
|
|
434
|
+
"kubectl scale deployment -l app=web --replicas=2"
|
|
435
|
+
]
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"name": "rollout status",
|
|
439
|
+
"description": "Show the status of a rollout",
|
|
440
|
+
"args": [
|
|
441
|
+
{ "name": "<resource>", "type": "string", "required": true, "description": "Resource (e.g. deployment/my-app)" }
|
|
442
|
+
],
|
|
443
|
+
"options": [
|
|
444
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
445
|
+
{ "name": "--watch", "short": "-w", "description": "Watch the rollout status until done (default true)" },
|
|
446
|
+
{ "name": "--revision", "description": "Pin to a specific revision for showing status", "type": "number" },
|
|
447
|
+
{ "name": "--timeout", "description": "Timeout for watch", "type": "string" }
|
|
448
|
+
],
|
|
449
|
+
"examples": [
|
|
450
|
+
"kubectl rollout status deployment/my-app",
|
|
451
|
+
"kubectl rollout status deployment/my-app -n production",
|
|
452
|
+
"kubectl rollout status deployment/my-app --timeout=5m",
|
|
453
|
+
"kubectl rollout status daemonset/my-ds"
|
|
454
|
+
]
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"name": "rollout history",
|
|
458
|
+
"description": "View rollout history of a resource",
|
|
459
|
+
"args": [
|
|
460
|
+
{ "name": "<resource>", "type": "string", "required": true, "description": "Resource (e.g. deployment/my-app)" }
|
|
461
|
+
],
|
|
462
|
+
"options": [
|
|
463
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
464
|
+
{ "name": "--revision", "description": "See details of a specific revision", "type": "number" }
|
|
465
|
+
],
|
|
466
|
+
"examples": [
|
|
467
|
+
"kubectl rollout history deployment/my-app",
|
|
468
|
+
"kubectl rollout history deployment/my-app --revision=3",
|
|
469
|
+
"kubectl rollout history deployment/my-app -n production"
|
|
470
|
+
]
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
"name": "rollout undo",
|
|
474
|
+
"description": "Undo a previous rollout",
|
|
475
|
+
"args": [
|
|
476
|
+
{ "name": "<resource>", "type": "string", "required": true, "description": "Resource (e.g. deployment/my-app)" }
|
|
477
|
+
],
|
|
478
|
+
"options": [
|
|
479
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
480
|
+
{ "name": "--to-revision", "description": "Revision number to rollback to (0 = previous)", "type": "number" },
|
|
481
|
+
{ "name": "--dry-run", "description": "Strategy for dry-run (none|server|client)", "type": "string" }
|
|
482
|
+
],
|
|
483
|
+
"examples": [
|
|
484
|
+
"kubectl rollout undo deployment/my-app",
|
|
485
|
+
"kubectl rollout undo deployment/my-app --to-revision=2",
|
|
486
|
+
"kubectl rollout undo deployment/my-app -n production",
|
|
487
|
+
"kubectl rollout undo daemonset/my-ds"
|
|
488
|
+
]
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
"name": "rollout restart",
|
|
492
|
+
"description": "Restart a resource (triggers a rolling restart)",
|
|
493
|
+
"args": [
|
|
494
|
+
{ "name": "<resource>", "type": "string", "required": true, "description": "Resource (e.g. deployment/my-app)" }
|
|
495
|
+
],
|
|
496
|
+
"options": [
|
|
497
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
498
|
+
{ "name": "--selector", "short": "-l", "description": "Label selector to filter", "type": "string" },
|
|
499
|
+
{ "name": "--field-manager", "description": "Name of the field manager", "type": "string" }
|
|
500
|
+
],
|
|
501
|
+
"examples": [
|
|
502
|
+
"kubectl rollout restart deployment/my-app",
|
|
503
|
+
"kubectl rollout restart deployment/my-app -n production",
|
|
504
|
+
"kubectl rollout restart daemonset/my-ds",
|
|
505
|
+
"kubectl rollout restart deployment -l app=web"
|
|
506
|
+
]
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
"name": "expose",
|
|
510
|
+
"description": "Expose a resource as a new Kubernetes service",
|
|
511
|
+
"args": [
|
|
512
|
+
{ "name": "<resource>", "type": "string", "required": true, "description": "Resource to expose (e.g. deployment/my-app)" }
|
|
513
|
+
],
|
|
514
|
+
"options": [
|
|
515
|
+
{ "name": "--port", "description": "Port the service should listen on", "type": "number" },
|
|
516
|
+
{ "name": "--target-port", "description": "Port on the container to route to", "type": "string" },
|
|
517
|
+
{ "name": "--protocol", "description": "Protocol (TCP|UDP|SCTP)", "type": "string" },
|
|
518
|
+
{ "name": "--type", "description": "Service type (ClusterIP|NodePort|LoadBalancer|ExternalName)", "type": "string" },
|
|
519
|
+
{ "name": "--name", "description": "Name for the new service", "type": "string" },
|
|
520
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
521
|
+
{ "name": "--selector", "description": "Label selector to identify pods", "type": "string" },
|
|
522
|
+
{ "name": "--external-ip", "description": "External IP address to set for the service", "type": "string" },
|
|
523
|
+
{ "name": "--cluster-ip", "description": "ClusterIP to assign ('' for auto, 'None' for headless)", "type": "string" },
|
|
524
|
+
{ "name": "--session-affinity", "description": "Session affinity (None|ClientIP)", "type": "string" },
|
|
525
|
+
{ "name": "--dry-run", "description": "Strategy for dry-run (none|server|client)", "type": "string" },
|
|
526
|
+
{ "name": "--output", "short": "-o", "description": "Output format", "type": "string" }
|
|
527
|
+
],
|
|
528
|
+
"examples": [
|
|
529
|
+
"kubectl expose deployment my-app --port=80 --target-port=8080",
|
|
530
|
+
"kubectl expose deployment my-app --type=LoadBalancer --port=80",
|
|
531
|
+
"kubectl expose deployment my-app --type=NodePort --port=80 --target-port=8080",
|
|
532
|
+
"kubectl expose pod my-pod --port=80 --name=my-service",
|
|
533
|
+
"kubectl expose deployment my-app --port=80 --dry-run=client -o yaml"
|
|
534
|
+
]
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
"name": "run",
|
|
538
|
+
"description": "Create and run a particular image in a pod",
|
|
539
|
+
"args": [
|
|
540
|
+
{ "name": "<name>", "type": "string", "required": true, "description": "Name for the pod" }
|
|
541
|
+
],
|
|
542
|
+
"options": [
|
|
543
|
+
{ "name": "--image", "description": "Container image to run", "type": "string" },
|
|
544
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
545
|
+
{ "name": "--port", "description": "Container port to expose", "type": "number" },
|
|
546
|
+
{ "name": "--env", "description": "Environment variables (key=value)", "type": "string" },
|
|
547
|
+
{ "name": "--labels", "short": "-l", "description": "Labels to apply (key=value pairs)", "type": "string" },
|
|
548
|
+
{ "name": "--command", "description": "Use command mode (pass command and args after --)" },
|
|
549
|
+
{ "name": "--stdin", "short": "-i", "description": "Keep stdin open" },
|
|
550
|
+
{ "name": "--tty", "short": "-t", "description": "Allocate a TTY" },
|
|
551
|
+
{ "name": "--rm", "description": "Delete pod after it exits (with --attach or --stdin)" },
|
|
552
|
+
{ "name": "--attach", "description": "Wait for the pod to start and attach to it" },
|
|
553
|
+
{ "name": "--restart", "description": "Restart policy (Always|OnFailure|Never)", "type": "string" },
|
|
554
|
+
{ "name": "--serviceaccount", "description": "Service account name", "type": "string" },
|
|
555
|
+
{ "name": "--overrides", "description": "JSON override for the generated object", "type": "string" },
|
|
556
|
+
{ "name": "--image-pull-policy", "description": "Image pull policy (Always|IfNotPresent|Never)", "type": "string" },
|
|
557
|
+
{ "name": "--dry-run", "description": "Strategy for dry-run (none|server|client)", "type": "string" },
|
|
558
|
+
{ "name": "--output", "short": "-o", "description": "Output format", "type": "string" },
|
|
559
|
+
{ "name": "--requests", "description": "Resource requests (cpu=100m,memory=256Mi)", "type": "string" },
|
|
560
|
+
{ "name": "--limits", "description": "Resource limits (cpu=200m,memory=512Mi)", "type": "string" }
|
|
561
|
+
],
|
|
562
|
+
"examples": [
|
|
563
|
+
"kubectl run nginx --image=nginx",
|
|
564
|
+
"kubectl run my-shell --image=busybox -it --rm -- /bin/sh",
|
|
565
|
+
"kubectl run curl-test --image=curlimages/curl -it --rm -- curl http://my-service",
|
|
566
|
+
"kubectl run my-app --image=myapp:v1 --port=8080 --env=ENV=production",
|
|
567
|
+
"kubectl run debug --image=alpine -it --rm -- sh",
|
|
568
|
+
"kubectl run my-pod --image=nginx --dry-run=client -o yaml",
|
|
569
|
+
"kubectl run my-pod --image=nginx --restart=Never",
|
|
570
|
+
"kubectl run load-gen --image=busybox --restart=Never -- /bin/sh -c 'while true; do wget -qO- http://my-svc; done'"
|
|
571
|
+
]
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
"name": "attach",
|
|
575
|
+
"description": "Attach to a process that is already running inside an existing container",
|
|
576
|
+
"args": [
|
|
577
|
+
{ "name": "<pod>", "type": "string", "required": true, "description": "Pod name" }
|
|
578
|
+
],
|
|
579
|
+
"options": [
|
|
580
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
581
|
+
{ "name": "--container", "short": "-c", "description": "Container name", "type": "string" },
|
|
582
|
+
{ "name": "--stdin", "short": "-i", "description": "Pass stdin to the container" },
|
|
583
|
+
{ "name": "--tty", "short": "-t", "description": "Allocate a TTY" },
|
|
584
|
+
{ "name": "--quiet", "short": "-q", "description": "Only print output from the remote session" }
|
|
585
|
+
],
|
|
586
|
+
"examples": [
|
|
587
|
+
"kubectl attach my-pod -it",
|
|
588
|
+
"kubectl attach my-pod -c my-container -it",
|
|
589
|
+
"kubectl attach my-pod -n production"
|
|
590
|
+
]
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
"name": "cp",
|
|
594
|
+
"description": "Copy files and directories to and from containers",
|
|
595
|
+
"args": [
|
|
596
|
+
{ "name": "<src>", "type": "string", "required": true, "description": "Source (local path or pod:path)" },
|
|
597
|
+
{ "name": "<dest>", "type": "string", "required": true, "description": "Destination (local path or pod:path)" }
|
|
598
|
+
],
|
|
599
|
+
"options": [
|
|
600
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
601
|
+
{ "name": "--container", "short": "-c", "description": "Container name", "type": "string" },
|
|
602
|
+
{ "name": "--no-preserve", "description": "Do not preserve ownership and permissions" },
|
|
603
|
+
{ "name": "--retries", "description": "Number of retries on network errors", "type": "number" }
|
|
604
|
+
],
|
|
605
|
+
"examples": [
|
|
606
|
+
"kubectl cp ./local-file.txt my-pod:/tmp/remote-file.txt",
|
|
607
|
+
"kubectl cp my-pod:/var/log/app.log ./app.log",
|
|
608
|
+
"kubectl cp my-pod:/data ./local-data/ -n production",
|
|
609
|
+
"kubectl cp ./config.yaml my-pod:/etc/app/config.yaml -c app-container",
|
|
610
|
+
"kubectl cp my-namespace/my-pod:/tmp/data ./data"
|
|
611
|
+
]
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
"name": "top nodes",
|
|
615
|
+
"description": "Display resource (CPU/memory) usage of nodes",
|
|
616
|
+
"args": [
|
|
617
|
+
{ "name": "<name>", "type": "string", "required": false, "description": "Node name" }
|
|
618
|
+
],
|
|
619
|
+
"options": [
|
|
620
|
+
{ "name": "--selector", "short": "-l", "description": "Label selector", "type": "string" },
|
|
621
|
+
{ "name": "--sort-by", "description": "Sort by field (cpu|memory)", "type": "string" },
|
|
622
|
+
{ "name": "--no-headers", "description": "Do not print column headers" },
|
|
623
|
+
{ "name": "--show-capacity", "description": "Show node resource capacity in addition to usage" },
|
|
624
|
+
{ "name": "--use-protocol-buffers", "description": "Use protocol buffers to access Metrics API" }
|
|
625
|
+
],
|
|
626
|
+
"examples": [
|
|
627
|
+
"kubectl top nodes",
|
|
628
|
+
"kubectl top node worker-1",
|
|
629
|
+
"kubectl top nodes --sort-by=cpu",
|
|
630
|
+
"kubectl top nodes --sort-by=memory",
|
|
631
|
+
"kubectl top nodes -l role=worker"
|
|
632
|
+
]
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
"name": "top pods",
|
|
636
|
+
"description": "Display resource (CPU/memory) usage of pods",
|
|
637
|
+
"args": [
|
|
638
|
+
{ "name": "<name>", "type": "string", "required": false, "description": "Pod name" }
|
|
639
|
+
],
|
|
640
|
+
"options": [
|
|
641
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
642
|
+
{ "name": "--all-namespaces", "short": "-A", "description": "Show pods across all namespaces" },
|
|
643
|
+
{ "name": "--containers", "description": "Show metrics per container" },
|
|
644
|
+
{ "name": "--selector", "short": "-l", "description": "Label selector", "type": "string" },
|
|
645
|
+
{ "name": "--sort-by", "description": "Sort by field (cpu|memory)", "type": "string" },
|
|
646
|
+
{ "name": "--no-headers", "description": "Do not print column headers" },
|
|
647
|
+
{ "name": "--sum", "description": "Print sum of resource usage" },
|
|
648
|
+
{ "name": "--use-protocol-buffers", "description": "Use protocol buffers to access Metrics API" }
|
|
649
|
+
],
|
|
650
|
+
"examples": [
|
|
651
|
+
"kubectl top pods",
|
|
652
|
+
"kubectl top pods -A",
|
|
653
|
+
"kubectl top pods -n kube-system",
|
|
654
|
+
"kubectl top pods --sort-by=cpu",
|
|
655
|
+
"kubectl top pods --sort-by=memory",
|
|
656
|
+
"kubectl top pods --containers",
|
|
657
|
+
"kubectl top pod my-pod -n production",
|
|
658
|
+
"kubectl top pods -l app=web --sum"
|
|
659
|
+
]
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
"name": "config view",
|
|
663
|
+
"description": "Display merged kubeconfig settings or a specified kubeconfig file",
|
|
664
|
+
"args": [],
|
|
665
|
+
"options": [
|
|
666
|
+
{ "name": "--minify", "description": "Remove info not used by current-context" },
|
|
667
|
+
{ "name": "--raw", "description": "Display raw byte data and sensitive fields" },
|
|
668
|
+
{ "name": "--flatten", "description": "Flatten the resulting kubeconfig file" },
|
|
669
|
+
{ "name": "--output", "short": "-o", "description": "Output format (json|yaml)", "type": "string" },
|
|
670
|
+
{ "name": "--merge", "description": "Merge the full kubeconfig hierarchy (default true)" }
|
|
671
|
+
],
|
|
672
|
+
"examples": [
|
|
673
|
+
"kubectl config view",
|
|
674
|
+
"kubectl config view --minify",
|
|
675
|
+
"kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}'",
|
|
676
|
+
"kubectl config view -o json",
|
|
677
|
+
"kubectl config view --raw",
|
|
678
|
+
"kubectl config view --flatten > merged-kubeconfig.yaml"
|
|
679
|
+
]
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
"name": "config use-context",
|
|
683
|
+
"description": "Set the current context in kubeconfig",
|
|
684
|
+
"args": [
|
|
685
|
+
{ "name": "<context>", "type": "string", "required": true, "description": "Context name" }
|
|
686
|
+
],
|
|
687
|
+
"options": [],
|
|
688
|
+
"examples": [
|
|
689
|
+
"kubectl config use-context production",
|
|
690
|
+
"kubectl config use-context minikube",
|
|
691
|
+
"kubectl config use-context docker-desktop",
|
|
692
|
+
"kubectl config use-context arn:aws:eks:us-west-2:123456789:cluster/my-cluster"
|
|
693
|
+
]
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
"name": "config get-contexts",
|
|
697
|
+
"description": "Display one or many contexts from the kubeconfig file",
|
|
698
|
+
"args": [
|
|
699
|
+
{ "name": "<context>", "type": "string", "required": false, "description": "Context name" }
|
|
700
|
+
],
|
|
701
|
+
"options": [
|
|
702
|
+
{ "name": "--output", "short": "-o", "description": "Output format (name)", "type": "string" },
|
|
703
|
+
{ "name": "--no-headers", "description": "Do not print column headers" }
|
|
704
|
+
],
|
|
705
|
+
"examples": [
|
|
706
|
+
"kubectl config get-contexts",
|
|
707
|
+
"kubectl config get-contexts -o name",
|
|
708
|
+
"kubectl config get-contexts my-context"
|
|
709
|
+
]
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
"name": "config set-context",
|
|
713
|
+
"description": "Set a context entry in kubeconfig",
|
|
714
|
+
"args": [
|
|
715
|
+
{ "name": "<context>", "type": "string", "required": true, "description": "Context name" }
|
|
716
|
+
],
|
|
717
|
+
"options": [
|
|
718
|
+
{ "name": "--current", "description": "Modify the current context" },
|
|
719
|
+
{ "name": "--cluster", "description": "Cluster for the context entry", "type": "string" },
|
|
720
|
+
{ "name": "--user", "description": "User for the context entry", "type": "string" },
|
|
721
|
+
{ "name": "--namespace", "description": "Default namespace for the context entry", "type": "string" }
|
|
722
|
+
],
|
|
723
|
+
"examples": [
|
|
724
|
+
"kubectl config set-context --current --namespace=production",
|
|
725
|
+
"kubectl config set-context my-context --namespace=staging",
|
|
726
|
+
"kubectl config set-context my-context --cluster=my-cluster --user=admin --namespace=default"
|
|
727
|
+
]
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
"name": "config current-context",
|
|
731
|
+
"description": "Display the current context from kubeconfig",
|
|
732
|
+
"args": [],
|
|
733
|
+
"options": [],
|
|
734
|
+
"examples": [
|
|
735
|
+
"kubectl config current-context"
|
|
736
|
+
]
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
"name": "label",
|
|
740
|
+
"description": "Update the labels on a resource",
|
|
741
|
+
"args": [
|
|
742
|
+
{ "name": "<resource>", "type": "string", "required": true, "description": "Resource type" },
|
|
743
|
+
{ "name": "<name>", "type": "string", "required": true, "description": "Resource name" },
|
|
744
|
+
{ "name": "<labels>", "type": "string", "required": true, "description": "Label key=value pairs (use key- to remove)" }
|
|
745
|
+
],
|
|
746
|
+
"options": [
|
|
747
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
748
|
+
{ "name": "--overwrite", "description": "Overwrite existing label values" },
|
|
749
|
+
{ "name": "--all", "description": "Select all resources of the specified type" },
|
|
750
|
+
{ "name": "--selector", "short": "-l", "description": "Label selector to filter", "type": "string" },
|
|
751
|
+
{ "name": "--resource-version", "description": "Precondition for resource version", "type": "string" },
|
|
752
|
+
{ "name": "--dry-run", "description": "Strategy for dry-run (none|server|client)", "type": "string" },
|
|
753
|
+
{ "name": "--list", "description": "List current labels for the resource" },
|
|
754
|
+
{ "name": "--field-manager", "description": "Name of the field manager", "type": "string" }
|
|
755
|
+
],
|
|
756
|
+
"examples": [
|
|
757
|
+
"kubectl label pod my-pod app=web",
|
|
758
|
+
"kubectl label pod my-pod env=production --overwrite",
|
|
759
|
+
"kubectl label pod my-pod app-",
|
|
760
|
+
"kubectl label nodes worker-1 disktype=ssd",
|
|
761
|
+
"kubectl label pods --all status=healthy -n staging",
|
|
762
|
+
"kubectl label pod my-pod tier=frontend env=prod"
|
|
763
|
+
]
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
"name": "annotate",
|
|
767
|
+
"description": "Update the annotations on a resource",
|
|
768
|
+
"args": [
|
|
769
|
+
{ "name": "<resource>", "type": "string", "required": true, "description": "Resource type" },
|
|
770
|
+
{ "name": "<name>", "type": "string", "required": true, "description": "Resource name" },
|
|
771
|
+
{ "name": "<annotations>", "type": "string", "required": true, "description": "Annotation key=value pairs (use key- to remove)" }
|
|
772
|
+
],
|
|
773
|
+
"options": [
|
|
774
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
775
|
+
{ "name": "--overwrite", "description": "Overwrite existing annotation values" },
|
|
776
|
+
{ "name": "--all", "description": "Select all resources of the specified type" },
|
|
777
|
+
{ "name": "--selector", "short": "-l", "description": "Label selector to filter", "type": "string" },
|
|
778
|
+
{ "name": "--resource-version", "description": "Precondition for resource version", "type": "string" },
|
|
779
|
+
{ "name": "--dry-run", "description": "Strategy for dry-run (none|server|client)", "type": "string" },
|
|
780
|
+
{ "name": "--list", "description": "List current annotations" },
|
|
781
|
+
{ "name": "--field-manager", "description": "Name of the field manager", "type": "string" }
|
|
782
|
+
],
|
|
783
|
+
"examples": [
|
|
784
|
+
"kubectl annotate pod my-pod description='My web server'",
|
|
785
|
+
"kubectl annotate pod my-pod description-",
|
|
786
|
+
"kubectl annotate deployment my-app kubernetes.io/change-cause='image update to v2'",
|
|
787
|
+
"kubectl annotate nodes worker-1 node-role=worker --overwrite",
|
|
788
|
+
"kubectl annotate --all pods owner=team-a -n staging"
|
|
789
|
+
]
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
"name": "patch",
|
|
793
|
+
"description": "Update fields of a resource using strategic merge, JSON merge, or JSON patch",
|
|
794
|
+
"args": [
|
|
795
|
+
{ "name": "<resource>", "type": "string", "required": true, "description": "Resource type" },
|
|
796
|
+
{ "name": "<name>", "type": "string", "required": true, "description": "Resource name" }
|
|
797
|
+
],
|
|
798
|
+
"options": [
|
|
799
|
+
{ "name": "--patch", "short": "-p", "description": "The patch content (JSON or YAML)", "type": "string" },
|
|
800
|
+
{ "name": "--patch-file", "description": "Path to a file containing the patch", "type": "path" },
|
|
801
|
+
{ "name": "--type", "description": "Patch type (strategic|merge|json)", "type": "string" },
|
|
802
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
803
|
+
{ "name": "--dry-run", "description": "Strategy for dry-run (none|server|client)", "type": "string" },
|
|
804
|
+
{ "name": "--output", "short": "-o", "description": "Output format", "type": "string" },
|
|
805
|
+
{ "name": "--record", "description": "Record command in resource annotation" },
|
|
806
|
+
{ "name": "--field-manager", "description": "Name of the field manager", "type": "string" },
|
|
807
|
+
{ "name": "--subresource", "description": "Subresource to patch (e.g. status, scale)", "type": "string" }
|
|
808
|
+
],
|
|
809
|
+
"examples": [
|
|
810
|
+
"kubectl patch deployment my-app -p '{\"spec\":{\"replicas\":5}}'",
|
|
811
|
+
"kubectl patch svc my-service -p '{\"spec\":{\"type\":\"LoadBalancer\"}}'",
|
|
812
|
+
"kubectl patch node worker-1 -p '{\"spec\":{\"unschedulable\":true}}'",
|
|
813
|
+
"kubectl patch deployment my-app --type=json -p '[{\"op\":\"replace\",\"path\":\"/spec/replicas\",\"value\":3}]'",
|
|
814
|
+
"kubectl patch deployment my-app -p '{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"name\":\"app\",\"image\":\"myapp:v2\"}]}}}}'",
|
|
815
|
+
"kubectl patch deployment my-app --patch-file patch.yaml",
|
|
816
|
+
"kubectl patch deployment my-app --type=merge -p '{\"spec\":{\"replicas\":2}}' -n production"
|
|
817
|
+
]
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
"name": "taint",
|
|
821
|
+
"description": "Update the taints on one or more nodes",
|
|
822
|
+
"args": [
|
|
823
|
+
{ "name": "<node>", "type": "string", "required": true, "description": "Node name" },
|
|
824
|
+
{ "name": "<taints>", "type": "string", "required": true, "description": "Taint key=value:effect (NoSchedule|PreferNoSchedule|NoExecute)" }
|
|
825
|
+
],
|
|
826
|
+
"options": [
|
|
827
|
+
{ "name": "--all", "description": "Taint all nodes" },
|
|
828
|
+
{ "name": "--overwrite", "description": "Overwrite existing taints with matching key" },
|
|
829
|
+
{ "name": "--selector", "short": "-l", "description": "Label selector to filter nodes", "type": "string" },
|
|
830
|
+
{ "name": "--dry-run", "description": "Strategy for dry-run (none|server|client)", "type": "string" },
|
|
831
|
+
{ "name": "--output", "short": "-o", "description": "Output format", "type": "string" }
|
|
832
|
+
],
|
|
833
|
+
"examples": [
|
|
834
|
+
"kubectl taint nodes worker-1 key=value:NoSchedule",
|
|
835
|
+
"kubectl taint nodes worker-1 dedicated=gpu:NoSchedule",
|
|
836
|
+
"kubectl taint nodes worker-1 key=value:NoSchedule-",
|
|
837
|
+
"kubectl taint nodes worker-1 key:NoSchedule-",
|
|
838
|
+
"kubectl taint nodes --all key=value:NoSchedule",
|
|
839
|
+
"kubectl taint nodes worker-1 special=true:NoExecute"
|
|
840
|
+
]
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
"name": "cordon",
|
|
844
|
+
"description": "Mark a node as unschedulable",
|
|
845
|
+
"args": [
|
|
846
|
+
{ "name": "<node>", "type": "string", "required": true, "description": "Node name" }
|
|
847
|
+
],
|
|
848
|
+
"options": [
|
|
849
|
+
{ "name": "--selector", "short": "-l", "description": "Label selector to filter nodes", "type": "string" },
|
|
850
|
+
{ "name": "--dry-run", "description": "Strategy for dry-run (none|server|client)", "type": "string" }
|
|
851
|
+
],
|
|
852
|
+
"examples": [
|
|
853
|
+
"kubectl cordon worker-1",
|
|
854
|
+
"kubectl cordon worker-1 worker-2",
|
|
855
|
+
"kubectl cordon -l role=worker"
|
|
856
|
+
]
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
"name": "uncordon",
|
|
860
|
+
"description": "Mark a node as schedulable",
|
|
861
|
+
"args": [
|
|
862
|
+
{ "name": "<node>", "type": "string", "required": true, "description": "Node name" }
|
|
863
|
+
],
|
|
864
|
+
"options": [
|
|
865
|
+
{ "name": "--selector", "short": "-l", "description": "Label selector to filter nodes", "type": "string" },
|
|
866
|
+
{ "name": "--dry-run", "description": "Strategy for dry-run (none|server|client)", "type": "string" }
|
|
867
|
+
],
|
|
868
|
+
"examples": [
|
|
869
|
+
"kubectl uncordon worker-1",
|
|
870
|
+
"kubectl uncordon worker-1 worker-2",
|
|
871
|
+
"kubectl uncordon -l role=worker"
|
|
872
|
+
]
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
"name": "drain",
|
|
876
|
+
"description": "Drain a node in preparation for maintenance",
|
|
877
|
+
"args": [
|
|
878
|
+
{ "name": "<node>", "type": "string", "required": true, "description": "Node name" }
|
|
879
|
+
],
|
|
880
|
+
"options": [
|
|
881
|
+
{ "name": "--force", "description": "Continue even if there are pods not managed by a controller" },
|
|
882
|
+
{ "name": "--grace-period", "description": "Seconds to wait for pod termination", "type": "number" },
|
|
883
|
+
{ "name": "--ignore-daemonsets", "description": "Ignore DaemonSet-managed pods" },
|
|
884
|
+
{ "name": "--delete-emptydir-data", "description": "Continue even if there are pods using emptyDir" },
|
|
885
|
+
{ "name": "--timeout", "description": "Time to wait before giving up", "type": "string" },
|
|
886
|
+
{ "name": "--selector", "short": "-l", "description": "Label selector to filter nodes", "type": "string" },
|
|
887
|
+
{ "name": "--pod-selector", "description": "Label selector to filter pods on the node", "type": "string" },
|
|
888
|
+
{ "name": "--disable-eviction", "description": "Force drain using delete even if eviction is supported" },
|
|
889
|
+
{ "name": "--skip-wait-for-delete-timeout", "description": "Skip waiting for pods with DeletionTimestamp > N seconds", "type": "number" },
|
|
890
|
+
{ "name": "--dry-run", "description": "Strategy for dry-run (none|server|client)", "type": "string" },
|
|
891
|
+
{ "name": "--chunk-size", "description": "Number of pods processed at once during eviction", "type": "number" }
|
|
892
|
+
],
|
|
893
|
+
"examples": [
|
|
894
|
+
"kubectl drain worker-1",
|
|
895
|
+
"kubectl drain worker-1 --ignore-daemonsets",
|
|
896
|
+
"kubectl drain worker-1 --ignore-daemonsets --delete-emptydir-data",
|
|
897
|
+
"kubectl drain worker-1 --force --grace-period=0",
|
|
898
|
+
"kubectl drain worker-1 --ignore-daemonsets --timeout=300s",
|
|
899
|
+
"kubectl drain worker-1 --ignore-daemonsets --dry-run=client"
|
|
900
|
+
]
|
|
901
|
+
},
|
|
902
|
+
{
|
|
903
|
+
"name": "api-resources",
|
|
904
|
+
"description": "Print the supported API resources on the server",
|
|
905
|
+
"args": [],
|
|
906
|
+
"options": [
|
|
907
|
+
{ "name": "--api-group", "description": "Limit to resources in the specified API group", "type": "string" },
|
|
908
|
+
{ "name": "--namespaced", "description": "If false, non-namespaced resources are listed; if true, namespaced resources (default true)" },
|
|
909
|
+
{ "name": "--verbs", "description": "Limit output to resources that support specified verbs", "type": "string" },
|
|
910
|
+
{ "name": "--sort-by", "description": "Sort by field (name|kind)", "type": "string" },
|
|
911
|
+
{ "name": "--output", "short": "-o", "description": "Output format (wide|name)", "type": "string" },
|
|
912
|
+
{ "name": "--no-headers", "description": "Do not print column headers" },
|
|
913
|
+
{ "name": "--cached", "description": "Use the cached list of resources" }
|
|
914
|
+
],
|
|
915
|
+
"examples": [
|
|
916
|
+
"kubectl api-resources",
|
|
917
|
+
"kubectl api-resources --namespaced=true",
|
|
918
|
+
"kubectl api-resources --namespaced=false",
|
|
919
|
+
"kubectl api-resources -o name",
|
|
920
|
+
"kubectl api-resources --verbs=list,get",
|
|
921
|
+
"kubectl api-resources --api-group=apps",
|
|
922
|
+
"kubectl api-resources -o wide"
|
|
923
|
+
]
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
"name": "api-versions",
|
|
927
|
+
"description": "Print the supported API versions on the server",
|
|
928
|
+
"args": [],
|
|
929
|
+
"options": [],
|
|
930
|
+
"examples": [
|
|
931
|
+
"kubectl api-versions"
|
|
932
|
+
]
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
"name": "explain",
|
|
936
|
+
"description": "Get documentation of a resource or field",
|
|
937
|
+
"args": [
|
|
938
|
+
{ "name": "<resource>", "type": "string", "required": true, "description": "Resource or field path (e.g. pods.spec.containers)" }
|
|
939
|
+
],
|
|
940
|
+
"options": [
|
|
941
|
+
{ "name": "--recursive", "description": "Print fields of fields recursively" },
|
|
942
|
+
{ "name": "--api-version", "description": "Specify API version to explain (e.g. apps/v1)", "type": "string" },
|
|
943
|
+
{ "name": "--output", "description": "Output format (plaintext|plaintext-openapiv2)", "type": "string" }
|
|
944
|
+
],
|
|
945
|
+
"examples": [
|
|
946
|
+
"kubectl explain pods",
|
|
947
|
+
"kubectl explain pods.spec",
|
|
948
|
+
"kubectl explain pods.spec.containers",
|
|
949
|
+
"kubectl explain pods.spec.containers.resources",
|
|
950
|
+
"kubectl explain deployments.spec.strategy",
|
|
951
|
+
"kubectl explain services.spec.type",
|
|
952
|
+
"kubectl explain pods --recursive",
|
|
953
|
+
"kubectl explain pods --api-version=v1"
|
|
954
|
+
]
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
"name": "auth can-i",
|
|
958
|
+
"description": "Check whether an action is allowed in the cluster",
|
|
959
|
+
"args": [
|
|
960
|
+
{ "name": "<verb>", "type": "string", "required": true, "description": "API verb (get, list, create, delete, update, patch, watch, etc.)" },
|
|
961
|
+
{ "name": "<resource>", "type": "string", "required": true, "description": "Resource type" }
|
|
962
|
+
],
|
|
963
|
+
"options": [
|
|
964
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
965
|
+
{ "name": "--all-namespaces", "short": "-A", "description": "Check in all namespaces" },
|
|
966
|
+
{ "name": "--as", "description": "Username to impersonate for the operation", "type": "string" },
|
|
967
|
+
{ "name": "--as-group", "description": "Group to impersonate", "type": "string" },
|
|
968
|
+
{ "name": "--as-uid", "description": "UID to impersonate", "type": "string" },
|
|
969
|
+
{ "name": "--list", "description": "List all allowed actions" },
|
|
970
|
+
{ "name": "--no-headers", "description": "Do not print column headers (with --list)" },
|
|
971
|
+
{ "name": "--subresource", "description": "Subresource to check (e.g. log, status)", "type": "string" },
|
|
972
|
+
{ "name": "--quiet", "short": "-q", "description": "Suppress output, only set exit code" }
|
|
973
|
+
],
|
|
974
|
+
"examples": [
|
|
975
|
+
"kubectl auth can-i create pods",
|
|
976
|
+
"kubectl auth can-i create pods -n production",
|
|
977
|
+
"kubectl auth can-i delete deployments",
|
|
978
|
+
"kubectl auth can-i '*' '*'",
|
|
979
|
+
"kubectl auth can-i list pods --as=system:serviceaccount:default:my-sa",
|
|
980
|
+
"kubectl auth can-i --list",
|
|
981
|
+
"kubectl auth can-i --list --namespace=production",
|
|
982
|
+
"kubectl auth can-i get pods --as=jane",
|
|
983
|
+
"kubectl auth can-i create pods --as-group=system:masters"
|
|
984
|
+
]
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
"name": "certificate approve",
|
|
988
|
+
"description": "Approve a certificate signing request",
|
|
989
|
+
"args": [
|
|
990
|
+
{ "name": "<csr>", "type": "string", "required": true, "description": "CSR name" }
|
|
991
|
+
],
|
|
992
|
+
"options": [
|
|
993
|
+
{ "name": "--force", "description": "Update even if the CSR has been approved" },
|
|
994
|
+
{ "name": "--allow-missing-template-keys", "description": "Allow missing template keys in Go templates" }
|
|
995
|
+
],
|
|
996
|
+
"examples": [
|
|
997
|
+
"kubectl certificate approve my-csr",
|
|
998
|
+
"kubectl certificate approve csr-abc123"
|
|
999
|
+
]
|
|
1000
|
+
},
|
|
1001
|
+
{
|
|
1002
|
+
"name": "certificate deny",
|
|
1003
|
+
"description": "Deny a certificate signing request",
|
|
1004
|
+
"args": [
|
|
1005
|
+
{ "name": "<csr>", "type": "string", "required": true, "description": "CSR name" }
|
|
1006
|
+
],
|
|
1007
|
+
"options": [
|
|
1008
|
+
{ "name": "--force", "description": "Update even if the CSR has been denied" }
|
|
1009
|
+
],
|
|
1010
|
+
"examples": [
|
|
1011
|
+
"kubectl certificate deny my-csr",
|
|
1012
|
+
"kubectl certificate deny csr-abc123"
|
|
1013
|
+
]
|
|
1014
|
+
},
|
|
1015
|
+
{
|
|
1016
|
+
"name": "debug",
|
|
1017
|
+
"description": "Create a debugging session for troubleshooting workloads and nodes",
|
|
1018
|
+
"args": [
|
|
1019
|
+
{ "name": "<resource>", "type": "string", "required": true, "description": "Resource to debug (pod/name, node/name)" }
|
|
1020
|
+
],
|
|
1021
|
+
"options": [
|
|
1022
|
+
{ "name": "--image", "description": "Container image for the debug container", "type": "string" },
|
|
1023
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
1024
|
+
{ "name": "--stdin", "short": "-i", "description": "Keep stdin open" },
|
|
1025
|
+
{ "name": "--tty", "short": "-t", "description": "Allocate a TTY" },
|
|
1026
|
+
{ "name": "--target", "description": "Target container to share process namespace with", "type": "string" },
|
|
1027
|
+
{ "name": "--container", "short": "-c", "description": "Name of the debug container", "type": "string" },
|
|
1028
|
+
{ "name": "--copy-to", "description": "Create a copy of the target pod with this name", "type": "string" },
|
|
1029
|
+
{ "name": "--set-image", "description": "Override container images in the copied pod (container=image)", "type": "string" },
|
|
1030
|
+
{ "name": "--share-processes", "description": "Use shared process namespace in the copy (default true)" },
|
|
1031
|
+
{ "name": "--same-node", "description": "Schedule the copy to the same node as the target" },
|
|
1032
|
+
{ "name": "--env", "description": "Environment variables for the debug container", "type": "string" },
|
|
1033
|
+
{ "name": "--attach", "description": "Automatically attach to the debug container" },
|
|
1034
|
+
{ "name": "--quiet", "short": "-q", "description": "Reduce output" },
|
|
1035
|
+
{ "name": "--profile", "description": "Debug profile (general|baseline|restricted|netadmin|sysadmin)", "type": "string" },
|
|
1036
|
+
{ "name": "--custom", "description": "Path to a partial container spec to customize debug containers", "type": "path" }
|
|
1037
|
+
],
|
|
1038
|
+
"examples": [
|
|
1039
|
+
"kubectl debug my-pod -it --image=busybox",
|
|
1040
|
+
"kubectl debug my-pod -it --image=nicolaka/netshoot --target=app",
|
|
1041
|
+
"kubectl debug my-pod --copy-to=debug-pod --image=ubuntu -it",
|
|
1042
|
+
"kubectl debug node/worker-1 -it --image=ubuntu",
|
|
1043
|
+
"kubectl debug my-pod -it --image=busybox --profile=netadmin",
|
|
1044
|
+
"kubectl debug my-pod --copy-to=debug-pod --set-image=app=app:debug -it",
|
|
1045
|
+
"kubectl debug my-pod -it --image=alpine -n production"
|
|
1046
|
+
]
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
"name": "wait",
|
|
1050
|
+
"description": "Wait for a specific condition on one or many resources",
|
|
1051
|
+
"args": [
|
|
1052
|
+
{ "name": "<resource>", "type": "string", "required": true, "description": "Resource to wait on (e.g. pod/my-pod)" }
|
|
1053
|
+
],
|
|
1054
|
+
"options": [
|
|
1055
|
+
{ "name": "--for", "description": "Condition to wait for (condition=Ready, delete, jsonpath=...)", "type": "string" },
|
|
1056
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace", "type": "string" },
|
|
1057
|
+
{ "name": "--all-namespaces", "short": "-A", "description": "Wait in all namespaces" },
|
|
1058
|
+
{ "name": "--timeout", "description": "Timeout duration (e.g. 60s, 5m)", "type": "string" },
|
|
1059
|
+
{ "name": "--selector", "short": "-l", "description": "Label selector to filter", "type": "string" },
|
|
1060
|
+
{ "name": "--all", "description": "Select all resources of the specified type" },
|
|
1061
|
+
{ "name": "--filename", "short": "-f", "description": "Filename to identify the resource", "type": "path" }
|
|
1062
|
+
],
|
|
1063
|
+
"examples": [
|
|
1064
|
+
"kubectl wait --for=condition=Ready pod/my-pod",
|
|
1065
|
+
"kubectl wait --for=condition=Ready pod/my-pod --timeout=120s",
|
|
1066
|
+
"kubectl wait --for=condition=Available deployment/my-app",
|
|
1067
|
+
"kubectl wait --for=delete pod/my-pod --timeout=60s",
|
|
1068
|
+
"kubectl wait --for=condition=Ready pods --all -n production",
|
|
1069
|
+
"kubectl wait --for=condition=complete job/my-job",
|
|
1070
|
+
"kubectl wait --for=jsonpath='{.status.phase}'=Running pod/my-pod",
|
|
1071
|
+
"kubectl wait --for=condition=Ready pod -l app=web --timeout=300s"
|
|
1072
|
+
]
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
"name": "diff",
|
|
1076
|
+
"description": "Diff a local file or stdin against the live cluster state",
|
|
1077
|
+
"args": [],
|
|
1078
|
+
"options": [
|
|
1079
|
+
{ "name": "--filename", "short": "-f", "description": "Filename, directory, or URL to diff", "type": "path" },
|
|
1080
|
+
{ "name": "--kustomize", "short": "-k", "description": "Process kustomization directory", "type": "path" },
|
|
1081
|
+
{ "name": "--recursive", "short": "-R", "description": "Process the directory recursively" },
|
|
1082
|
+
{ "name": "--selector", "short": "-l", "description": "Label selector to filter", "type": "string" },
|
|
1083
|
+
{ "name": "--server-side", "description": "Run the diff using server-side apply" },
|
|
1084
|
+
{ "name": "--force-conflicts", "description": "Force conflict resolution with server-side" },
|
|
1085
|
+
{ "name": "--field-manager", "description": "Name of the field manager", "type": "string" },
|
|
1086
|
+
{ "name": "--prune-allowlist", "description": "Allowlist of resource types for pruning (when --prune is set)", "type": "string" }
|
|
1087
|
+
],
|
|
1088
|
+
"examples": [
|
|
1089
|
+
"kubectl diff -f deployment.yaml",
|
|
1090
|
+
"kubectl diff -f ./manifests/",
|
|
1091
|
+
"kubectl diff -k ./overlays/production",
|
|
1092
|
+
"kubectl diff -R -f ./manifests/",
|
|
1093
|
+
"kubectl diff -f deployment.yaml --server-side"
|
|
1094
|
+
]
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
"name": "kustomize",
|
|
1098
|
+
"description": "Build a set of KRM resources using a kustomization.yaml file",
|
|
1099
|
+
"args": [
|
|
1100
|
+
{ "name": "<directory>", "type": "path", "required": false, "description": "Path to kustomization directory or URL" }
|
|
1101
|
+
],
|
|
1102
|
+
"options": [
|
|
1103
|
+
{ "name": "--enable-helm", "description": "Enable Helm chart inflation" },
|
|
1104
|
+
{ "name": "--helm-command", "description": "Path to Helm binary", "type": "path" },
|
|
1105
|
+
{ "name": "--load-restrictor", "description": "Restrict file loading (LoadRestrictionsRootOnly|LoadRestrictionsNone)", "type": "string" },
|
|
1106
|
+
{ "name": "--network", "description": "Enable network and remote resources" },
|
|
1107
|
+
{ "name": "--output", "short": "-o", "description": "Output file path", "type": "path" }
|
|
1108
|
+
],
|
|
1109
|
+
"examples": [
|
|
1110
|
+
"kubectl kustomize ./",
|
|
1111
|
+
"kubectl kustomize ./overlays/production",
|
|
1112
|
+
"kubectl kustomize ./overlays/production | kubectl apply -f -",
|
|
1113
|
+
"kubectl kustomize https://github.com/kubernetes-sigs/kustomize/examples/helloWorld",
|
|
1114
|
+
"kubectl kustomize --enable-helm ./"
|
|
1115
|
+
]
|
|
1116
|
+
}
|
|
1117
|
+
],
|
|
1118
|
+
"globalOptions": [
|
|
1119
|
+
{ "name": "--kubeconfig", "description": "Path to the kubeconfig file", "type": "path" },
|
|
1120
|
+
{ "name": "--context", "description": "Name of the kubeconfig context to use", "type": "string" },
|
|
1121
|
+
{ "name": "--cluster", "description": "Name of the kubeconfig cluster to use", "type": "string" },
|
|
1122
|
+
{ "name": "--user", "description": "Name of the kubeconfig user to use", "type": "string" },
|
|
1123
|
+
{ "name": "--namespace", "short": "-n", "description": "Kubernetes namespace scope for the request", "type": "string" },
|
|
1124
|
+
{ "name": "--server", "short": "-s", "description": "Address and port of the Kubernetes API server", "type": "string" },
|
|
1125
|
+
{ "name": "--tls-server-name", "description": "Server name for TLS certificate validation", "type": "string" },
|
|
1126
|
+
{ "name": "--insecure-skip-tls-verify", "description": "Skip TLS certificate verification" },
|
|
1127
|
+
{ "name": "--certificate-authority", "description": "Path to CA certificate file", "type": "path" },
|
|
1128
|
+
{ "name": "--client-certificate", "description": "Path to client certificate file", "type": "path" },
|
|
1129
|
+
{ "name": "--client-key", "description": "Path to client key file", "type": "path" },
|
|
1130
|
+
{ "name": "--token", "description": "Bearer token for authenticating to the API server", "type": "string" },
|
|
1131
|
+
{ "name": "--as", "description": "Username to impersonate", "type": "string" },
|
|
1132
|
+
{ "name": "--as-group", "description": "Group to impersonate", "type": "string" },
|
|
1133
|
+
{ "name": "--as-uid", "description": "UID to impersonate", "type": "string" },
|
|
1134
|
+
{ "name": "--cache-dir", "description": "Default cache directory", "type": "path" },
|
|
1135
|
+
{ "name": "--request-timeout", "description": "Timeout for a single server request (e.g. 0, 5s, 2m)", "type": "string" },
|
|
1136
|
+
{ "name": "--output", "short": "-o", "description": "Output format (json|yaml|wide|name|jsonpath=...)", "type": "string" },
|
|
1137
|
+
{ "name": "--v", "description": "Verbosity level (0-9)", "type": "number" },
|
|
1138
|
+
{ "name": "--warnings-as-errors", "description": "Treat warnings from server as errors" }
|
|
1139
|
+
],
|
|
1140
|
+
"examples": [
|
|
1141
|
+
"kubectl get pods -A",
|
|
1142
|
+
"kubectl apply -f deployment.yaml",
|
|
1143
|
+
"kubectl logs -f my-pod",
|
|
1144
|
+
"kubectl exec -it my-pod -- /bin/bash",
|
|
1145
|
+
"kubectl port-forward svc/my-service 8080:80",
|
|
1146
|
+
"kubectl scale deployment my-app --replicas=3",
|
|
1147
|
+
"kubectl rollout restart deployment/my-app",
|
|
1148
|
+
"kubectl config use-context production",
|
|
1149
|
+
"kubectl top pods --sort-by=cpu",
|
|
1150
|
+
"kubectl drain worker-1 --ignore-daemonsets --delete-emptydir-data"
|
|
1151
|
+
],
|
|
1152
|
+
"relatedCommands": ["helm", "kustomize", "docker", "podman", "istioctl", "argocd", "k9s", "stern", "kubectx", "kubens", "minikube", "kind"],
|
|
1153
|
+
"contextEngine": {
|
|
1154
|
+
"detectors": [
|
|
1155
|
+
{
|
|
1156
|
+
"name": "current_context",
|
|
1157
|
+
"description": "Currently active kubeconfig context",
|
|
1158
|
+
"command": "kubectl config current-context",
|
|
1159
|
+
"parser": "text",
|
|
1160
|
+
"cacheFor": 10,
|
|
1161
|
+
"requiresCmd": "kubectl"
|
|
1162
|
+
},
|
|
1163
|
+
{
|
|
1164
|
+
"name": "all_contexts",
|
|
1165
|
+
"description": "All available kubeconfig contexts",
|
|
1166
|
+
"command": "kubectl config get-contexts -o name",
|
|
1167
|
+
"parser": "lines",
|
|
1168
|
+
"cacheFor": 30,
|
|
1169
|
+
"requiresCmd": "kubectl"
|
|
1170
|
+
},
|
|
1171
|
+
{
|
|
1172
|
+
"name": "namespaces",
|
|
1173
|
+
"description": "All namespaces in the cluster",
|
|
1174
|
+
"command": "kubectl get namespaces -o jsonpath='{.items[*].metadata.name}'",
|
|
1175
|
+
"parser": "text",
|
|
1176
|
+
"cacheFor": 30,
|
|
1177
|
+
"requiresCmd": "kubectl"
|
|
1178
|
+
},
|
|
1179
|
+
{
|
|
1180
|
+
"name": "current_namespace",
|
|
1181
|
+
"description": "Default namespace for the current context",
|
|
1182
|
+
"command": "kubectl config view --minify -o jsonpath='{..namespace}'",
|
|
1183
|
+
"parser": "text",
|
|
1184
|
+
"cacheFor": 10,
|
|
1185
|
+
"requiresCmd": "kubectl"
|
|
1186
|
+
},
|
|
1187
|
+
{
|
|
1188
|
+
"name": "pods",
|
|
1189
|
+
"description": "All pods across namespaces with namespace, name, and status",
|
|
1190
|
+
"command": "kubectl get pods --all-namespaces --no-headers -o custom-columns='NS:.metadata.namespace,NAME:.metadata.name,STATUS:.status.phase'",
|
|
1191
|
+
"parser": "table",
|
|
1192
|
+
"cacheFor": 10,
|
|
1193
|
+
"requiresCmd": "kubectl"
|
|
1194
|
+
},
|
|
1195
|
+
{
|
|
1196
|
+
"name": "services",
|
|
1197
|
+
"description": "All services across namespaces with type and ports",
|
|
1198
|
+
"command": "kubectl get svc --all-namespaces --no-headers -o custom-columns='NS:.metadata.namespace,NAME:.metadata.name,TYPE:.spec.type,PORTS:.spec.ports[*].port'",
|
|
1199
|
+
"parser": "table",
|
|
1200
|
+
"cacheFor": 15,
|
|
1201
|
+
"requiresCmd": "kubectl"
|
|
1202
|
+
},
|
|
1203
|
+
{
|
|
1204
|
+
"name": "deployments",
|
|
1205
|
+
"description": "All deployments across namespaces with ready/desired replica counts",
|
|
1206
|
+
"command": "kubectl get deployments --all-namespaces --no-headers -o custom-columns='NS:.metadata.namespace,NAME:.metadata.name,READY:.status.readyReplicas,DESIRED:.spec.replicas'",
|
|
1207
|
+
"parser": "table",
|
|
1208
|
+
"cacheFor": 15,
|
|
1209
|
+
"requiresCmd": "kubectl"
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
"name": "nodes",
|
|
1213
|
+
"description": "Cluster nodes with status, roles, and kubelet version",
|
|
1214
|
+
"command": "kubectl get nodes -o custom-columns='NAME:.metadata.name,STATUS:.status.conditions[-1].type,ROLES:.metadata.labels.node-role\\.kubernetes\\.io/*,VERSION:.status.nodeInfo.kubeletVersion' --no-headers",
|
|
1215
|
+
"parser": "table",
|
|
1216
|
+
"cacheFor": 30,
|
|
1217
|
+
"requiresCmd": "kubectl"
|
|
1218
|
+
},
|
|
1219
|
+
{
|
|
1220
|
+
"name": "configmaps",
|
|
1221
|
+
"description": "All configmaps across namespaces",
|
|
1222
|
+
"command": "kubectl get configmaps --all-namespaces --no-headers -o custom-columns='NS:.metadata.namespace,NAME:.metadata.name'",
|
|
1223
|
+
"parser": "table",
|
|
1224
|
+
"cacheFor": 30,
|
|
1225
|
+
"requiresCmd": "kubectl"
|
|
1226
|
+
},
|
|
1227
|
+
{
|
|
1228
|
+
"name": "secrets",
|
|
1229
|
+
"description": "All secrets across namespaces with their type",
|
|
1230
|
+
"command": "kubectl get secrets --all-namespaces --no-headers -o custom-columns='NS:.metadata.namespace,NAME:.metadata.name,TYPE:.type'",
|
|
1231
|
+
"parser": "table",
|
|
1232
|
+
"cacheFor": 30,
|
|
1233
|
+
"requiresCmd": "kubectl"
|
|
1234
|
+
},
|
|
1235
|
+
{
|
|
1236
|
+
"name": "ingresses",
|
|
1237
|
+
"description": "All ingress resources across namespaces",
|
|
1238
|
+
"command": "kubectl get ingress --all-namespaces --no-headers",
|
|
1239
|
+
"parser": "lines",
|
|
1240
|
+
"cacheFor": 30,
|
|
1241
|
+
"requiresCmd": "kubectl"
|
|
1242
|
+
},
|
|
1243
|
+
{
|
|
1244
|
+
"name": "cluster_info",
|
|
1245
|
+
"description": "Kubernetes control plane and CoreDNS endpoint information",
|
|
1246
|
+
"command": "kubectl cluster-info",
|
|
1247
|
+
"parser": "text",
|
|
1248
|
+
"cacheFor": 120,
|
|
1249
|
+
"requiresCmd": "kubectl"
|
|
1250
|
+
},
|
|
1251
|
+
{
|
|
1252
|
+
"name": "api_resources",
|
|
1253
|
+
"description": "All supported API resource names in the cluster",
|
|
1254
|
+
"command": "kubectl api-resources --no-headers -o name",
|
|
1255
|
+
"parser": "lines",
|
|
1256
|
+
"cacheFor": 300,
|
|
1257
|
+
"requiresCmd": "kubectl"
|
|
1258
|
+
},
|
|
1259
|
+
{
|
|
1260
|
+
"name": "storage_classes",
|
|
1261
|
+
"description": "Available storage classes and their provisioners",
|
|
1262
|
+
"command": "kubectl get storageclass --no-headers -o custom-columns='NAME:.metadata.name,PROVISIONER:.provisioner'",
|
|
1263
|
+
"parser": "table",
|
|
1264
|
+
"cacheFor": 60,
|
|
1265
|
+
"requiresCmd": "kubectl"
|
|
1266
|
+
},
|
|
1267
|
+
{
|
|
1268
|
+
"name": "persistent_volumes",
|
|
1269
|
+
"description": "Cluster-wide persistent volumes",
|
|
1270
|
+
"command": "kubectl get pv --no-headers",
|
|
1271
|
+
"parser": "lines",
|
|
1272
|
+
"cacheFor": 30,
|
|
1273
|
+
"requiresCmd": "kubectl"
|
|
1274
|
+
}
|
|
1275
|
+
]
|
|
1276
|
+
}
|
|
1277
|
+
}
|