You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`port-forward` | `kubectl port-forward POD [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N] [flags]` | Forward one or more local ports to a pod.
92
92
`proxy` | `kubectl proxy [--port=PORT] [--www=static-dir] [--www-prefix=prefix] [--api-prefix=prefix] [flags]` | Run a proxy to the Kubernetes API server.
93
93
`replace` | `kubectl replace -f FILENAME` | Replace a resource from a file or stdin.
94
-
`run` | `kubectl run NAME --image=image [--env="key=value"] [--port=port] [--replicas=replicas] [--dry-run=server|client|none] [--overrides=inline-json] [flags]` | Run a specified image on the cluster.
94
+
`run` | </code>kubectl run NAME --image=image [--env="key=value"][--port=port][--replicas=replicas][--dry-run=server|client|none][--overrides=inline-json][flags]</code> | Run a specified image on the cluster.
95
95
`scale` | <code>kubectl scale (-f FILENAME | TYPE NAME | TYPE/NAME) --replicas=COUNT [--resource-version=version][--current-replicas=count][flags]</code> | Update the size of the specified replication controller.
96
96
`version` | `kubectl version [--client] [flags]` | Display the Kubernetes version running on the client and server.
97
97
@@ -243,8 +243,8 @@ kubectl get pods <pod-name> --server-print=false
243
243
Output looks like this:
244
244
245
245
```shell
246
-
NAME READY STATUS RESTARTS AGE
247
-
pod-name 1/1 Running 0 1m
246
+
NAME AGE
247
+
pod-name 1m
248
248
```
249
249
250
250
### Sorting list objects
@@ -339,8 +339,8 @@ the pods running on it, the events generated for the node etc.
339
339
# Delete a pod using the type and name specified in the pod.yaml file.
340
340
kubectl delete -f pod.yaml
341
341
342
-
# Delete all the pods and services that have the label name=<label-name>.
343
-
kubectl delete pods,services -l name=<label-name>
342
+
# Delete all the pods and services that have the label '<label-key>=<label-value>'.
0 commit comments