diff --git a/docs/man/man1/kubectl-annotate.1 b/docs/man/man1/kubectl-annotate.1 index fcce61a26c..6ddd1a19e9 100644 --- a/docs/man/man1/kubectl-annotate.1 +++ b/docs/man/man1/kubectl-annotate.1 @@ -186,23 +186,23 @@ horizontalpodautoscalers (hpa), resourcequotas (quota) or secrets. .nf # Update pod 'foo' with the annotation 'description' and the value 'my frontend'. # If the same annotation is set multiple times, only the last value will be applied -$ kubectl annotate pods foo description='my frontend' +kubectl annotate pods foo description='my frontend' # Update a pod identified by type and name in "pod.json" -$ kubectl annotate \-f pod.json description='my frontend' +kubectl annotate \-f pod.json description='my frontend' # Update pod 'foo' with the annotation 'description' and the value 'my frontend running nginx', overwriting any existing value. -$ kubectl annotate \-\-overwrite pods foo description='my frontend running nginx' +kubectl annotate \-\-overwrite pods foo description='my frontend running nginx' # Update all pods in the namespace -$ kubectl annotate pods \-\-all description='my frontend running nginx' +kubectl annotate pods \-\-all description='my frontend running nginx' # Update pod 'foo' only if the resource is unchanged from version 1. -$ kubectl annotate pods foo description='my frontend running nginx' \-\-resource\-version=1 +kubectl annotate pods foo description='my frontend running nginx' \-\-resource\-version=1 # Update pod 'foo' by removing an annotation named 'description' if it exists. # Does not require the \-\-overwrite flag. -$ kubectl annotate pods foo description\- +kubectl annotate pods foo description\- .fi .RE diff --git a/docs/man/man1/kubectl-apply.1 b/docs/man/man1/kubectl-apply.1 index a5f3d080e0..84b554ce96 100644 --- a/docs/man/man1/kubectl-apply.1 +++ b/docs/man/man1/kubectl-apply.1 @@ -142,10 +142,10 @@ JSON and YAML formats are accepted. .nf # Apply the configuration in pod.json to a pod. -$ kubectl apply \-f ./pod.json +kubectl apply \-f ./pod.json # Apply the JSON passed into stdin to a pod. -$ cat pod.json | kubectl apply \-f \- +cat pod.json | kubectl apply \-f \- .fi .RE diff --git a/docs/man/man1/kubectl-attach.1 b/docs/man/man1/kubectl-attach.1 index 0409c504cd..a303c6efd1 100644 --- a/docs/man/man1/kubectl-attach.1 +++ b/docs/man/man1/kubectl-attach.1 @@ -130,14 +130,14 @@ Attach to a process that is already running inside an existing container. .nf # Get output from running pod 123456\-7890, using the first container by default -$ kubectl attach 123456\-7890 +kubectl attach 123456\-7890 # Get output from ruby\-container from pod 123456\-7890 -$ kubectl attach 123456\-7890 \-c ruby\-container +kubectl attach 123456\-7890 \-c ruby\-container # Switch to raw terminal mode, sends stdin to 'bash' in ruby\-container from pod 123456\-7890 # and sends stdout/stderr from 'bash' back to the client -$ kubectl attach 123456\-7890 \-c ruby\-container \-i \-t +kubectl attach 123456\-7890 \-c ruby\-container \-i \-t .fi .RE diff --git a/docs/man/man1/kubectl-autoscale.1 b/docs/man/man1/kubectl-autoscale.1 index 671c4d41e5..ffb92bf394 100644 --- a/docs/man/man1/kubectl-autoscale.1 +++ b/docs/man/man1/kubectl-autoscale.1 @@ -189,10 +189,10 @@ An autoscaler can automatically increase or decrease number of pods deployed wit .nf # Auto scale a deployment "foo", with the number of pods between 2 to 10, target CPU utilization at a default value that server applies: -$ kubectl autoscale deployment foo \-\-min=2 \-\-max=10 +kubectl autoscale deployment foo \-\-min=2 \-\-max=10 # Auto scale a replication controller "foo", with the number of pods between 1 to 5, target CPU utilization at 80%: -$ kubectl autoscale rc foo \-\-max=5 \-\-cpu\-percent=80 +kubectl autoscale rc foo \-\-max=5 \-\-cpu\-percent=80 .fi .RE diff --git a/docs/man/man1/kubectl-config-current-context.1 b/docs/man/man1/kubectl-config-current-context.1 index 5184a8fb55..2e2a52ece7 100644 --- a/docs/man/man1/kubectl-config-current-context.1 +++ b/docs/man/man1/kubectl-config-current-context.1 @@ -116,7 +116,7 @@ Displays the current\-context .nf # Display the current\-context -$ kubectl config current\-context +kubectl config current\-context .fi .RE diff --git a/docs/man/man1/kubectl-config-set-cluster.1 b/docs/man/man1/kubectl-config-set-cluster.1 index e9df8431b8..89dc911b1a 100644 --- a/docs/man/man1/kubectl-config-set-cluster.1 +++ b/docs/man/man1/kubectl-config-set-cluster.1 @@ -123,13 +123,13 @@ Specifying a name that already exists will merge new fields on top of existing v .nf # Set only the server field on the e2e cluster entry without touching other values. -$ kubectl config set\-cluster e2e \-\-server=https://1.2.3.4 +kubectl config set\-cluster e2e \-\-server=https://1.2.3.4 # Embed certificate authority data for the e2e cluster entry -$ kubectl config set\-cluster e2e \-\-certificate\-authority=\~/.kube/e2e/kubernetes.ca.crt +kubectl config set\-cluster e2e \-\-certificate\-authority=\~/.kube/e2e/kubernetes.ca.crt # Disable cert checking for the dev cluster entry -$ kubectl config set\-cluster e2e \-\-insecure\-skip\-tls\-verify=true +kubectl config set\-cluster e2e \-\-insecure\-skip\-tls\-verify=true .fi .RE diff --git a/docs/man/man1/kubectl-config-set-context.1 b/docs/man/man1/kubectl-config-set-context.1 index fdb3834e51..a2b8f6cde8 100644 --- a/docs/man/man1/kubectl-config-set-context.1 +++ b/docs/man/man1/kubectl-config-set-context.1 @@ -119,7 +119,7 @@ Specifying a name that already exists will merge new fields on top of existing v .nf # Set the user field on the gce context entry without touching other values -$ kubectl config set\-context gce \-\-user=cluster\-admin +kubectl config set\-context gce \-\-user=cluster\-admin .fi .RE diff --git a/docs/man/man1/kubectl-config-set-credentials.1 b/docs/man/man1/kubectl-config-set-credentials.1 index 749eabc107..ed86d0d5f4 100644 --- a/docs/man/man1/kubectl-config-set-credentials.1 +++ b/docs/man/man1/kubectl-config-set-credentials.1 @@ -139,13 +139,13 @@ Bearer token and basic auth are mutually exclusive. .nf # Set only the "client\-key" field on the "cluster\-admin" # entry, without touching other values: -$ kubectl config set\-credentials cluster\-admin \-\-client\-key=\~/.kube/admin.key +kubectl config set\-credentials cluster\-admin \-\-client\-key=\~/.kube/admin.key # Set basic auth for the "cluster\-admin" entry -$ kubectl config set\-credentials cluster\-admin \-\-username=admin \-\-password=uXFGweU9l35qcif +kubectl config set\-credentials cluster\-admin \-\-username=admin \-\-password=uXFGweU9l35qcif # Embed client certificate data in the "cluster\-admin" entry -$ kubectl config set\-credentials cluster\-admin \-\-client\-certificate=\~/.kube/admin.crt \-\-embed\-certs=true +kubectl config set\-credentials cluster\-admin \-\-client\-certificate=\~/.kube/admin.crt \-\-embed\-certs=true .fi .RE diff --git a/docs/man/man1/kubectl-config-view.1 b/docs/man/man1/kubectl-config-view.1 index 0e6dff4c7a..ceca91a54c 100644 --- a/docs/man/man1/kubectl-config-view.1 +++ b/docs/man/man1/kubectl-config-view.1 @@ -168,10 +168,10 @@ You can use \-\-output jsonpath={...} to extract specific values using a jsonpat .nf # Show Merged kubeconfig settings. -$ kubectl config view +kubectl config view # Get the password for the e2e user -$ kubectl config view \-o jsonpath='{.users[?(@.name == "e2e")].user.password}' +kubectl config view \-o jsonpath='{.users[?(@.name == "e2e")].user.password}' .fi .RE diff --git a/docs/man/man1/kubectl-convert.1 b/docs/man/man1/kubectl-convert.1 index 68b1912501..bb388379b0 100644 --- a/docs/man/man1/kubectl-convert.1 +++ b/docs/man/man1/kubectl-convert.1 @@ -175,14 +175,14 @@ to change to output destination. .nf # Convert 'pod.yaml' to latest version and print to stdout. -$ kubectl convert \-f pod.yaml +kubectl convert \-f pod.yaml # Convert the live state of the resource specified by 'pod.yaml' to the latest version # and print to stdout in json format. -$ kubectl convert \-f pod.yaml \-\-local \-o json +kubectl convert \-f pod.yaml \-\-local \-o json # Convert all files under current directory to latest version and create them all. -$ kubectl convert \-f . | kubectl create \-f \- +kubectl convert \-f . | kubectl create \-f \- .fi diff --git a/docs/man/man1/kubectl-cordon.1 b/docs/man/man1/kubectl-cordon.1 index 989692bebf..916885dd0a 100644 --- a/docs/man/man1/kubectl-cordon.1 +++ b/docs/man/man1/kubectl-cordon.1 @@ -116,7 +116,7 @@ Mark node as unschedulable. .nf # Mark node "foo" as unschedulable. -$ kubectl cordon foo +kubectl cordon foo .fi diff --git a/docs/man/man1/kubectl-create-configmap.1 b/docs/man/man1/kubectl-create-configmap.1 index f5b636fb4f..be3c5e9fcd 100644 --- a/docs/man/man1/kubectl-create-configmap.1 +++ b/docs/man/man1/kubectl-create-configmap.1 @@ -189,13 +189,13 @@ symlinks, devices, pipes, etc). .nf # Create a new configmap named my\-config with keys for each file in folder bar - $ kubectl create configmap generic my\-config \-\-from\-file=path/to/bar + kubectl create configmap generic my\-config \-\-from\-file=path/to/bar # Create a new configmap named my\-config with specified keys instead of names on disk - $ kubectl create configmap generic my\-config \-\-from\-file=ssh\-privatekey=\~/.ssh/id\_rsa \-\-from\-file=ssh\-publickey=\~/.ssh/id\_rsa.pub + kubectl create configmap generic my\-config \-\-from\-file=ssh\-privatekey=\~/.ssh/id\_rsa \-\-from\-file=ssh\-publickey=\~/.ssh/id\_rsa.pub # Create a new configMap named my\-config with key1=config1 and key2=config2 - $ kubectl create configmap generic my\-config \-\-from\-literal=key1=config1 \-\-from\-literal=key2=config2 + kubectl create configmap generic my\-config \-\-from\-literal=key1=config1 \-\-from\-literal=key2=config2 .fi .RE diff --git a/docs/man/man1/kubectl-create-namespace.1 b/docs/man/man1/kubectl-create-namespace.1 index 6c491d74cb..21996057f7 100644 --- a/docs/man/man1/kubectl-create-namespace.1 +++ b/docs/man/man1/kubectl-create-namespace.1 @@ -169,7 +169,7 @@ Create a namespace with the specified name. .nf # Create a new namespace named my\-namespace - $ kubectl create namespace my\-namespace + kubectl create namespace my\-namespace .fi .RE diff --git a/docs/man/man1/kubectl-create-secret-generic.1 b/docs/man/man1/kubectl-create-secret-generic.1 index 14b42a83a4..2f71889e5f 100644 --- a/docs/man/man1/kubectl-create-secret-generic.1 +++ b/docs/man/man1/kubectl-create-secret-generic.1 @@ -193,13 +193,13 @@ symlinks, devices, pipes, etc). .nf # Create a new secret named my\-secret with keys for each file in folder bar - $ kubectl create secret generic my\-secret \-\-from\-file=path/to/bar + kubectl create secret generic my\-secret \-\-from\-file=path/to/bar # Create a new secret named my\-secret with specified keys instead of names on disk - $ kubectl create secret generic my\-secret \-\-from\-file=ssh\-privatekey=\~/.ssh/id\_rsa \-\-from\-file=ssh\-publickey=\~/.ssh/id\_rsa.pub + kubectl create secret generic my\-secret \-\-from\-file=ssh\-privatekey=\~/.ssh/id\_rsa \-\-from\-file=ssh\-publickey=\~/.ssh/id\_rsa.pub # Create a new secret named my\-secret with key1=supersecret and key2=topsecret - $ kubectl create secret generic my\-secret \-\-from\-literal=key1=supersecret \-\-from\-literal=key2=topsecret + kubectl create secret generic my\-secret \-\-from\-literal=key1=supersecret \-\-from\-literal=key2=topsecret .fi .RE diff --git a/docs/man/man1/kubectl-create.1 b/docs/man/man1/kubectl-create.1 index 383d301731..89c51313bf 100644 --- a/docs/man/man1/kubectl-create.1 +++ b/docs/man/man1/kubectl-create.1 @@ -145,10 +145,10 @@ JSON and YAML formats are accepted. .nf # Create a pod using the data in pod.json. -$ kubectl create \-f ./pod.json +kubectl create \-f ./pod.json # Create a pod based on the JSON passed into stdin. -$ cat pod.json | kubectl create \-f \- +cat pod.json | kubectl create \-f \- .fi .RE diff --git a/docs/man/man1/kubectl-delete.1 b/docs/man/man1/kubectl-delete.1 index 96d0d3a905..01654c25ad 100644 --- a/docs/man/man1/kubectl-delete.1 +++ b/docs/man/man1/kubectl-delete.1 @@ -161,22 +161,22 @@ will be lost along with the rest of the resource. .nf # Delete a pod using the type and name specified in pod.json. -$ kubectl delete \-f ./pod.json +kubectl delete \-f ./pod.json # Delete a pod based on the type and name in the JSON passed into stdin. -$ cat pod.json | kubectl delete \-f \- +cat pod.json | kubectl delete \-f \- # Delete pods and services with same names "baz" and "foo" -$ kubectl delete pod,service baz foo +kubectl delete pod,service baz foo # Delete pods and services with label name=myLabel. -$ kubectl delete pods,services \-l name=myLabel +kubectl delete pods,services \-l name=myLabel # Delete a pod with UID 1234\-56\-7890\-234234\-456456. -$ kubectl delete pod 1234\-56\-7890\-234234\-456456 +kubectl delete pod 1234\-56\-7890\-234234\-456456 # Delete all pods -$ kubectl delete pods \-\-all +kubectl delete pods \-\-all .fi .RE diff --git a/docs/man/man1/kubectl-describe.1 b/docs/man/man1/kubectl-describe.1 index 8dc2e9027c..b196ae0b8e 100644 --- a/docs/man/man1/kubectl-describe.1 +++ b/docs/man/man1/kubectl-describe.1 @@ -144,23 +144,23 @@ endpoints (ep) or secrets. .nf # Describe a node -$ kubectl describe nodes kubernetes\-minion\-emt8.c.myproject.internal +kubectl describe nodes kubernetes\-minion\-emt8.c.myproject.internal # Describe a pod -$ kubectl describe pods/nginx +kubectl describe pods/nginx # Describe a pod identified by type and name in "pod.json" -$ kubectl describe \-f pod.json +kubectl describe \-f pod.json # Describe all pods -$ kubectl describe pods +kubectl describe pods # Describe pods by label name=myLabel -$ kubectl describe po \-l name=myLabel +kubectl describe po \-l name=myLabel # Describe all pods managed by the 'frontend' replication controller (rc\-created pods # get the name of the rc as a prefix in the pod the name). -$ kubectl describe pods frontend +kubectl describe pods frontend .fi .RE diff --git a/docs/man/man1/kubectl-edit.1 b/docs/man/man1/kubectl-edit.1 index 5ac2eee6ab..29b0b8b187 100644 --- a/docs/man/man1/kubectl-edit.1 +++ b/docs/man/man1/kubectl-edit.1 @@ -163,13 +163,13 @@ saved copy to include the latest resource version. .nf # Edit the service named 'docker\-registry': - $ kubectl edit svc/docker\-registry + kubectl edit svc/docker\-registry # Use an alternative editor - $ KUBE\_EDITOR="nano" kubectl edit svc/docker\-registry + KUBE\_EDITOR="nano" kubectl edit svc/docker\-registry # Edit the service 'docker\-registry' in JSON using the v1 API format: - $ kubectl edit svc/docker\-registry \-\-output\-version=v1 \-o json + kubectl edit svc/docker\-registry \-\-output\-version=v1 \-o json .fi .RE diff --git a/docs/man/man1/kubectl-exec.1 b/docs/man/man1/kubectl-exec.1 index 7d7c9d7366..5b2be25465 100644 --- a/docs/man/man1/kubectl-exec.1 +++ b/docs/man/man1/kubectl-exec.1 @@ -134,14 +134,14 @@ Execute a command in a container. .nf # Get output from running 'date' from pod 123456\-7890, using the first container by default -$ kubectl exec 123456\-7890 date +kubectl exec 123456\-7890 date # Get output from running 'date' in ruby\-container from pod 123456\-7890 -$ kubectl exec 123456\-7890 \-c ruby\-container date +kubectl exec 123456\-7890 \-c ruby\-container date # Switch to raw terminal mode, sends stdin to 'bash' in ruby\-container from pod 123456\-7890 # and sends stdout/stderr from 'bash' back to the client -$ kubectl exec 123456\-7890 \-c ruby\-container \-i \-t \-\- bash \-il +kubectl exec 123456\-7890 \-c ruby\-container \-i \-t \-\- bash \-il .fi .RE diff --git a/docs/man/man1/kubectl-explain.1 b/docs/man/man1/kubectl-explain.1 index be42fa9524..d5bfdfd790 100644 --- a/docs/man/man1/kubectl-explain.1 +++ b/docs/man/man1/kubectl-explain.1 @@ -129,10 +129,10 @@ or endpoints (ep). .nf # Get the documentation of the resource and its fields -$ kubectl explain pods +kubectl explain pods # Get the documentation of a specific field of a resource -$ kubectl explain pods.spec.containers +kubectl explain pods.spec.containers .fi .RE diff --git a/docs/man/man1/kubectl-expose.1 b/docs/man/man1/kubectl-expose.1 index d7e9af681b..f3771023ea 100644 --- a/docs/man/man1/kubectl-expose.1 +++ b/docs/man/man1/kubectl-expose.1 @@ -229,22 +229,22 @@ if no labels are specified, the new service will re\-use the labels from the res .nf # Create a service for a replicated nginx, which serves on port 80 and connects to the containers on port 8000. -$ kubectl expose rc nginx \-\-port=80 \-\-target\-port=8000 +kubectl expose rc nginx \-\-port=80 \-\-target\-port=8000 # Create a service for a replication controller identified by type and name specified in "nginx\-controller.yaml", which serves on port 80 and connects to the containers on port 8000. -$ kubectl expose \-f nginx\-controller.yaml \-\-port=80 \-\-target\-port=8000 +kubectl expose \-f nginx\-controller.yaml \-\-port=80 \-\-target\-port=8000 # Create a service for a pod valid\-pod, which serves on port 444 with the name "frontend" -$ kubectl expose pod valid\-pod \-\-port=444 \-\-name=frontend +kubectl expose pod valid\-pod \-\-port=444 \-\-name=frontend # Create a second service based on the above service, exposing the container port 8443 as port 443 with the name "nginx\-https" -$ kubectl expose service nginx \-\-port=443 \-\-target\-port=8443 \-\-name=nginx\-https +kubectl expose service nginx \-\-port=443 \-\-target\-port=8443 \-\-name=nginx\-https # Create a service for a replicated streaming application on port 4100 balancing UDP traffic and named 'video\-stream'. -$ kubectl expose rc streamer \-\-port=4100 \-\-protocol=udp \-\-name=video\-stream +kubectl expose rc streamer \-\-port=4100 \-\-protocol=udp \-\-name=video\-stream # Create a service for a replicated nginx using replica set, which serves on port 80 and connects to the containers on port 8000. -$ kubectl expose rs nginx \-\-port=80 \-\-target\-port=8000 +kubectl expose rs nginx \-\-port=80 \-\-target\-port=8000 .fi .RE diff --git a/docs/man/man1/kubectl-get.1 b/docs/man/man1/kubectl-get.1 index 09a54ec905..e4ab057fc4 100644 --- a/docs/man/man1/kubectl-get.1 +++ b/docs/man/man1/kubectl-get.1 @@ -188,28 +188,28 @@ of the \-\-template flag, you can filter the attributes of the fetched resource( .nf # List all pods in ps output format. -$ kubectl get pods +kubectl get pods # List all pods in ps output format with more information (such as node name). -$ kubectl get pods \-o wide +kubectl get pods \-o wide # List a single replication controller with specified NAME in ps output format. -$ kubectl get replicationcontroller web +kubectl get replicationcontroller web # List a single pod in JSON output format. -$ kubectl get \-o json pod web\-pod\-13je7 +kubectl get \-o json pod web\-pod\-13je7 # List a pod identified by type and name specified in "pod.yaml" in JSON output format. -$ kubectl get \-f pod.yaml \-o json +kubectl get \-f pod.yaml \-o json # Return only the phase value of the specified pod. -$ kubectl get \-o template pod/web\-pod\-13je7 \-\-template={{.status.phase}} \-\-api\-version=v1 +kubectl get \-o template pod/web\-pod\-13je7 \-\-template={{.status.phase}} \-\-api\-version=v1 # List all replication controllers and services together in ps output format. -$ kubectl get rc,services +kubectl get rc,services # List one or more resources by their type and names. -$ kubectl get rc/web service/frontend pods/web\-pod\-13je7 +kubectl get rc/web service/frontend pods/web\-pod\-13je7 .fi .RE diff --git a/docs/man/man1/kubectl-label.1 b/docs/man/man1/kubectl-label.1 index 53c53061d4..d1f22512d3 100644 --- a/docs/man/man1/kubectl-label.1 +++ b/docs/man/man1/kubectl-label.1 @@ -182,23 +182,23 @@ If \-\-resource\-version is specified, then updates will use this resource versi .nf # Update pod 'foo' with the label 'unhealthy' and the value 'true'. -$ kubectl label pods foo unhealthy=true +kubectl label pods foo unhealthy=true # Update pod 'foo' with the label 'status' and the value 'unhealthy', overwriting any existing value. -$ kubectl label \-\-overwrite pods foo status=unhealthy +kubectl label \-\-overwrite pods foo status=unhealthy # Update all pods in the namespace -$ kubectl label pods \-\-all status=unhealthy +kubectl label pods \-\-all status=unhealthy # Update a pod identified by the type and name in "pod.json" -$ kubectl label \-f pod.json status=unhealthy +kubectl label \-f pod.json status=unhealthy # Update pod 'foo' only if the resource is unchanged from version 1. -$ kubectl label pods foo status=unhealthy \-\-resource\-version=1 +kubectl label pods foo status=unhealthy \-\-resource\-version=1 # Update pod 'foo' by removing a label named 'bar' if it exists. # Does not require the \-\-overwrite flag. -$ kubectl label pods foo bar\- +kubectl label pods foo bar\- .fi .RE diff --git a/docs/man/man1/kubectl-logs.1 b/docs/man/man1/kubectl-logs.1 index 8792e886da..09438b70d9 100644 --- a/docs/man/man1/kubectl-logs.1 +++ b/docs/man/man1/kubectl-logs.1 @@ -154,19 +154,19 @@ Print the logs for a container in a pod. If the pod has only one container, the .nf # Return snapshot logs from pod nginx with only one container -$ kubectl logs nginx +kubectl logs nginx # Return snapshot of previous terminated ruby container logs from pod web\-1 -$ kubectl logs \-p \-c ruby web\-1 +kubectl logs \-p \-c ruby web\-1 # Begin streaming the logs of the ruby container in pod web\-1 -$ kubectl logs \-f \-c ruby web\-1 +kubectl logs \-f \-c ruby web\-1 # Display only the most recent 20 lines of output in pod nginx -$ kubectl logs \-\-tail=20 nginx +kubectl logs \-\-tail=20 nginx # Show all logs from pod nginx written in the last hour -$ kubectl logs \-\-since=1h nginx +kubectl logs \-\-since=1h nginx .fi .RE diff --git a/docs/man/man1/kubectl-port-forward.1 b/docs/man/man1/kubectl-port-forward.1 index 2b08a233a1..89f23d15cb 100644 --- a/docs/man/man1/kubectl-port-forward.1 +++ b/docs/man/man1/kubectl-port-forward.1 @@ -123,16 +123,16 @@ Forward one or more local ports to a pod. .nf # Listen on ports 5000 and 6000 locally, forwarding data to/from ports 5000 and 6000 in the pod -$ kubectl port\-forward mypod 5000 6000 +kubectl port\-forward mypod 5000 6000 # Listen on port 8888 locally, forwarding to 5000 in the pod -$ kubectl port\-forward mypod 8888:5000 +kubectl port\-forward mypod 8888:5000 # Listen on a random port locally, forwarding to 5000 in the pod -$ kubectl port\-forward mypod :5000 +kubectl port\-forward mypod :5000 # Listen on a random port locally, forwarding to 5000 in the pod -$ kubectl port\-forward mypod 0:5000 +kubectl port\-forward mypod 0:5000 .fi .RE diff --git a/docs/man/man1/kubectl-proxy.1 b/docs/man/man1/kubectl-proxy.1 index ecba6eb67c..b0ade8ce14 100644 --- a/docs/man/man1/kubectl-proxy.1 +++ b/docs/man/man1/kubectl-proxy.1 @@ -183,15 +183,15 @@ The above lets you 'curl localhost:8001/custom/api/v1/pods' .nf # Run a proxy to kubernetes apiserver on port 8011, serving static content from ./local/www/ -$ kubectl proxy \-\-port=8011 \-\-www=./local/www/ +kubectl proxy \-\-port=8011 \-\-www=./local/www/ # Run a proxy to kubernetes apiserver on an arbitrary local port. # The chosen port for the server will be output to stdout. -$ kubectl proxy \-\-port=0 +kubectl proxy \-\-port=0 # Run a proxy to kubernetes apiserver, changing the api prefix to k8s\-api # This makes e.g. the pods api available at localhost:8011/k8s\-api/v1/pods/ -$ kubectl proxy \-\-api\-prefix=/k8s\-api +kubectl proxy \-\-api\-prefix=/k8s\-api .fi .RE diff --git a/docs/man/man1/kubectl-replace.1 b/docs/man/man1/kubectl-replace.1 index 33eb80b768..c6990b51ad 100644 --- a/docs/man/man1/kubectl-replace.1 +++ b/docs/man/man1/kubectl-replace.1 @@ -167,10 +167,10 @@ Please refer to the models in .nf # Replace a pod using the data in pod.json. -$ kubectl replace \-f ./pod.json +kubectl replace \-f ./pod.json # Replace a pod based on the JSON passed into stdin. -$ cat pod.json | kubectl replace \-f \- +cat pod.json | kubectl replace \-f \- # Update a single\-container pod's image version (tag) to v4 kubectl get pod mypod \-o yaml | sed 's/\\(image: myimage\\):.*$/\\1:v4/' | kubectl replace \-f \- diff --git a/docs/man/man1/kubectl-rolling-update.1 b/docs/man/man1/kubectl-rolling-update.1 index 1be498df08..6c93c72d46 100644 --- a/docs/man/man1/kubectl-rolling-update.1 +++ b/docs/man/man1/kubectl-rolling-update.1 @@ -198,20 +198,20 @@ existing replication controller and overwrite at least one (common) label in its .nf # Update pods of frontend\-v1 using new replication controller data in frontend\-v2.json. -$ kubectl rolling\-update frontend\-v1 \-f frontend\-v2.json +kubectl rolling\-update frontend\-v1 \-f frontend\-v2.json # Update pods of frontend\-v1 using JSON data passed into stdin. -$ cat frontend\-v2.json | kubectl rolling\-update frontend\-v1 \-f \- +cat frontend\-v2.json | kubectl rolling\-update frontend\-v1 \-f \- # Update the pods of frontend\-v1 to frontend\-v2 by just changing the image, and switching the # name of the replication controller. -$ kubectl rolling\-update frontend\-v1 frontend\-v2 \-\-image=image:v2 +kubectl rolling\-update frontend\-v1 frontend\-v2 \-\-image=image:v2 # Update the pods of frontend by just changing the image, and keeping the old name. -$ kubectl rolling\-update frontend \-\-image=image:v2 +kubectl rolling\-update frontend \-\-image=image:v2 # Abort and reverse an existing rollout in progress (from frontend\-v1 to frontend\-v2). -$ kubectl rolling\-update frontend\-v1 frontend\-v2 \-\-rollback +kubectl rolling\-update frontend\-v1 frontend\-v2 \-\-rollback .fi diff --git a/docs/man/man1/kubectl-rollout-history.1 b/docs/man/man1/kubectl-rollout-history.1 index b51355c2df..899d581660 100644 --- a/docs/man/man1/kubectl-rollout-history.1 +++ b/docs/man/man1/kubectl-rollout-history.1 @@ -126,7 +126,7 @@ view previous rollout revisions and configurations. .nf # View the rollout history of a deployment -$ kubectl rollout history deployment/abc +kubectl rollout history deployment/abc .fi .RE diff --git a/docs/man/man1/kubectl-rollout-pause.1 b/docs/man/man1/kubectl-rollout-pause.1 index 5dc75d21fa..ec83fce341 100644 --- a/docs/man/man1/kubectl-rollout-pause.1 +++ b/docs/man/man1/kubectl-rollout-pause.1 @@ -129,7 +129,7 @@ Currently only deployments support being paused. # Mark the nginx deployment as paused. Any current state of # the deployment will continue its function, new updates to the deployment will not # have an effect as long as the deployment is paused. -$ kubectl rollout pause deployment/nginx +kubectl rollout pause deployment/nginx .fi .RE diff --git a/docs/man/man1/kubectl-rollout-resume.1 b/docs/man/man1/kubectl-rollout-resume.1 index 34b9e8d703..1b436d02d0 100644 --- a/docs/man/man1/kubectl-rollout-resume.1 +++ b/docs/man/man1/kubectl-rollout-resume.1 @@ -127,7 +127,7 @@ Currently only deployments support being resumed. .nf # Resume an already paused deployment -$ kubectl rollout resume deployment/nginx +kubectl rollout resume deployment/nginx .fi .RE diff --git a/docs/man/man1/kubectl-rollout-undo.1 b/docs/man/man1/kubectl-rollout-undo.1 index c976f355dd..b512729550 100644 --- a/docs/man/man1/kubectl-rollout-undo.1 +++ b/docs/man/man1/kubectl-rollout-undo.1 @@ -126,7 +126,7 @@ undo rolls back to a previous rollout. .nf # Rollback to the previous deployment -$ kubectl rollout undo deployment/abc +kubectl rollout undo deployment/abc .fi .RE diff --git a/docs/man/man1/kubectl-rollout.1 b/docs/man/man1/kubectl-rollout.1 index d0a73e89b0..19ef9d08e8 100644 --- a/docs/man/man1/kubectl-rollout.1 +++ b/docs/man/man1/kubectl-rollout.1 @@ -116,7 +116,7 @@ rollout manages a deployment using subcommands like "kubectl rollout undo deploy .nf # Rollback to the previous deployment -$ kubectl rollout undo deployment/abc +kubectl rollout undo deployment/abc .fi .RE diff --git a/docs/man/man1/kubectl-run.1 b/docs/man/man1/kubectl-run.1 index 5b51e4e9b6..52779c6e9d 100644 --- a/docs/man/man1/kubectl-run.1 +++ b/docs/man/man1/kubectl-run.1 @@ -242,34 +242,34 @@ Creates a deployment or job to manage the created container(s). .nf # Start a single instance of nginx. -$ kubectl run nginx \-\-image=nginx +kubectl run nginx \-\-image=nginx # Start a single instance of hazelcast and let the container expose port 5701 . -$ kubectl run hazelcast \-\-image=hazelcast \-\-port=5701 +kubectl run hazelcast \-\-image=hazelcast \-\-port=5701 # Start a single instance of hazelcast and set environment variables "DNS\_DOMAIN=cluster" and "POD\_NAMESPACE=default" in the container. -$ kubectl run hazelcast \-\-image=hazelcast \-\-env="DNS\_DOMAIN=cluster" \-\-env="POD\_NAMESPACE=default" +kubectl run hazelcast \-\-image=hazelcast \-\-env="DNS\_DOMAIN=cluster" \-\-env="POD\_NAMESPACE=default" # Start a replicated instance of nginx. -$ kubectl run nginx \-\-image=nginx \-\-replicas=5 +kubectl run nginx \-\-image=nginx \-\-replicas=5 # Dry run. Print the corresponding API objects without creating them. -$ kubectl run nginx \-\-image=nginx \-\-dry\-run +kubectl run nginx \-\-image=nginx \-\-dry\-run # Start a single instance of nginx, but overload the spec of the deployment with a partial set of values parsed from JSON. -$ kubectl run nginx \-\-image=nginx \-\-overrides='{ "apiVersion": "v1", "spec": { ... } }' +kubectl run nginx \-\-image=nginx \-\-overrides='{ "apiVersion": "v1", "spec": { ... } }' # Start a single instance of busybox and keep it in the foreground, don't restart it if it exits. -$ kubectl run \-i \-\-tty busybox \-\-image=busybox \-\-restart=Never +kubectl run \-i \-\-tty busybox \-\-image=busybox \-\-restart=Never # Start the nginx container using the default command, but use custom arguments (arg1 .. argN) for that command. -$ kubectl run nginx \-\-image=nginx \-\- ... +kubectl run nginx \-\-image=nginx \-\- ... # Start the nginx container using a different command and custom arguments. -$ kubectl run nginx \-\-image=nginx \-\-command \-\- ... +kubectl run nginx \-\-image=nginx \-\-command \-\- ... # Start the perl container to compute π to 2000 places and print it out. -$ kubectl run pi \-\-image=perl \-\-restart=OnFailure \-\- perl \-Mbignum=bpi \-wle 'print bpi(2000)' +kubectl run pi \-\-image=perl \-\-restart=OnFailure \-\- perl \-Mbignum=bpi \-wle 'print bpi(2000)' .fi .RE diff --git a/docs/man/man1/kubectl-scale.1 b/docs/man/man1/kubectl-scale.1 index 92b4f2daaf..1e3fbc7ac1 100644 --- a/docs/man/man1/kubectl-scale.1 +++ b/docs/man/man1/kubectl-scale.1 @@ -152,19 +152,19 @@ scale is sent to the server. .nf # Scale replication controller named 'foo' to 3. -$ kubectl scale \-\-replicas=3 rc/foo +kubectl scale \-\-replicas=3 rc/foo # Scale a resource identified by type and name specified in "foo.yaml" to 3. -$ kubectl scale \-\-replicas=3 \-f foo.yaml +kubectl scale \-\-replicas=3 \-f foo.yaml # If the deployment named mysql's current size is 2, scale mysql to 3. -$ kubectl scale \-\-current\-replicas=2 \-\-replicas=3 deployment/mysql +kubectl scale \-\-current\-replicas=2 \-\-replicas=3 deployment/mysql # Scale multiple replication controllers. -$ kubectl scale \-\-replicas=5 rc/foo rc/bar rc/baz +kubectl scale \-\-replicas=5 rc/foo rc/bar rc/baz # Scale job named 'cron' to 3. -$ kubectl scale \-\-replicas=3 job/cron +kubectl scale \-\-replicas=3 job/cron .fi .RE diff --git a/docs/man/man1/kubectl-stop.1 b/docs/man/man1/kubectl-stop.1 index 3a9858b970..3d4da5aa54 100644 --- a/docs/man/man1/kubectl-stop.1 +++ b/docs/man/man1/kubectl-stop.1 @@ -154,16 +154,16 @@ If the resource is scalable it will be scaled to 0 before deletion. .nf # Shut down foo. -$ kubectl stop replicationcontroller foo +kubectl stop replicationcontroller foo # Stop pods and services with label name=myLabel. -$ kubectl stop pods,services \-l name=myLabel +kubectl stop pods,services \-l name=myLabel # Shut down the service defined in service.json -$ kubectl stop \-f service.json +kubectl stop \-f service.json # Shut down all resources in the path/to/resources directory -$ kubectl stop \-f path/to/resources +kubectl stop \-f path/to/resources .fi .RE diff --git a/docs/user-guide/kubectl/kubectl_annotate.md b/docs/user-guide/kubectl/kubectl_annotate.md index a4c8783144..4e4d8bcf06 100644 --- a/docs/user-guide/kubectl/kubectl_annotate.md +++ b/docs/user-guide/kubectl/kubectl_annotate.md @@ -60,23 +60,23 @@ kubectl annotate [--overwrite] (-f FILENAME | TYPE NAME) KEY_1=VAL_1 ... KEY_N=V ``` # Update pod 'foo' with the annotation 'description' and the value 'my frontend'. # If the same annotation is set multiple times, only the last value will be applied -$ kubectl annotate pods foo description='my frontend' +kubectl annotate pods foo description='my frontend' # Update a pod identified by type and name in "pod.json" -$ kubectl annotate -f pod.json description='my frontend' +kubectl annotate -f pod.json description='my frontend' # Update pod 'foo' with the annotation 'description' and the value 'my frontend running nginx', overwriting any existing value. -$ kubectl annotate --overwrite pods foo description='my frontend running nginx' +kubectl annotate --overwrite pods foo description='my frontend running nginx' # Update all pods in the namespace -$ kubectl annotate pods --all description='my frontend running nginx' +kubectl annotate pods --all description='my frontend running nginx' # Update pod 'foo' only if the resource is unchanged from version 1. -$ kubectl annotate pods foo description='my frontend running nginx' --resource-version=1 +kubectl annotate pods foo description='my frontend running nginx' --resource-version=1 # Update pod 'foo' by removing an annotation named 'description' if it exists. # Does not require the --overwrite flag. -$ kubectl annotate pods foo description- +kubectl annotate pods foo description- ``` ### Options @@ -129,7 +129,7 @@ $ kubectl annotate pods foo description- * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 14-Feb-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_annotate.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_apply.md b/docs/user-guide/kubectl/kubectl_apply.md index 0d2fca94f5..97a3f991d9 100644 --- a/docs/user-guide/kubectl/kubectl_apply.md +++ b/docs/user-guide/kubectl/kubectl_apply.md @@ -52,10 +52,10 @@ kubectl apply -f FILENAME ``` # Apply the configuration in pod.json to a pod. -$ kubectl apply -f ./pod.json +kubectl apply -f ./pod.json # Apply the JSON passed into stdin to a pod. -$ cat pod.json | kubectl apply -f - +cat pod.json | kubectl apply -f - ``` ### Options @@ -100,7 +100,7 @@ $ cat pod.json | kubectl apply -f - * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 22-Jan-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_apply.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_attach.md b/docs/user-guide/kubectl/kubectl_attach.md index eeb6ba6cb0..ea2572f34f 100644 --- a/docs/user-guide/kubectl/kubectl_attach.md +++ b/docs/user-guide/kubectl/kubectl_attach.md @@ -49,14 +49,14 @@ kubectl attach POD -c CONTAINER ``` # Get output from running pod 123456-7890, using the first container by default -$ kubectl attach 123456-7890 +kubectl attach 123456-7890 # Get output from ruby-container from pod 123456-7890 -$ kubectl attach 123456-7890 -c ruby-container +kubectl attach 123456-7890 -c ruby-container # Switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-7890 # and sends stdout/stderr from 'bash' back to the client -$ kubectl attach 123456-7890 -c ruby-container -i -t +kubectl attach 123456-7890 -c ruby-container -i -t ``` ### Options @@ -99,7 +99,7 @@ $ kubectl attach 123456-7890 -c ruby-container -i -t * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 8-Dec-2015 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_attach.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_autoscale.md b/docs/user-guide/kubectl/kubectl_autoscale.md index 1ecc0997b2..644d5ff4b0 100644 --- a/docs/user-guide/kubectl/kubectl_autoscale.md +++ b/docs/user-guide/kubectl/kubectl_autoscale.md @@ -52,10 +52,10 @@ kubectl autoscale (-f FILENAME | TYPE NAME | TYPE/NAME) [--min=MINPODS] --max=MA ``` # Auto scale a deployment "foo", with the number of pods between 2 to 10, target CPU utilization at a default value that server applies: -$ kubectl autoscale deployment foo --min=2 --max=10 +kubectl autoscale deployment foo --min=2 --max=10 # Auto scale a replication controller "foo", with the number of pods between 1 to 5, target CPU utilization at 80%: -$ kubectl autoscale rc foo --max=5 --cpu-percent=80 +kubectl autoscale rc foo --max=5 --cpu-percent=80 ``` ### Options @@ -111,7 +111,7 @@ $ kubectl autoscale rc foo --max=5 --cpu-percent=80 * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 14-Feb-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_autoscale.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_config_current-context.md b/docs/user-guide/kubectl/kubectl_config_current-context.md index 3ee137d4ef..3c9483622d 100644 --- a/docs/user-guide/kubectl/kubectl_config_current-context.md +++ b/docs/user-guide/kubectl/kubectl_config_current-context.md @@ -44,7 +44,7 @@ kubectl config current-context ``` # Display the current-context -$ kubectl config current-context +kubectl config current-context ``` ### Options inherited from parent commands @@ -79,7 +79,7 @@ $ kubectl config current-context * [kubectl config](kubectl_config.md) - config modifies kubeconfig files -###### Auto generated by spf13/cobra on 9-Jan-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_current-context.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_config_set-cluster.md b/docs/user-guide/kubectl/kubectl_config_set-cluster.md index b0c1588ad0..7c6694d678 100644 --- a/docs/user-guide/kubectl/kubectl_config_set-cluster.md +++ b/docs/user-guide/kubectl/kubectl_config_set-cluster.md @@ -50,13 +50,13 @@ kubectl config set-cluster NAME [--server=server] [--certificate-authority=path/ ``` # Set only the server field on the e2e cluster entry without touching other values. -$ kubectl config set-cluster e2e --server=https://1.2.3.4 +kubectl config set-cluster e2e --server=https://1.2.3.4 # Embed certificate authority data for the e2e cluster entry -$ kubectl config set-cluster e2e --certificate-authority=~/.kube/e2e/kubernetes.ca.crt +kubectl config set-cluster e2e --certificate-authority=~/.kube/e2e/kubernetes.ca.crt # Disable cert checking for the dev cluster entry -$ kubectl config set-cluster e2e --insecure-skip-tls-verify=true +kubectl config set-cluster e2e --insecure-skip-tls-verify=true ``` ### Options @@ -97,7 +97,7 @@ $ kubectl config set-cluster e2e --insecure-skip-tls-verify=true * [kubectl config](kubectl_config.md) - config modifies kubeconfig files -###### Auto generated by spf13/cobra on 8-Jan-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_set-cluster.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_config_set-context.md b/docs/user-guide/kubectl/kubectl_config_set-context.md index a2d2f51379..c36808efa6 100644 --- a/docs/user-guide/kubectl/kubectl_config_set-context.md +++ b/docs/user-guide/kubectl/kubectl_config_set-context.md @@ -50,7 +50,7 @@ kubectl config set-context NAME [--cluster=cluster_nickname] [--user=user_nickna ``` # Set the user field on the gce context entry without touching other values -$ kubectl config set-context gce --user=cluster-admin +kubectl config set-context gce --user=cluster-admin ``` ### Options @@ -90,7 +90,7 @@ $ kubectl config set-context gce --user=cluster-admin * [kubectl config](kubectl_config.md) - config modifies kubeconfig files -###### Auto generated by spf13/cobra on 8-Dec-2015 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_set-context.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_config_set-credentials.md b/docs/user-guide/kubectl/kubectl_config_set-credentials.md index 6a918a2850..5029817fe2 100644 --- a/docs/user-guide/kubectl/kubectl_config_set-credentials.md +++ b/docs/user-guide/kubectl/kubectl_config_set-credentials.md @@ -63,13 +63,13 @@ kubectl config set-credentials NAME [--client-certificate=path/to/certfile] [--c ``` # Set only the "client-key" field on the "cluster-admin" # entry, without touching other values: -$ kubectl config set-credentials cluster-admin --client-key=~/.kube/admin.key +kubectl config set-credentials cluster-admin --client-key=~/.kube/admin.key # Set basic auth for the "cluster-admin" entry -$ kubectl config set-credentials cluster-admin --username=admin --password=uXFGweU9l35qcif +kubectl config set-credentials cluster-admin --username=admin --password=uXFGweU9l35qcif # Embed client certificate data in the "cluster-admin" entry -$ kubectl config set-credentials cluster-admin --client-certificate=~/.kube/admin.crt --embed-certs=true +kubectl config set-credentials cluster-admin --client-certificate=~/.kube/admin.crt --embed-certs=true ``` ### Options @@ -110,7 +110,7 @@ $ kubectl config set-credentials cluster-admin --client-certificate=~/.kube/admi * [kubectl config](kubectl_config.md) - config modifies kubeconfig files -###### Auto generated by spf13/cobra on 8-Jan-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_set-credentials.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_config_view.md b/docs/user-guide/kubectl/kubectl_config_view.md index 2ef54d239a..6f01d957f8 100644 --- a/docs/user-guide/kubectl/kubectl_config_view.md +++ b/docs/user-guide/kubectl/kubectl_config_view.md @@ -51,10 +51,10 @@ kubectl config view ``` # Show Merged kubeconfig settings. -$ kubectl config view +kubectl config view # Get the password for the e2e user -$ kubectl config view -o jsonpath='{.users[?(@.name == "e2e")].user.password}' +kubectl config view -o jsonpath='{.users[?(@.name == "e2e")].user.password}' ``` ### Options @@ -105,7 +105,7 @@ $ kubectl config view -o jsonpath='{.users[?(@.name == "e2e")].user.password}' * [kubectl config](kubectl_config.md) - config modifies kubeconfig files -###### Auto generated by spf13/cobra on 14-Feb-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_view.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_convert.md b/docs/user-guide/kubectl/kubectl_convert.md index 31c9aa90a0..29a9f1f927 100644 --- a/docs/user-guide/kubectl/kubectl_convert.md +++ b/docs/user-guide/kubectl/kubectl_convert.md @@ -53,14 +53,14 @@ kubectl convert -f FILENAME ``` # Convert 'pod.yaml' to latest version and print to stdout. -$ kubectl convert -f pod.yaml +kubectl convert -f pod.yaml # Convert the live state of the resource specified by 'pod.yaml' to the latest version # and print to stdout in json format. -$ kubectl convert -f pod.yaml --local -o json +kubectl convert -f pod.yaml --local -o json # Convert all files under current directory to latest version and create them all. -$ kubectl convert -f . | kubectl create -f - +kubectl convert -f . | kubectl create -f - ``` @@ -112,7 +112,7 @@ $ kubectl convert -f . | kubectl create -f - * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 14-Feb-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_convert.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_cordon.md b/docs/user-guide/kubectl/kubectl_cordon.md index cb4be4db8c..2030ef486a 100644 --- a/docs/user-guide/kubectl/kubectl_cordon.md +++ b/docs/user-guide/kubectl/kubectl_cordon.md @@ -45,7 +45,7 @@ kubectl cordon NODE ``` # Mark node "foo" as unschedulable. -$ kubectl cordon foo +kubectl cordon foo ``` @@ -81,7 +81,7 @@ $ kubectl cordon foo * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 4-Jan-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_cordon.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_create.md b/docs/user-guide/kubectl/kubectl_create.md index 311eec64cf..8a2c986392 100644 --- a/docs/user-guide/kubectl/kubectl_create.md +++ b/docs/user-guide/kubectl/kubectl_create.md @@ -51,10 +51,10 @@ kubectl create -f FILENAME ``` # Create a pod using the data in pod.json. -$ kubectl create -f ./pod.json +kubectl create -f ./pod.json # Create a pod based on the JSON passed into stdin. -$ cat pod.json | kubectl create -f - +cat pod.json | kubectl create -f - ``` ### Options @@ -103,7 +103,7 @@ $ cat pod.json | kubectl create -f - * [kubectl create namespace](kubectl_create_namespace.md) - Create a namespace with the specified name. * [kubectl create secret](kubectl_create_secret.md) - Create a secret using specified subcommand. -###### Auto generated by spf13/cobra on 17-Feb-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_create.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_create_configmap.md b/docs/user-guide/kubectl/kubectl_create_configmap.md index 00117f729a..9e6615cdc2 100644 --- a/docs/user-guide/kubectl/kubectl_create_configmap.md +++ b/docs/user-guide/kubectl/kubectl_create_configmap.md @@ -54,13 +54,13 @@ kubectl create configmap NAME [--type=string] [--from-file=[key=]source] [--from ``` # Create a new configmap named my-config with keys for each file in folder bar - $ kubectl create configmap generic my-config --from-file=path/to/bar + kubectl create configmap generic my-config --from-file=path/to/bar # Create a new configmap named my-config with specified keys instead of names on disk - $ kubectl create configmap generic my-config --from-file=ssh-privatekey=~/.ssh/id_rsa --from-file=ssh-publickey=~/.ssh/id_rsa.pub + kubectl create configmap generic my-config --from-file=ssh-privatekey=~/.ssh/id_rsa --from-file=ssh-publickey=~/.ssh/id_rsa.pub # Create a new configMap named my-config with key1=config1 and key2=config2 - $ kubectl create configmap generic my-config --from-literal=key1=config1 --from-literal=key2=config2 + kubectl create configmap generic my-config --from-literal=key1=config1 --from-literal=key2=config2 ``` ### Options @@ -114,7 +114,7 @@ kubectl create configmap NAME [--type=string] [--from-file=[key=]source] [--from * [kubectl create](kubectl_create.md) - Create a resource by filename or stdin -###### Auto generated by spf13/cobra on 18-Feb-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_create_configmap.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_create_namespace.md b/docs/user-guide/kubectl/kubectl_create_namespace.md index 2b4236f8e1..3e26c548c0 100644 --- a/docs/user-guide/kubectl/kubectl_create_namespace.md +++ b/docs/user-guide/kubectl/kubectl_create_namespace.md @@ -45,7 +45,7 @@ kubectl create namespace NAME [--dry-run] ``` # Create a new namespace named my-namespace - $ kubectl create namespace my-namespace + kubectl create namespace my-namespace ``` ### Options @@ -97,7 +97,7 @@ kubectl create namespace NAME [--dry-run] * [kubectl create](kubectl_create.md) - Create a resource by filename or stdin -###### Auto generated by spf13/cobra on 14-Feb-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_create_namespace.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_create_secret_generic.md b/docs/user-guide/kubectl/kubectl_create_secret_generic.md index 2104a51a8a..348f58d5eb 100644 --- a/docs/user-guide/kubectl/kubectl_create_secret_generic.md +++ b/docs/user-guide/kubectl/kubectl_create_secret_generic.md @@ -55,13 +55,13 @@ kubectl create secret generic NAME [--type=string] [--from-file=[key=]source] [- ``` # Create a new secret named my-secret with keys for each file in folder bar - $ kubectl create secret generic my-secret --from-file=path/to/bar + kubectl create secret generic my-secret --from-file=path/to/bar # Create a new secret named my-secret with specified keys instead of names on disk - $ kubectl create secret generic my-secret --from-file=ssh-privatekey=~/.ssh/id_rsa --from-file=ssh-publickey=~/.ssh/id_rsa.pub + kubectl create secret generic my-secret --from-file=ssh-privatekey=~/.ssh/id_rsa --from-file=ssh-publickey=~/.ssh/id_rsa.pub # Create a new secret named my-secret with key1=supersecret and key2=topsecret - $ kubectl create secret generic my-secret --from-literal=key1=supersecret --from-literal=key2=topsecret + kubectl create secret generic my-secret --from-literal=key1=supersecret --from-literal=key2=topsecret ``` ### Options @@ -116,7 +116,7 @@ kubectl create secret generic NAME [--type=string] [--from-file=[key=]source] [- * [kubectl create secret](kubectl_create_secret.md) - Create a secret using specified subcommand. -###### Auto generated by spf13/cobra on 18-Feb-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_create_secret_generic.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_delete.md b/docs/user-guide/kubectl/kubectl_delete.md index fc02a27062..d5ac43b3b6 100644 --- a/docs/user-guide/kubectl/kubectl_delete.md +++ b/docs/user-guide/kubectl/kubectl_delete.md @@ -57,22 +57,22 @@ kubectl delete ([-f FILENAME] | TYPE [(NAME | -l label | --all)]) ``` # Delete a pod using the type and name specified in pod.json. -$ kubectl delete -f ./pod.json +kubectl delete -f ./pod.json # Delete a pod based on the type and name in the JSON passed into stdin. -$ cat pod.json | kubectl delete -f - +cat pod.json | kubectl delete -f - # Delete pods and services with same names "baz" and "foo" -$ kubectl delete pod,service baz foo +kubectl delete pod,service baz foo # Delete pods and services with label name=myLabel. -$ kubectl delete pods,services -l name=myLabel +kubectl delete pods,services -l name=myLabel # Delete a pod with UID 1234-56-7890-234234-456456. -$ kubectl delete pod 1234-56-7890-234234-456456 +kubectl delete pod 1234-56-7890-234234-456456 # Delete all pods -$ kubectl delete pods --all +kubectl delete pods --all ``` ### Options @@ -120,7 +120,7 @@ $ kubectl delete pods --all * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 8-Dec-2015 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_delete.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_describe.md b/docs/user-guide/kubectl/kubectl_describe.md index cae389972e..d0c84db607 100644 --- a/docs/user-guide/kubectl/kubectl_describe.md +++ b/docs/user-guide/kubectl/kubectl_describe.md @@ -63,23 +63,23 @@ kubectl describe (-f FILENAME | TYPE [NAME_PREFIX | -l label] | TYPE/NAME) ``` # Describe a node -$ kubectl describe nodes kubernetes-minion-emt8.c.myproject.internal +kubectl describe nodes kubernetes-minion-emt8.c.myproject.internal # Describe a pod -$ kubectl describe pods/nginx +kubectl describe pods/nginx # Describe a pod identified by type and name in "pod.json" -$ kubectl describe -f pod.json +kubectl describe -f pod.json # Describe all pods -$ kubectl describe pods +kubectl describe pods # Describe pods by label name=myLabel -$ kubectl describe po -l name=myLabel +kubectl describe po -l name=myLabel # Describe all pods managed by the 'frontend' replication controller (rc-created pods # get the name of the rc as a prefix in the pod the name). -$ kubectl describe pods frontend +kubectl describe pods frontend ``` ### Options @@ -121,7 +121,7 @@ $ kubectl describe pods frontend * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 8-Dec-2015 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_describe.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_edit.md b/docs/user-guide/kubectl/kubectl_edit.md index ee8ec24b66..4b07618e1f 100644 --- a/docs/user-guide/kubectl/kubectl_edit.md +++ b/docs/user-guide/kubectl/kubectl_edit.md @@ -67,13 +67,13 @@ kubectl edit (RESOURCE/NAME | -f FILENAME) ``` # Edit the service named 'docker-registry': - $ kubectl edit svc/docker-registry + kubectl edit svc/docker-registry # Use an alternative editor - $ KUBE_EDITOR="nano" kubectl edit svc/docker-registry + KUBE_EDITOR="nano" kubectl edit svc/docker-registry # Edit the service 'docker-registry' in JSON using the v1 API format: - $ kubectl edit svc/docker-registry --output-version=v1 -o json + kubectl edit svc/docker-registry --output-version=v1 -o json ``` ### Options @@ -119,7 +119,7 @@ kubectl edit (RESOURCE/NAME | -f FILENAME) * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 22-Jan-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_edit.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_exec.md b/docs/user-guide/kubectl/kubectl_exec.md index 78706a4636..d3ddde76b1 100644 --- a/docs/user-guide/kubectl/kubectl_exec.md +++ b/docs/user-guide/kubectl/kubectl_exec.md @@ -49,14 +49,14 @@ kubectl exec POD [-c CONTAINER] -- COMMAND [args...] ``` # Get output from running 'date' from pod 123456-7890, using the first container by default -$ kubectl exec 123456-7890 date +kubectl exec 123456-7890 date # Get output from running 'date' in ruby-container from pod 123456-7890 -$ kubectl exec 123456-7890 -c ruby-container date +kubectl exec 123456-7890 -c ruby-container date # Switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-7890 # and sends stdout/stderr from 'bash' back to the client -$ kubectl exec 123456-7890 -c ruby-container -i -t -- bash -il +kubectl exec 123456-7890 -c ruby-container -i -t -- bash -il ``` ### Options @@ -100,7 +100,7 @@ $ kubectl exec 123456-7890 -c ruby-container -i -t -- bash -il * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 8-Dec-2015 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_exec.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_explain.md b/docs/user-guide/kubectl/kubectl_explain.md index f51ddad527..eb20a05740 100644 --- a/docs/user-guide/kubectl/kubectl_explain.md +++ b/docs/user-guide/kubectl/kubectl_explain.md @@ -50,10 +50,10 @@ kubectl explain RESOURCE ``` # Get the documentation of the resource and its fields -$ kubectl explain pods +kubectl explain pods # Get the documentation of a specific field of a resource -$ kubectl explain pods.spec.containers +kubectl explain pods.spec.containers ``` ### Options @@ -94,7 +94,7 @@ $ kubectl explain pods.spec.containers * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 24-Nov-2015 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_explain.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_expose.md b/docs/user-guide/kubectl/kubectl_expose.md index 40a2ad1d0b..6ede68f3b4 100644 --- a/docs/user-guide/kubectl/kubectl_expose.md +++ b/docs/user-guide/kubectl/kubectl_expose.md @@ -56,22 +56,22 @@ kubectl expose (-f FILENAME | TYPE NAME) [--port=port] [--protocol=TCP|UDP] [--t ``` # Create a service for a replicated nginx, which serves on port 80 and connects to the containers on port 8000. -$ kubectl expose rc nginx --port=80 --target-port=8000 +kubectl expose rc nginx --port=80 --target-port=8000 # Create a service for a replication controller identified by type and name specified in "nginx-controller.yaml", which serves on port 80 and connects to the containers on port 8000. -$ kubectl expose -f nginx-controller.yaml --port=80 --target-port=8000 +kubectl expose -f nginx-controller.yaml --port=80 --target-port=8000 # Create a service for a pod valid-pod, which serves on port 444 with the name "frontend" -$ kubectl expose pod valid-pod --port=444 --name=frontend +kubectl expose pod valid-pod --port=444 --name=frontend # Create a second service based on the above service, exposing the container port 8443 as port 443 with the name "nginx-https" -$ kubectl expose service nginx --port=443 --target-port=8443 --name=nginx-https +kubectl expose service nginx --port=443 --target-port=8443 --name=nginx-https # Create a service for a replicated streaming application on port 4100 balancing UDP traffic and named 'video-stream'. -$ kubectl expose rc streamer --port=4100 --protocol=udp --name=video-stream +kubectl expose rc streamer --port=4100 --protocol=udp --name=video-stream # Create a service for a replicated nginx using replica set, which serves on port 80 and connects to the containers on port 8000. -$ kubectl expose rs nginx --port=80 --target-port=8000 +kubectl expose rs nginx --port=80 --target-port=8000 ``` ### Options @@ -135,7 +135,7 @@ $ kubectl expose rs nginx --port=80 --target-port=8000 * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 14-Feb-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_expose.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_get.md b/docs/user-guide/kubectl/kubectl_get.md index 1995ec0608..7533b209a7 100644 --- a/docs/user-guide/kubectl/kubectl_get.md +++ b/docs/user-guide/kubectl/kubectl_get.md @@ -58,28 +58,28 @@ kubectl get [(-o|--output=)json|yaml|wide|go-template=...|go-template-file=...|j ``` # List all pods in ps output format. -$ kubectl get pods +kubectl get pods # List all pods in ps output format with more information (such as node name). -$ kubectl get pods -o wide +kubectl get pods -o wide # List a single replication controller with specified NAME in ps output format. -$ kubectl get replicationcontroller web +kubectl get replicationcontroller web # List a single pod in JSON output format. -$ kubectl get -o json pod web-pod-13je7 +kubectl get -o json pod web-pod-13je7 # List a pod identified by type and name specified in "pod.yaml" in JSON output format. -$ kubectl get -f pod.yaml -o json +kubectl get -f pod.yaml -o json # Return only the phase value of the specified pod. -$ kubectl get -o template pod/web-pod-13je7 --template={{.status.phase}} --api-version=v1 +kubectl get -o template pod/web-pod-13je7 --template={{.status.phase}} --api-version=v1 # List all replication controllers and services together in ps output format. -$ kubectl get rc,services +kubectl get rc,services # List one or more resources by their type and names. -$ kubectl get rc/web service/frontend pods/web-pod-13je7 +kubectl get rc/web service/frontend pods/web-pod-13je7 ``` ### Options @@ -133,7 +133,7 @@ $ kubectl get rc/web service/frontend pods/web-pod-13je7 * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 14-Feb-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_get.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_label.md b/docs/user-guide/kubectl/kubectl_label.md index 7c24caa182..2dfc068f91 100644 --- a/docs/user-guide/kubectl/kubectl_label.md +++ b/docs/user-guide/kubectl/kubectl_label.md @@ -53,23 +53,23 @@ kubectl label [--overwrite] (-f FILENAME | TYPE NAME) KEY_1=VAL_1 ... KEY_N=VAL_ ``` # Update pod 'foo' with the label 'unhealthy' and the value 'true'. -$ kubectl label pods foo unhealthy=true +kubectl label pods foo unhealthy=true # Update pod 'foo' with the label 'status' and the value 'unhealthy', overwriting any existing value. -$ kubectl label --overwrite pods foo status=unhealthy +kubectl label --overwrite pods foo status=unhealthy # Update all pods in the namespace -$ kubectl label pods --all status=unhealthy +kubectl label pods --all status=unhealthy # Update a pod identified by the type and name in "pod.json" -$ kubectl label -f pod.json status=unhealthy +kubectl label -f pod.json status=unhealthy # Update pod 'foo' only if the resource is unchanged from version 1. -$ kubectl label pods foo status=unhealthy --resource-version=1 +kubectl label pods foo status=unhealthy --resource-version=1 # Update pod 'foo' by removing a label named 'bar' if it exists. # Does not require the --overwrite flag. -$ kubectl label pods foo bar- +kubectl label pods foo bar- ``` ### Options @@ -123,7 +123,7 @@ $ kubectl label pods foo bar- * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 14-Feb-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_label.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_logs.md b/docs/user-guide/kubectl/kubectl_logs.md index c5bc2e5ed2..3f4e5feb94 100644 --- a/docs/user-guide/kubectl/kubectl_logs.md +++ b/docs/user-guide/kubectl/kubectl_logs.md @@ -49,19 +49,19 @@ kubectl logs [-f] [-p] POD [-c CONTAINER] ``` # Return snapshot logs from pod nginx with only one container -$ kubectl logs nginx +kubectl logs nginx # Return snapshot of previous terminated ruby container logs from pod web-1 -$ kubectl logs -p -c ruby web-1 +kubectl logs -p -c ruby web-1 # Begin streaming the logs of the ruby container in pod web-1 -$ kubectl logs -f -c ruby web-1 +kubectl logs -f -c ruby web-1 # Display only the most recent 20 lines of output in pod nginx -$ kubectl logs --tail=20 nginx +kubectl logs --tail=20 nginx # Show all logs from pod nginx written in the last hour -$ kubectl logs --since=1h nginx +kubectl logs --since=1h nginx ``` ### Options @@ -109,7 +109,7 @@ $ kubectl logs --since=1h nginx * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 8-Dec-2015 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_logs.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_port-forward.md b/docs/user-guide/kubectl/kubectl_port-forward.md index a7495d6495..f22c87fe93 100644 --- a/docs/user-guide/kubectl/kubectl_port-forward.md +++ b/docs/user-guide/kubectl/kubectl_port-forward.md @@ -50,16 +50,16 @@ kubectl port-forward POD [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT ``` # Listen on ports 5000 and 6000 locally, forwarding data to/from ports 5000 and 6000 in the pod -$ kubectl port-forward mypod 5000 6000 +kubectl port-forward mypod 5000 6000 # Listen on port 8888 locally, forwarding to 5000 in the pod -$ kubectl port-forward mypod 8888:5000 +kubectl port-forward mypod 8888:5000 # Listen on a random port locally, forwarding to 5000 in the pod -$ kubectl port-forward mypod :5000 +kubectl port-forward mypod :5000 # Listen on a random port locally, forwarding to 5000 in the pod -$ kubectl port-forward mypod 0:5000 +kubectl port-forward mypod 0:5000 ``` ### Options @@ -100,7 +100,7 @@ $ kubectl port-forward mypod 0:5000 * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 8-Dec-2015 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_port-forward.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_proxy.md b/docs/user-guide/kubectl/kubectl_proxy.md index c1fdc85889..64791da853 100644 --- a/docs/user-guide/kubectl/kubectl_proxy.md +++ b/docs/user-guide/kubectl/kubectl_proxy.md @@ -64,15 +64,15 @@ kubectl proxy [--port=PORT] [--www=static-dir] [--www-prefix=prefix] [--api-pref ``` # Run a proxy to kubernetes apiserver on port 8011, serving static content from ./local/www/ -$ kubectl proxy --port=8011 --www=./local/www/ +kubectl proxy --port=8011 --www=./local/www/ # Run a proxy to kubernetes apiserver on an arbitrary local port. # The chosen port for the server will be output to stdout. -$ kubectl proxy --port=0 +kubectl proxy --port=0 # Run a proxy to kubernetes apiserver, changing the api prefix to k8s-api # This makes e.g. the pods api available at localhost:8011/k8s-api/v1/pods/ -$ kubectl proxy --api-prefix=/k8s-api +kubectl proxy --api-prefix=/k8s-api ``` ### Options @@ -123,7 +123,7 @@ $ kubectl proxy --api-prefix=/k8s-api * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 8-Dec-2015 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_proxy.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_replace.md b/docs/user-guide/kubectl/kubectl_replace.md index 100f3dff75..d7a53c2398 100644 --- a/docs/user-guide/kubectl/kubectl_replace.md +++ b/docs/user-guide/kubectl/kubectl_replace.md @@ -55,10 +55,10 @@ kubectl replace -f FILENAME ``` # Replace a pod using the data in pod.json. -$ kubectl replace -f ./pod.json +kubectl replace -f ./pod.json # Replace a pod based on the JSON passed into stdin. -$ cat pod.json | kubectl replace -f - +cat pod.json | kubectl replace -f - # Update a single-container pod's image version (tag) to v4 kubectl get pod mypod -o yaml | sed 's/\(image: myimage\):.*$/\1:v4/' | kubectl replace -f - @@ -114,7 +114,7 @@ kubectl replace --force -f ./pod.json * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 22-Jan-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_replace.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_rolling-update.md b/docs/user-guide/kubectl/kubectl_rolling-update.md index 9485e26e7c..2ffda2dca0 100644 --- a/docs/user-guide/kubectl/kubectl_rolling-update.md +++ b/docs/user-guide/kubectl/kubectl_rolling-update.md @@ -53,20 +53,20 @@ kubectl rolling-update OLD_CONTROLLER_NAME ([NEW_CONTROLLER_NAME] --image=NEW_CO ``` # Update pods of frontend-v1 using new replication controller data in frontend-v2.json. -$ kubectl rolling-update frontend-v1 -f frontend-v2.json +kubectl rolling-update frontend-v1 -f frontend-v2.json # Update pods of frontend-v1 using JSON data passed into stdin. -$ cat frontend-v2.json | kubectl rolling-update frontend-v1 -f - +cat frontend-v2.json | kubectl rolling-update frontend-v1 -f - # Update the pods of frontend-v1 to frontend-v2 by just changing the image, and switching the # name of the replication controller. -$ kubectl rolling-update frontend-v1 frontend-v2 --image=image:v2 +kubectl rolling-update frontend-v1 frontend-v2 --image=image:v2 # Update the pods of frontend by just changing the image, and keeping the old name. -$ kubectl rolling-update frontend --image=image:v2 +kubectl rolling-update frontend --image=image:v2 # Abort and reverse an existing rollout in progress (from frontend-v1 to frontend-v2). -$ kubectl rolling-update frontend-v1 frontend-v2 --rollback +kubectl rolling-update frontend-v1 frontend-v2 --rollback ``` @@ -125,7 +125,7 @@ $ kubectl rolling-update frontend-v1 frontend-v2 --rollback * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 14-Feb-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_rolling-update.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_rollout.md b/docs/user-guide/kubectl/kubectl_rollout.md index 327d5f67a1..97b2148d8b 100644 --- a/docs/user-guide/kubectl/kubectl_rollout.md +++ b/docs/user-guide/kubectl/kubectl_rollout.md @@ -44,7 +44,7 @@ kubectl rollout SUBCOMMAND ``` # Rollback to the previous deployment -$ kubectl rollout undo deployment/abc +kubectl rollout undo deployment/abc ``` ### Options inherited from parent commands @@ -83,7 +83,7 @@ $ kubectl rollout undo deployment/abc * [kubectl rollout resume](kubectl_rollout_resume.md) - Resume a paused resource * [kubectl rollout undo](kubectl_rollout_undo.md) - undoes a previous rollout -###### Auto generated by spf13/cobra on 2-Feb-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_rollout.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_rollout_history.md b/docs/user-guide/kubectl/kubectl_rollout_history.md index 8e22a43242..52c5673454 100644 --- a/docs/user-guide/kubectl/kubectl_rollout_history.md +++ b/docs/user-guide/kubectl/kubectl_rollout_history.md @@ -44,7 +44,7 @@ kubectl rollout history (TYPE NAME | TYPE/NAME) [flags] ``` # View the rollout history of a deployment -$ kubectl rollout history deployment/abc +kubectl rollout history deployment/abc ``` ### Options @@ -86,7 +86,7 @@ $ kubectl rollout history deployment/abc * [kubectl rollout](kubectl_rollout.md) - rollout manages a deployment -###### Auto generated by spf13/cobra on 29-Jan-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_rollout_history.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_rollout_pause.md b/docs/user-guide/kubectl/kubectl_rollout_pause.md index 1a79dc5378..021b85c08b 100644 --- a/docs/user-guide/kubectl/kubectl_rollout_pause.md +++ b/docs/user-guide/kubectl/kubectl_rollout_pause.md @@ -50,7 +50,7 @@ kubectl rollout pause RESOURCE # Mark the nginx deployment as paused. Any current state of # the deployment will continue its function, new updates to the deployment will not # have an effect as long as the deployment is paused. -$ kubectl rollout pause deployment/nginx +kubectl rollout pause deployment/nginx ``` ### Options @@ -91,7 +91,7 @@ $ kubectl rollout pause deployment/nginx * [kubectl rollout](kubectl_rollout.md) - rollout manages a deployment -###### Auto generated by spf13/cobra on 2-Feb-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_rollout_pause.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_rollout_resume.md b/docs/user-guide/kubectl/kubectl_rollout_resume.md index f5fd45277e..ff27a9930b 100644 --- a/docs/user-guide/kubectl/kubectl_rollout_resume.md +++ b/docs/user-guide/kubectl/kubectl_rollout_resume.md @@ -48,7 +48,7 @@ kubectl rollout resume RESOURCE ``` # Resume an already paused deployment -$ kubectl rollout resume deployment/nginx +kubectl rollout resume deployment/nginx ``` ### Options @@ -89,7 +89,7 @@ $ kubectl rollout resume deployment/nginx * [kubectl rollout](kubectl_rollout.md) - rollout manages a deployment -###### Auto generated by spf13/cobra on 2-Feb-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_rollout_resume.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_rollout_undo.md b/docs/user-guide/kubectl/kubectl_rollout_undo.md index 659177bf81..9648a0f82a 100644 --- a/docs/user-guide/kubectl/kubectl_rollout_undo.md +++ b/docs/user-guide/kubectl/kubectl_rollout_undo.md @@ -44,7 +44,7 @@ kubectl rollout undo (TYPE NAME | TYPE/NAME) [flags] ``` # Rollback to the previous deployment -$ kubectl rollout undo deployment/abc +kubectl rollout undo deployment/abc ``` ### Options @@ -86,7 +86,7 @@ $ kubectl rollout undo deployment/abc * [kubectl rollout](kubectl_rollout.md) - rollout manages a deployment -###### Auto generated by spf13/cobra on 29-Jan-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_rollout_undo.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_run.md b/docs/user-guide/kubectl/kubectl_run.md index 26b35ed052..e5a355e20a 100644 --- a/docs/user-guide/kubectl/kubectl_run.md +++ b/docs/user-guide/kubectl/kubectl_run.md @@ -50,34 +50,34 @@ kubectl run NAME --image=image [--env="key=value"] [--port=port] [--replicas=rep ``` # Start a single instance of nginx. -$ kubectl run nginx --image=nginx +kubectl run nginx --image=nginx # Start a single instance of hazelcast and let the container expose port 5701 . -$ kubectl run hazelcast --image=hazelcast --port=5701 +kubectl run hazelcast --image=hazelcast --port=5701 # Start a single instance of hazelcast and set environment variables "DNS_DOMAIN=cluster" and "POD_NAMESPACE=default" in the container. -$ kubectl run hazelcast --image=hazelcast --env="DNS_DOMAIN=cluster" --env="POD_NAMESPACE=default" +kubectl run hazelcast --image=hazelcast --env="DNS_DOMAIN=cluster" --env="POD_NAMESPACE=default" # Start a replicated instance of nginx. -$ kubectl run nginx --image=nginx --replicas=5 +kubectl run nginx --image=nginx --replicas=5 # Dry run. Print the corresponding API objects without creating them. -$ kubectl run nginx --image=nginx --dry-run +kubectl run nginx --image=nginx --dry-run # Start a single instance of nginx, but overload the spec of the deployment with a partial set of values parsed from JSON. -$ kubectl run nginx --image=nginx --overrides='{ "apiVersion": "v1", "spec": { ... } }' +kubectl run nginx --image=nginx --overrides='{ "apiVersion": "v1", "spec": { ... } }' # Start a single instance of busybox and keep it in the foreground, don't restart it if it exits. -$ kubectl run -i --tty busybox --image=busybox --restart=Never +kubectl run -i --tty busybox --image=busybox --restart=Never # Start the nginx container using the default command, but use custom arguments (arg1 .. argN) for that command. -$ kubectl run nginx --image=nginx -- ... +kubectl run nginx --image=nginx -- ... # Start the nginx container using a different command and custom arguments. -$ kubectl run nginx --image=nginx --command -- ... +kubectl run nginx --image=nginx --command -- ... # Start the perl container to compute π to 2000 places and print it out. -$ kubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'print bpi(2000)' +kubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'print bpi(2000)' ``` ### Options @@ -147,7 +147,7 @@ $ kubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'pri * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 14-Feb-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_run.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_scale.md b/docs/user-guide/kubectl/kubectl_scale.md index 61699354b8..005ef51f62 100644 --- a/docs/user-guide/kubectl/kubectl_scale.md +++ b/docs/user-guide/kubectl/kubectl_scale.md @@ -54,19 +54,19 @@ kubectl scale [--resource-version=version] [--current-replicas=count] --replicas ``` # Scale replication controller named 'foo' to 3. -$ kubectl scale --replicas=3 rc/foo +kubectl scale --replicas=3 rc/foo # Scale a resource identified by type and name specified in "foo.yaml" to 3. -$ kubectl scale --replicas=3 -f foo.yaml +kubectl scale --replicas=3 -f foo.yaml # If the deployment named mysql's current size is 2, scale mysql to 3. -$ kubectl scale --current-replicas=2 --replicas=3 deployment/mysql +kubectl scale --current-replicas=2 --replicas=3 deployment/mysql # Scale multiple replication controllers. -$ kubectl scale --replicas=5 rc/foo rc/bar rc/baz +kubectl scale --replicas=5 rc/foo rc/bar rc/baz # Scale job named 'cron' to 3. -$ kubectl scale --replicas=3 job/cron +kubectl scale --replicas=3 job/cron ``` ### Options @@ -113,7 +113,7 @@ $ kubectl scale --replicas=3 job/cron * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra on 22-Jan-2016 +###### Auto generated by spf13/cobra on 29-Feb-2016 [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_scale.md?pixel)]() diff --git a/pkg/kubectl/cmd/annotate.go b/pkg/kubectl/cmd/annotate.go index 466083b905..e4273c0a4e 100644 --- a/pkg/kubectl/cmd/annotate.go +++ b/pkg/kubectl/cmd/annotate.go @@ -68,23 +68,23 @@ limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc), horizontalpodautoscalers (hpa), resourcequotas (quota) or secrets.` annotate_example = `# Update pod 'foo' with the annotation 'description' and the value 'my frontend'. # If the same annotation is set multiple times, only the last value will be applied -$ kubectl annotate pods foo description='my frontend' +kubectl annotate pods foo description='my frontend' # Update a pod identified by type and name in "pod.json" -$ kubectl annotate -f pod.json description='my frontend' +kubectl annotate -f pod.json description='my frontend' # Update pod 'foo' with the annotation 'description' and the value 'my frontend running nginx', overwriting any existing value. -$ kubectl annotate --overwrite pods foo description='my frontend running nginx' +kubectl annotate --overwrite pods foo description='my frontend running nginx' # Update all pods in the namespace -$ kubectl annotate pods --all description='my frontend running nginx' +kubectl annotate pods --all description='my frontend running nginx' # Update pod 'foo' only if the resource is unchanged from version 1. -$ kubectl annotate pods foo description='my frontend running nginx' --resource-version=1 +kubectl annotate pods foo description='my frontend running nginx' --resource-version=1 # Update pod 'foo' by removing an annotation named 'description' if it exists. # Does not require the --overwrite flag. -$ kubectl annotate pods foo description-` +kubectl annotate pods foo description-` ) func NewCmdAnnotate(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/apply.go b/pkg/kubectl/cmd/apply.go index 54aabc86b4..3ca6c8e4f7 100644 --- a/pkg/kubectl/cmd/apply.go +++ b/pkg/kubectl/cmd/apply.go @@ -43,10 +43,10 @@ The resource will be created if it doesn't exist yet. JSON and YAML formats are accepted.` apply_example = `# Apply the configuration in pod.json to a pod. -$ kubectl apply -f ./pod.json +kubectl apply -f ./pod.json # Apply the JSON passed into stdin to a pod. -$ cat pod.json | kubectl apply -f -` +cat pod.json | kubectl apply -f -` ) func NewCmdApply(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/attach.go b/pkg/kubectl/cmd/attach.go index 22f1ddb3ba..0c475df831 100644 --- a/pkg/kubectl/cmd/attach.go +++ b/pkg/kubectl/cmd/attach.go @@ -36,14 +36,14 @@ import ( const ( attach_example = `# Get output from running pod 123456-7890, using the first container by default -$ kubectl attach 123456-7890 +kubectl attach 123456-7890 # Get output from ruby-container from pod 123456-7890 -$ kubectl attach 123456-7890 -c ruby-container +kubectl attach 123456-7890 -c ruby-container # Switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-7890 # and sends stdout/stderr from 'bash' back to the client -$ kubectl attach 123456-7890 -c ruby-container -i -t` +kubectl attach 123456-7890 -c ruby-container -i -t` ) func NewCmdAttach(f *cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/autoscale.go b/pkg/kubectl/cmd/autoscale.go index 343c3a8a55..5364518414 100644 --- a/pkg/kubectl/cmd/autoscale.go +++ b/pkg/kubectl/cmd/autoscale.go @@ -35,10 +35,10 @@ Looks up a deployment or replication controller by name and creates an autoscale An autoscaler can automatically increase or decrease number of pods deployed within the system as needed.` autoscaleExample = `# Auto scale a deployment "foo", with the number of pods between 2 to 10, target CPU utilization at a default value that server applies: -$ kubectl autoscale deployment foo --min=2 --max=10 +kubectl autoscale deployment foo --min=2 --max=10 # Auto scale a replication controller "foo", with the number of pods between 1 to 5, target CPU utilization at 80%: -$ kubectl autoscale rc foo --max=5 --cpu-percent=80` +kubectl autoscale rc foo --max=5 --cpu-percent=80` ) func NewCmdAutoscale(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/config/create_authinfo.go b/pkg/kubectl/cmd/config/create_authinfo.go index c61cd8c127..0f8aa3b6ff 100644 --- a/pkg/kubectl/cmd/config/create_authinfo.go +++ b/pkg/kubectl/cmd/config/create_authinfo.go @@ -60,13 +60,13 @@ Specifying a name that already exists will merge new fields on top of existing v const create_authinfo_example = `# Set only the "client-key" field on the "cluster-admin" # entry, without touching other values: -$ kubectl config set-credentials cluster-admin --client-key=~/.kube/admin.key +kubectl config set-credentials cluster-admin --client-key=~/.kube/admin.key # Set basic auth for the "cluster-admin" entry -$ kubectl config set-credentials cluster-admin --username=admin --password=uXFGweU9l35qcif +kubectl config set-credentials cluster-admin --username=admin --password=uXFGweU9l35qcif # Embed client certificate data in the "cluster-admin" entry -$ kubectl config set-credentials cluster-admin --client-certificate=~/.kube/admin.crt --embed-certs=true` +kubectl config set-credentials cluster-admin --client-certificate=~/.kube/admin.crt --embed-certs=true` func NewCmdConfigSetAuthInfo(out io.Writer, configAccess ConfigAccess) *cobra.Command { options := &createAuthInfoOptions{configAccess: configAccess} diff --git a/pkg/kubectl/cmd/config/create_cluster.go b/pkg/kubectl/cmd/config/create_cluster.go index 6f463a1b4b..30d15434bd 100644 --- a/pkg/kubectl/cmd/config/create_cluster.go +++ b/pkg/kubectl/cmd/config/create_cluster.go @@ -44,13 +44,13 @@ const ( create_cluster_long = `Sets a cluster entry in kubeconfig. Specifying a name that already exists will merge new fields on top of existing values for those fields.` create_cluster_example = `# Set only the server field on the e2e cluster entry without touching other values. -$ kubectl config set-cluster e2e --server=https://1.2.3.4 +kubectl config set-cluster e2e --server=https://1.2.3.4 # Embed certificate authority data for the e2e cluster entry -$ kubectl config set-cluster e2e --certificate-authority=~/.kube/e2e/kubernetes.ca.crt +kubectl config set-cluster e2e --certificate-authority=~/.kube/e2e/kubernetes.ca.crt # Disable cert checking for the dev cluster entry -$ kubectl config set-cluster e2e --insecure-skip-tls-verify=true` +kubectl config set-cluster e2e --insecure-skip-tls-verify=true` ) func NewCmdConfigSetCluster(out io.Writer, configAccess ConfigAccess) *cobra.Command { diff --git a/pkg/kubectl/cmd/config/create_context.go b/pkg/kubectl/cmd/config/create_context.go index 093ce944c4..e3d165e07c 100644 --- a/pkg/kubectl/cmd/config/create_context.go +++ b/pkg/kubectl/cmd/config/create_context.go @@ -40,7 +40,7 @@ const ( create_context_long = `Sets a context entry in kubeconfig Specifying a name that already exists will merge new fields on top of existing values for those fields.` create_context_example = `# Set the user field on the gce context entry without touching other values -$ kubectl config set-context gce --user=cluster-admin` +kubectl config set-context gce --user=cluster-admin` ) func NewCmdConfigSetContext(out io.Writer, configAccess ConfigAccess) *cobra.Command { diff --git a/pkg/kubectl/cmd/config/current_context.go b/pkg/kubectl/cmd/config/current_context.go index 66e8f78b3f..fe5bcff69a 100644 --- a/pkg/kubectl/cmd/config/current_context.go +++ b/pkg/kubectl/cmd/config/current_context.go @@ -31,7 +31,7 @@ type CurrentContextOptions struct { const ( current_context_long = `Displays the current-context` current_context_example = `# Display the current-context -$ kubectl config current-context` +kubectl config current-context` ) func NewCmdConfigCurrentContext(out io.Writer, configAccess ConfigAccess) *cobra.Command { diff --git a/pkg/kubectl/cmd/config/view.go b/pkg/kubectl/cmd/config/view.go index 50bdb30add..5d253a118f 100644 --- a/pkg/kubectl/cmd/config/view.go +++ b/pkg/kubectl/cmd/config/view.go @@ -44,10 +44,10 @@ const ( You can use --output jsonpath={...} to extract specific values using a jsonpath expression.` view_example = `# Show Merged kubeconfig settings. -$ kubectl config view +kubectl config view # Get the password for the e2e user -$ kubectl config view -o jsonpath='{.users[?(@.name == "e2e")].user.password}'` +kubectl config view -o jsonpath='{.users[?(@.name == "e2e")].user.password}'` ) func NewCmdConfigView(out io.Writer, ConfigAccess ConfigAccess) *cobra.Command { diff --git a/pkg/kubectl/cmd/convert.go b/pkg/kubectl/cmd/convert.go index e7e04d5b99..0f1b10a9fa 100644 --- a/pkg/kubectl/cmd/convert.go +++ b/pkg/kubectl/cmd/convert.go @@ -43,14 +43,14 @@ The default output will be printed to stdout in YAML format. One can use -o opti to change to output destination. ` convert_example = `# Convert 'pod.yaml' to latest version and print to stdout. -$ kubectl convert -f pod.yaml +kubectl convert -f pod.yaml # Convert the live state of the resource specified by 'pod.yaml' to the latest version # and print to stdout in json format. -$ kubectl convert -f pod.yaml --local -o json +kubectl convert -f pod.yaml --local -o json # Convert all files under current directory to latest version and create them all. -$ kubectl convert -f . | kubectl create -f - +kubectl convert -f . | kubectl create -f - ` ) diff --git a/pkg/kubectl/cmd/create.go b/pkg/kubectl/cmd/create.go index 612ebd1919..c5e36ce5fb 100644 --- a/pkg/kubectl/cmd/create.go +++ b/pkg/kubectl/cmd/create.go @@ -42,10 +42,10 @@ const ( JSON and YAML formats are accepted.` create_example = `# Create a pod using the data in pod.json. -$ kubectl create -f ./pod.json +kubectl create -f ./pod.json # Create a pod based on the JSON passed into stdin. -$ cat pod.json | kubectl create -f -` +cat pod.json | kubectl create -f -` ) func NewCmdCreate(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/create_configmap.go b/pkg/kubectl/cmd/create_configmap.go index 99a7dcc2c7..729ac39839 100644 --- a/pkg/kubectl/cmd/create_configmap.go +++ b/pkg/kubectl/cmd/create_configmap.go @@ -40,13 +40,13 @@ symlinks, devices, pipes, etc). ` configMapExample = ` # Create a new configmap named my-config with keys for each file in folder bar - $ kubectl create configmap generic my-config --from-file=path/to/bar + kubectl create configmap generic my-config --from-file=path/to/bar # Create a new configmap named my-config with specified keys instead of names on disk - $ kubectl create configmap generic my-config --from-file=ssh-privatekey=~/.ssh/id_rsa --from-file=ssh-publickey=~/.ssh/id_rsa.pub + kubectl create configmap generic my-config --from-file=ssh-privatekey=~/.ssh/id_rsa --from-file=ssh-publickey=~/.ssh/id_rsa.pub # Create a new configMap named my-config with key1=config1 and key2=config2 - $ kubectl create configmap generic my-config --from-literal=key1=config1 --from-literal=key2=config2` + kubectl create configmap generic my-config --from-literal=key1=config1 --from-literal=key2=config2` ) // ConfigMap is a command to ease creating ConfigMaps. diff --git a/pkg/kubectl/cmd/create_namespace.go b/pkg/kubectl/cmd/create_namespace.go index a66055fb19..fcb4be75c7 100644 --- a/pkg/kubectl/cmd/create_namespace.go +++ b/pkg/kubectl/cmd/create_namespace.go @@ -31,7 +31,7 @@ const ( Create a namespace with the specified name.` namespaceExample = ` # Create a new namespace named my-namespace - $ kubectl create namespace my-namespace` + kubectl create namespace my-namespace` ) // NewCmdCreateNamespace is a macro command to create a new namespace diff --git a/pkg/kubectl/cmd/create_secret.go b/pkg/kubectl/cmd/create_secret.go index 6cba3ba07b..3028da743d 100644 --- a/pkg/kubectl/cmd/create_secret.go +++ b/pkg/kubectl/cmd/create_secret.go @@ -56,13 +56,13 @@ symlinks, devices, pipes, etc). ` secretExample = ` # Create a new secret named my-secret with keys for each file in folder bar - $ kubectl create secret generic my-secret --from-file=path/to/bar + kubectl create secret generic my-secret --from-file=path/to/bar # Create a new secret named my-secret with specified keys instead of names on disk - $ kubectl create secret generic my-secret --from-file=ssh-privatekey=~/.ssh/id_rsa --from-file=ssh-publickey=~/.ssh/id_rsa.pub + kubectl create secret generic my-secret --from-file=ssh-privatekey=~/.ssh/id_rsa --from-file=ssh-publickey=~/.ssh/id_rsa.pub # Create a new secret named my-secret with key1=supersecret and key2=topsecret - $ kubectl create secret generic my-secret --from-literal=key1=supersecret --from-literal=key2=topsecret` + kubectl create secret generic my-secret --from-literal=key1=supersecret --from-literal=key2=topsecret` ) // NewCmdCreateSecretGeneric is a command to create generic secrets from files, directories, or literal values diff --git a/pkg/kubectl/cmd/delete.go b/pkg/kubectl/cmd/delete.go index 7dffd4f990..99f65d8eac 100644 --- a/pkg/kubectl/cmd/delete.go +++ b/pkg/kubectl/cmd/delete.go @@ -48,22 +48,22 @@ Note that the delete command does NOT do resource version checks, so if someone submits an update to a resource right when you submit a delete, their update will be lost along with the rest of the resource.` delete_example = `# Delete a pod using the type and name specified in pod.json. -$ kubectl delete -f ./pod.json +kubectl delete -f ./pod.json # Delete a pod based on the type and name in the JSON passed into stdin. -$ cat pod.json | kubectl delete -f - +cat pod.json | kubectl delete -f - # Delete pods and services with same names "baz" and "foo" -$ kubectl delete pod,service baz foo +kubectl delete pod,service baz foo # Delete pods and services with label name=myLabel. -$ kubectl delete pods,services -l name=myLabel +kubectl delete pods,services -l name=myLabel # Delete a pod with UID 1234-56-7890-234234-456456. -$ kubectl delete pod 1234-56-7890-234234-456456 +kubectl delete pod 1234-56-7890-234234-456456 # Delete all pods -$ kubectl delete pods --all` +kubectl delete pods --all` ) func NewCmdDelete(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/describe.go b/pkg/kubectl/cmd/describe.go index 3ea83ecdc4..466caa6c80 100644 --- a/pkg/kubectl/cmd/describe.go +++ b/pkg/kubectl/cmd/describe.go @@ -55,23 +55,23 @@ persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns), serviceaccounts, horizontalpodautoscalers (hpa), endpoints (ep) or secrets.` describe_example = `# Describe a node -$ kubectl describe nodes kubernetes-minion-emt8.c.myproject.internal +kubectl describe nodes kubernetes-minion-emt8.c.myproject.internal # Describe a pod -$ kubectl describe pods/nginx +kubectl describe pods/nginx # Describe a pod identified by type and name in "pod.json" -$ kubectl describe -f pod.json +kubectl describe -f pod.json # Describe all pods -$ kubectl describe pods +kubectl describe pods # Describe pods by label name=myLabel -$ kubectl describe po -l name=myLabel +kubectl describe po -l name=myLabel # Describe all pods managed by the 'frontend' replication controller (rc-created pods # get the name of the rc as a prefix in the pod the name). -$ kubectl describe pods frontend` +kubectl describe pods frontend` ) func NewCmdDescribe(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/drain.go b/pkg/kubectl/cmd/drain.go index 1e955b5eb4..8314c183e8 100644 --- a/pkg/kubectl/cmd/drain.go +++ b/pkg/kubectl/cmd/drain.go @@ -53,7 +53,7 @@ const ( cordon_long = `Mark node as unschedulable. ` cordon_example = `# Mark node "foo" as unschedulable. -$ kubectl cordon foo +kubectl cordon foo ` ) diff --git a/pkg/kubectl/cmd/edit.go b/pkg/kubectl/cmd/edit.go index 279cd9ecab..d89b9a7c1e 100644 --- a/pkg/kubectl/cmd/edit.go +++ b/pkg/kubectl/cmd/edit.go @@ -64,13 +64,13 @@ to apply your changes to the newer version of the resource, or update your tempo saved copy to include the latest resource version.` editExample = ` # Edit the service named 'docker-registry': - $ kubectl edit svc/docker-registry + kubectl edit svc/docker-registry # Use an alternative editor - $ KUBE_EDITOR="nano" kubectl edit svc/docker-registry + KUBE_EDITOR="nano" kubectl edit svc/docker-registry # Edit the service 'docker-registry' in JSON using the v1 API format: - $ kubectl edit svc/docker-registry --output-version=v1 -o json` + kubectl edit svc/docker-registry --output-version=v1 -o json` ) var errExit = fmt.Errorf("exit directly") diff --git a/pkg/kubectl/cmd/exec.go b/pkg/kubectl/cmd/exec.go index eec6da62fc..717ba613b8 100644 --- a/pkg/kubectl/cmd/exec.go +++ b/pkg/kubectl/cmd/exec.go @@ -35,14 +35,14 @@ import ( const ( exec_example = `# Get output from running 'date' from pod 123456-7890, using the first container by default -$ kubectl exec 123456-7890 date +kubectl exec 123456-7890 date # Get output from running 'date' in ruby-container from pod 123456-7890 -$ kubectl exec 123456-7890 -c ruby-container date +kubectl exec 123456-7890 -c ruby-container date # Switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-7890 # and sends stdout/stderr from 'bash' back to the client -$ kubectl exec 123456-7890 -c ruby-container -i -t -- bash -il` +kubectl exec 123456-7890 -c ruby-container -i -t -- bash -il` ) func NewCmdExec(f *cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/explain.go b/pkg/kubectl/cmd/explain.go index d3746c1547..139729e80d 100644 --- a/pkg/kubectl/cmd/explain.go +++ b/pkg/kubectl/cmd/explain.go @@ -29,10 +29,10 @@ import ( const ( explainExamples = `# Get the documentation of the resource and its fields -$ kubectl explain pods +kubectl explain pods # Get the documentation of a specific field of a resource -$ kubectl explain pods.spec.containers` +kubectl explain pods.spec.containers` explainLong = `Documentation of resources. diff --git a/pkg/kubectl/cmd/expose.go b/pkg/kubectl/cmd/expose.go index 48b6244367..f4d397c54a 100644 --- a/pkg/kubectl/cmd/expose.go +++ b/pkg/kubectl/cmd/expose.go @@ -47,22 +47,22 @@ via --port and the exposed resource has multiple ports, all will be re-used by t if no labels are specified, the new service will re-use the labels from the resource it exposes.` expose_example = `# Create a service for a replicated nginx, which serves on port 80 and connects to the containers on port 8000. -$ kubectl expose rc nginx --port=80 --target-port=8000 +kubectl expose rc nginx --port=80 --target-port=8000 # Create a service for a replication controller identified by type and name specified in "nginx-controller.yaml", which serves on port 80 and connects to the containers on port 8000. -$ kubectl expose -f nginx-controller.yaml --port=80 --target-port=8000 +kubectl expose -f nginx-controller.yaml --port=80 --target-port=8000 # Create a service for a pod valid-pod, which serves on port 444 with the name "frontend" -$ kubectl expose pod valid-pod --port=444 --name=frontend +kubectl expose pod valid-pod --port=444 --name=frontend # Create a second service based on the above service, exposing the container port 8443 as port 443 with the name "nginx-https" -$ kubectl expose service nginx --port=443 --target-port=8443 --name=nginx-https +kubectl expose service nginx --port=443 --target-port=8443 --name=nginx-https # Create a service for a replicated streaming application on port 4100 balancing UDP traffic and named 'video-stream'. -$ kubectl expose rc streamer --port=4100 --protocol=udp --name=video-stream +kubectl expose rc streamer --port=4100 --protocol=udp --name=video-stream # Create a service for a replicated nginx using replica set, which serves on port 80 and connects to the containers on port 8000. -$ kubectl expose rs nginx --port=80 --target-port=8000` +kubectl expose rs nginx --port=80 --target-port=8000` ) func NewCmdExposeService(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/get.go b/pkg/kubectl/cmd/get.go index 21706e60df..f390385b09 100644 --- a/pkg/kubectl/cmd/get.go +++ b/pkg/kubectl/cmd/get.go @@ -47,28 +47,28 @@ horizontalpodautoscalers (hpa), serviceaccounts or secrets. By specifying the output as 'template' and providing a Go template as the value of the --template flag, you can filter the attributes of the fetched resource(s).` get_example = `# List all pods in ps output format. -$ kubectl get pods +kubectl get pods # List all pods in ps output format with more information (such as node name). -$ kubectl get pods -o wide +kubectl get pods -o wide # List a single replication controller with specified NAME in ps output format. -$ kubectl get replicationcontroller web +kubectl get replicationcontroller web # List a single pod in JSON output format. -$ kubectl get -o json pod web-pod-13je7 +kubectl get -o json pod web-pod-13je7 # List a pod identified by type and name specified in "pod.yaml" in JSON output format. -$ kubectl get -f pod.yaml -o json +kubectl get -f pod.yaml -o json # Return only the phase value of the specified pod. -$ kubectl get -o template pod/web-pod-13je7 --template={{.status.phase}} --api-version=v1 +kubectl get -o template pod/web-pod-13je7 --template={{.status.phase}} --api-version=v1 # List all replication controllers and services together in ps output format. -$ kubectl get rc,services +kubectl get rc,services # List one or more resources by their type and names. -$ kubectl get rc/web service/frontend pods/web-pod-13je7` +kubectl get rc/web service/frontend pods/web-pod-13je7` ) // NewCmdGet creates a command object for the generic "get" action, which diff --git a/pkg/kubectl/cmd/label.go b/pkg/kubectl/cmd/label.go index 3290b7f278..44db5f87b2 100644 --- a/pkg/kubectl/cmd/label.go +++ b/pkg/kubectl/cmd/label.go @@ -48,23 +48,23 @@ A label must begin with a letter or number, and may contain letters, numbers, hy If --overwrite is true, then existing labels can be overwritten, otherwise attempting to overwrite a label will result in an error. If --resource-version is specified, then updates will use this resource version, otherwise the existing resource-version will be used.` label_example = `# Update pod 'foo' with the label 'unhealthy' and the value 'true'. -$ kubectl label pods foo unhealthy=true +kubectl label pods foo unhealthy=true # Update pod 'foo' with the label 'status' and the value 'unhealthy', overwriting any existing value. -$ kubectl label --overwrite pods foo status=unhealthy +kubectl label --overwrite pods foo status=unhealthy # Update all pods in the namespace -$ kubectl label pods --all status=unhealthy +kubectl label pods --all status=unhealthy # Update a pod identified by the type and name in "pod.json" -$ kubectl label -f pod.json status=unhealthy +kubectl label -f pod.json status=unhealthy # Update pod 'foo' only if the resource is unchanged from version 1. -$ kubectl label pods foo status=unhealthy --resource-version=1 +kubectl label pods foo status=unhealthy --resource-version=1 # Update pod 'foo' by removing a label named 'bar' if it exists. # Does not require the --overwrite flag. -$ kubectl label pods foo bar-` +kubectl label pods foo bar-` ) func NewCmdLabel(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/logs.go b/pkg/kubectl/cmd/logs.go index 369d41d8a9..835d08ed32 100644 --- a/pkg/kubectl/cmd/logs.go +++ b/pkg/kubectl/cmd/logs.go @@ -36,19 +36,19 @@ import ( const ( logs_example = `# Return snapshot logs from pod nginx with only one container -$ kubectl logs nginx +kubectl logs nginx # Return snapshot of previous terminated ruby container logs from pod web-1 -$ kubectl logs -p -c ruby web-1 +kubectl logs -p -c ruby web-1 # Begin streaming the logs of the ruby container in pod web-1 -$ kubectl logs -f -c ruby web-1 +kubectl logs -f -c ruby web-1 # Display only the most recent 20 lines of output in pod nginx -$ kubectl logs --tail=20 nginx +kubectl logs --tail=20 nginx # Show all logs from pod nginx written in the last hour -$ kubectl logs --since=1h nginx` +kubectl logs --since=1h nginx` ) type LogsOptions struct { diff --git a/pkg/kubectl/cmd/portforward.go b/pkg/kubectl/cmd/portforward.go index 942a1c5009..23ba15784b 100644 --- a/pkg/kubectl/cmd/portforward.go +++ b/pkg/kubectl/cmd/portforward.go @@ -33,16 +33,16 @@ import ( const ( portforward_example = ` # Listen on ports 5000 and 6000 locally, forwarding data to/from ports 5000 and 6000 in the pod -$ kubectl port-forward mypod 5000 6000 +kubectl port-forward mypod 5000 6000 # Listen on port 8888 locally, forwarding to 5000 in the pod -$ kubectl port-forward mypod 8888:5000 +kubectl port-forward mypod 8888:5000 # Listen on a random port locally, forwarding to 5000 in the pod -$ kubectl port-forward mypod :5000 +kubectl port-forward mypod :5000 # Listen on a random port locally, forwarding to 5000 in the pod -$ kubectl port-forward mypod 0:5000` +kubectl port-forward mypod 0:5000` ) func NewCmdPortForward(f *cmdutil.Factory) *cobra.Command { diff --git a/pkg/kubectl/cmd/proxy.go b/pkg/kubectl/cmd/proxy.go index 130e2ae596..77330af761 100644 --- a/pkg/kubectl/cmd/proxy.go +++ b/pkg/kubectl/cmd/proxy.go @@ -32,15 +32,15 @@ import ( const ( default_port = 8001 proxy_example = `# Run a proxy to kubernetes apiserver on port 8011, serving static content from ./local/www/ -$ kubectl proxy --port=8011 --www=./local/www/ +kubectl proxy --port=8011 --www=./local/www/ # Run a proxy to kubernetes apiserver on an arbitrary local port. # The chosen port for the server will be output to stdout. -$ kubectl proxy --port=0 +kubectl proxy --port=0 # Run a proxy to kubernetes apiserver, changing the api prefix to k8s-api # This makes e.g. the pods api available at localhost:8011/k8s-api/v1/pods/ -$ kubectl proxy --api-prefix=/k8s-api` +kubectl proxy --api-prefix=/k8s-api` ) func NewCmdProxy(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/replace.go b/pkg/kubectl/cmd/replace.go index 81eacecbd4..32f961af1e 100644 --- a/pkg/kubectl/cmd/replace.go +++ b/pkg/kubectl/cmd/replace.go @@ -46,10 +46,10 @@ $ kubectl get TYPE NAME -o yaml Please refer to the models in https://htmlpreview.github.io/?https://github.com/kubernetes/kubernetes/blob/HEAD/docs/api-reference/v1/definitions.html to find if a field is mutable.` replace_example = `# Replace a pod using the data in pod.json. -$ kubectl replace -f ./pod.json +kubectl replace -f ./pod.json # Replace a pod based on the JSON passed into stdin. -$ cat pod.json | kubectl replace -f - +cat pod.json | kubectl replace -f - # Update a single-container pod's image version (tag) to v4 kubectl get pod mypod -o yaml | sed 's/\(image: myimage\):.*$/\1:v4/' | kubectl replace -f - diff --git a/pkg/kubectl/cmd/rollingupdate.go b/pkg/kubectl/cmd/rollingupdate.go index 0fe7d7d028..64c4be643c 100644 --- a/pkg/kubectl/cmd/rollingupdate.go +++ b/pkg/kubectl/cmd/rollingupdate.go @@ -49,20 +49,20 @@ Replaces the specified replication controller with a new replication controller new PodTemplate. The new-controller.json must specify the same namespace as the existing replication controller and overwrite at least one (common) label in its replicaSelector.` rollingUpdate_example = `# Update pods of frontend-v1 using new replication controller data in frontend-v2.json. -$ kubectl rolling-update frontend-v1 -f frontend-v2.json +kubectl rolling-update frontend-v1 -f frontend-v2.json # Update pods of frontend-v1 using JSON data passed into stdin. -$ cat frontend-v2.json | kubectl rolling-update frontend-v1 -f - +cat frontend-v2.json | kubectl rolling-update frontend-v1 -f - # Update the pods of frontend-v1 to frontend-v2 by just changing the image, and switching the # name of the replication controller. -$ kubectl rolling-update frontend-v1 frontend-v2 --image=image:v2 +kubectl rolling-update frontend-v1 frontend-v2 --image=image:v2 # Update the pods of frontend by just changing the image, and keeping the old name. -$ kubectl rolling-update frontend --image=image:v2 +kubectl rolling-update frontend --image=image:v2 # Abort and reverse an existing rollout in progress (from frontend-v1 to frontend-v2). -$ kubectl rolling-update frontend-v1 frontend-v2 --rollback +kubectl rolling-update frontend-v1 frontend-v2 --rollback ` ) diff --git a/pkg/kubectl/cmd/rollout/rollout.go b/pkg/kubectl/cmd/rollout/rollout.go index 8fbb53595c..2397a10f41 100644 --- a/pkg/kubectl/cmd/rollout/rollout.go +++ b/pkg/kubectl/cmd/rollout/rollout.go @@ -26,7 +26,7 @@ import ( const ( rollout_long = `rollout manages a deployment using subcommands like "kubectl rollout undo deployment/abc"` rollout_example = `# Rollback to the previous deployment -$ kubectl rollout undo deployment/abc` +kubectl rollout undo deployment/abc` rollout_valid_resources = `Valid resource types include: * deployments ` diff --git a/pkg/kubectl/cmd/rollout/rollout_history.go b/pkg/kubectl/cmd/rollout/rollout_history.go index f3eeb4a71a..5b487acda9 100644 --- a/pkg/kubectl/cmd/rollout/rollout_history.go +++ b/pkg/kubectl/cmd/rollout/rollout_history.go @@ -37,7 +37,7 @@ type HistoryOptions struct { const ( history_long = `view previous rollout revisions and configurations.` history_example = `# View the rollout history of a deployment -$ kubectl rollout history deployment/abc` +kubectl rollout history deployment/abc` ) func NewCmdRolloutHistory(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/rollout/rollout_pause.go b/pkg/kubectl/cmd/rollout/rollout_pause.go index ae07dcefd5..5575ab714f 100644 --- a/pkg/kubectl/cmd/rollout/rollout_pause.go +++ b/pkg/kubectl/cmd/rollout/rollout_pause.go @@ -51,7 +51,7 @@ Currently only deployments support being paused.` pause_example = `# Mark the nginx deployment as paused. Any current state of # the deployment will continue its function, new updates to the deployment will not # have an effect as long as the deployment is paused. -$ kubectl rollout pause deployment/nginx` +kubectl rollout pause deployment/nginx` ) func NewCmdRolloutPause(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/rollout/rollout_resume.go b/pkg/kubectl/cmd/rollout/rollout_resume.go index a38147e75f..dbcd8774cc 100644 --- a/pkg/kubectl/cmd/rollout/rollout_resume.go +++ b/pkg/kubectl/cmd/rollout/rollout_resume.go @@ -49,7 +49,7 @@ resource, we allow it to be reconciled again. Currently only deployments support being resumed.` resume_example = `# Resume an already paused deployment -$ kubectl rollout resume deployment/nginx` +kubectl rollout resume deployment/nginx` ) func NewCmdRolloutResume(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/rollout/rollout_undo.go b/pkg/kubectl/cmd/rollout/rollout_undo.go index ccaf429ee7..4dba41275f 100644 --- a/pkg/kubectl/cmd/rollout/rollout_undo.go +++ b/pkg/kubectl/cmd/rollout/rollout_undo.go @@ -44,7 +44,7 @@ type UndoOptions struct { const ( undo_long = `undo rolls back to a previous rollout.` undo_example = `# Rollback to the previous deployment -$ kubectl rollout undo deployment/abc` +kubectl rollout undo deployment/abc` ) func NewCmdRolloutUndo(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/run.go b/pkg/kubectl/cmd/run.go index f95759a589..2fb88b6393 100644 --- a/pkg/kubectl/cmd/run.go +++ b/pkg/kubectl/cmd/run.go @@ -36,34 +36,34 @@ const ( run_long = `Create and run a particular image, possibly replicated. Creates a deployment or job to manage the created container(s).` run_example = `# Start a single instance of nginx. -$ kubectl run nginx --image=nginx +kubectl run nginx --image=nginx # Start a single instance of hazelcast and let the container expose port 5701 . -$ kubectl run hazelcast --image=hazelcast --port=5701 +kubectl run hazelcast --image=hazelcast --port=5701 # Start a single instance of hazelcast and set environment variables "DNS_DOMAIN=cluster" and "POD_NAMESPACE=default" in the container. -$ kubectl run hazelcast --image=hazelcast --env="DNS_DOMAIN=cluster" --env="POD_NAMESPACE=default" +kubectl run hazelcast --image=hazelcast --env="DNS_DOMAIN=cluster" --env="POD_NAMESPACE=default" # Start a replicated instance of nginx. -$ kubectl run nginx --image=nginx --replicas=5 +kubectl run nginx --image=nginx --replicas=5 # Dry run. Print the corresponding API objects without creating them. -$ kubectl run nginx --image=nginx --dry-run +kubectl run nginx --image=nginx --dry-run # Start a single instance of nginx, but overload the spec of the deployment with a partial set of values parsed from JSON. -$ kubectl run nginx --image=nginx --overrides='{ "apiVersion": "v1", "spec": { ... } }' +kubectl run nginx --image=nginx --overrides='{ "apiVersion": "v1", "spec": { ... } }' # Start a single instance of busybox and keep it in the foreground, don't restart it if it exits. -$ kubectl run -i --tty busybox --image=busybox --restart=Never +kubectl run -i --tty busybox --image=busybox --restart=Never # Start the nginx container using the default command, but use custom arguments (arg1 .. argN) for that command. -$ kubectl run nginx --image=nginx -- ... +kubectl run nginx --image=nginx -- ... # Start the nginx container using a different command and custom arguments. -$ kubectl run nginx --image=nginx --command -- ... +kubectl run nginx --image=nginx --command -- ... # Start the perl container to compute π to 2000 places and print it out. -$ kubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'print bpi(2000)'` +kubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'print bpi(2000)'` ) func NewCmdRun(f *cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/scale.go b/pkg/kubectl/cmd/scale.go index 6ffd435661..b16f90cd9c 100644 --- a/pkg/kubectl/cmd/scale.go +++ b/pkg/kubectl/cmd/scale.go @@ -44,19 +44,19 @@ If --current-replicas or --resource-version is specified, it is validated before scale is attempted, and it is guaranteed that the precondition holds true when the scale is sent to the server.` scale_example = `# Scale replication controller named 'foo' to 3. -$ kubectl scale --replicas=3 rc/foo +kubectl scale --replicas=3 rc/foo # Scale a resource identified by type and name specified in "foo.yaml" to 3. -$ kubectl scale --replicas=3 -f foo.yaml +kubectl scale --replicas=3 -f foo.yaml # If the deployment named mysql's current size is 2, scale mysql to 3. -$ kubectl scale --current-replicas=2 --replicas=3 deployment/mysql +kubectl scale --current-replicas=2 --replicas=3 deployment/mysql # Scale multiple replication controllers. -$ kubectl scale --replicas=5 rc/foo rc/bar rc/baz +kubectl scale --replicas=5 rc/foo rc/bar rc/baz # Scale job named 'cron' to 3. -$ kubectl scale --replicas=3 job/cron` +kubectl scale --replicas=3 job/cron` ) // NewCmdScale returns a cobra command with the appropriate configuration and flags to run scale diff --git a/pkg/kubectl/cmd/stop.go b/pkg/kubectl/cmd/stop.go index 6069866171..c147259d4f 100644 --- a/pkg/kubectl/cmd/stop.go +++ b/pkg/kubectl/cmd/stop.go @@ -41,16 +41,16 @@ See 'kubectl delete --help' for more details. Attempts to shut down and delete a resource that supports graceful termination. If the resource is scalable it will be scaled to 0 before deletion.` stop_example = `# Shut down foo. -$ kubectl stop replicationcontroller foo +kubectl stop replicationcontroller foo # Stop pods and services with label name=myLabel. -$ kubectl stop pods,services -l name=myLabel +kubectl stop pods,services -l name=myLabel # Shut down the service defined in service.json -$ kubectl stop -f service.json +kubectl stop -f service.json # Shut down all resources in the path/to/resources directory -$ kubectl stop -f path/to/resources` +kubectl stop -f path/to/resources` ) func NewCmdStop(f *cmdutil.Factory, out io.Writer) *cobra.Command {