diff --git a/docs/man/man1/kubectl-attach.1 b/docs/man/man1/kubectl-attach.1 index 861cfb8b2a73c..a245b11c1cbbf 100644 --- a/docs/man/man1/kubectl-attach.1 +++ b/docs/man/man1/kubectl-attach.1 @@ -137,14 +137,14 @@ Attach to a a process that is already running inside an existing container. .RS .nf -// get output from running pod 123456\-7890, using the first container by default +# get output from running pod 123456\-7890, using the first container by default $ kubectl attach 123456\-7890 - -// get output from ruby\-container from pod 123456\-7890 + +# get output from ruby\-container from pod 123456\-7890 $ kubectl attach 123456\-7890 \-c ruby\-container date -// switch to raw terminal mode, sends stdin to 'bash' in ruby\-container from pod 123456\-780 -// and sends stdout/stderr from 'bash' back to the client +# switch to raw terminal mode, sends stdin to 'bash' in ruby\-container from pod 123456\-780 +# and sends stdout/stderr from 'bash' back to the client $ kubectl attach 123456\-7890 \-c ruby\-container \-i \-t .fi diff --git a/docs/man/man1/kubectl-config-set-cluster.1 b/docs/man/man1/kubectl-config-set-cluster.1 index 374e37bbad7c5..79da95754171e 100644 --- a/docs/man/man1/kubectl-config-set-cluster.1 +++ b/docs/man/man1/kubectl-config-set-cluster.1 @@ -130,13 +130,13 @@ Specifying a name that already exists will merge new fields on top of existing v .RS .nf -// Set only the server field on the e2e cluster entry without touching other values. +# 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 -// Embed certificate authority data for the e2e cluster entry +# Embed certificate authority data for the e2e cluster entry $ kubectl config set\-cluster e2e \-\-certificate\-authority=\~/.kube/e2e/kubernetes.ca.crt -// Disable cert checking for the dev cluster entry +# Disable cert checking for the dev cluster entry $ kubectl config set\-cluster e2e \-\-insecure\-skip\-tls\-verify=true .fi diff --git a/docs/man/man1/kubectl-config-set-context.1 b/docs/man/man1/kubectl-config-set-context.1 index 4e7928418ed84..82d4c897a4639 100644 --- a/docs/man/man1/kubectl-config-set-context.1 +++ b/docs/man/man1/kubectl-config-set-context.1 @@ -126,7 +126,7 @@ Specifying a name that already exists will merge new fields on top of existing v .RS .nf -// Set the user field on the gce context entry without touching other values +# Set the user field on the gce context entry without touching other values $ kubectl config set\-context gce \-\-user=cluster\-admin .fi diff --git a/docs/man/man1/kubectl-config-set-credentials.1 b/docs/man/man1/kubectl-config-set-credentials.1 index d025d9119d96b..04444998cbdf5 100644 --- a/docs/man/man1/kubectl-config-set-credentials.1 +++ b/docs/man/man1/kubectl-config-set-credentials.1 @@ -145,14 +145,14 @@ Bearer token and basic auth are mutually exclusive. .RS .nf -// Set only the "client\-key" field on the "cluster\-admin" -// entry, without touching other values: +# 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 -// Set basic auth for the "cluster\-admin" entry +# Set basic auth for the "cluster\-admin" entry $ kubectl config set\-credentials cluster\-admin \-\-username=admin \-\-password=uXFGweU9l35qcif -// Embed client certificate data in the "cluster\-admin" entry +# Embed client certificate data in the "cluster\-admin" entry $ kubectl config set\-credentials cluster\-admin \-\-client\-certificate=\~/.kube/admin.crt \-\-embed\-certs=true .fi diff --git a/docs/man/man1/kubectl-config-view.1 b/docs/man/man1/kubectl-config-view.1 index ce0072d96237c..0d4f53d483017 100644 --- a/docs/man/man1/kubectl-config-view.1 +++ b/docs/man/man1/kubectl-config-view.1 @@ -161,10 +161,10 @@ You can use \-\-output=template \-\-template=TEMPLATE to extract specific values .RS .nf -// Show Merged kubeconfig settings. +# Show Merged kubeconfig settings. $ kubectl config view -// Get the password for the e2e user +# Get the password for the e2e user $ kubectl config view \-o template \-\-template='{{range .users}}{{ if eq .name "e2e" }}{{ index .user.password }}{{end}}{{end}}' .fi diff --git a/docs/man/man1/kubectl-create.1 b/docs/man/man1/kubectl-create.1 index f1eeae6551b3b..0f51003787eed 100644 --- a/docs/man/man1/kubectl-create.1 +++ b/docs/man/man1/kubectl-create.1 @@ -136,10 +136,10 @@ JSON and YAML formats are accepted. .RS .nf -// Create a pod using the data in pod.json. +# Create a pod using the data in pod.json. $ kubectl create \-f ./pod.json -// Create a pod based on the JSON passed into stdin. +# Create a pod based on the JSON passed into stdin. $ cat pod.json | kubectl create \-f \- .fi diff --git a/docs/man/man1/kubectl-delete.1 b/docs/man/man1/kubectl-delete.1 index 84da9a2572a9d..ff014f0f8134a 100644 --- a/docs/man/man1/kubectl-delete.1 +++ b/docs/man/man1/kubectl-delete.1 @@ -168,19 +168,19 @@ will be lost along with the rest of the resource. .RS .nf -// Delete a pod using the type and name specified in pod.json. +# Delete a pod using the type and name specified in pod.json. $ kubectl delete \-f ./pod.json -// Delete a pod based on the type and name in the JSON passed into stdin. +# Delete a pod based on the type and name in the JSON passed into stdin. $ cat pod.json | kubectl delete \-f \- -// Delete pods and services with label name=myLabel. +# Delete pods and services with label name=myLabel. $ kubectl delete pods,services \-l name=myLabel -// Delete a pod with UID 1234\-56\-7890\-234234\-456456. +# Delete a pod with UID 1234\-56\-7890\-234234\-456456. $ kubectl delete pod 1234\-56\-7890\-234234\-456456 -// Delete all pods +# Delete all pods $ kubectl delete pods \-\-all .fi diff --git a/docs/man/man1/kubectl-describe.1 b/docs/man/man1/kubectl-describe.1 index 63a35c99ba84d..5d025316fa35a 100644 --- a/docs/man/man1/kubectl-describe.1 +++ b/docs/man/man1/kubectl-describe.1 @@ -150,23 +150,23 @@ namespaces (ns) or secrets. .RS .nf -// Describe a node +# Describe a node $ kubectl describe nodes kubernetes\-minion\-emt8.c.myproject.internal -// Describe a pod +# Describe a pod $ kubectl describe pods/nginx -// Describe a pod using the data in pod.json. +# Describe a pod using the data in pod.json. $ kubectl describe \-f pod.json -// Describe all pods +# Describe all pods $ kubectl describe pods -// Describe pods by label name=myLabel +# Describe pods by label 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). +# 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 .fi diff --git a/docs/man/man1/kubectl-exec.1 b/docs/man/man1/kubectl-exec.1 index d6cf8dafbfdb7..45a2f2da69f98 100644 --- a/docs/man/man1/kubectl-exec.1 +++ b/docs/man/man1/kubectl-exec.1 @@ -141,14 +141,14 @@ Execute a command in a container. .RS .nf -// get output from running 'date' from pod 123456\-7890, using the first container by default +# get output from running 'date' from pod 123456\-7890, using the first container by default $ kubectl exec 123456\-7890 date -// get output from running 'date' in ruby\-container from pod 123456\-7890 +# get output from running 'date' in ruby\-container from pod 123456\-7890 $ kubectl exec 123456\-7890 \-c ruby\-container date -// switch to raw terminal mode, sends stdin to 'bash' in ruby\-container from pod 123456\-780 -// and sends stdout/stderr from 'bash' back to the client +# switch to raw terminal mode, sends stdin to 'bash' in ruby\-container from pod 123456\-780 +# and sends stdout/stderr from 'bash' back to the client $ kubectl exec 123456\-7890 \-c ruby\-container \-i \-t \-\- bash \-il .fi diff --git a/docs/man/man1/kubectl-expose.1 b/docs/man/man1/kubectl-expose.1 index 50927d0cd2057..7c17e1a32fb3a 100644 --- a/docs/man/man1/kubectl-expose.1 +++ b/docs/man/man1/kubectl-expose.1 @@ -207,16 +207,16 @@ re\-use the labels from the resource it exposes. .RS .nf -// Creates a service for a replicated nginx, which serves on port 80 and connects to the containers on port 8000. +# Creates 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 # Creates 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 -// Creates a second service based on the above service, exposing the container port 8443 as port 443 with the name "nginx\-https" +# Creates 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 -// Create a service for a replicated streaming application on port 4100 balancing UDP traffic and named 'video\-stream'. +# 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 .fi diff --git a/docs/man/man1/kubectl-get.1 b/docs/man/man1/kubectl-get.1 index aaa96515c303a..704450f2be866 100644 --- a/docs/man/man1/kubectl-get.1 +++ b/docs/man/man1/kubectl-get.1 @@ -172,25 +172,25 @@ of the \-\-template flag, you can filter the attributes of the fetched resource( .RS .nf -// List all pods in ps output format. +# List all pods in ps output format. $ kubectl get pods -// List all pods in ps output format with more information (such as node name). +# List all pods in ps output format with more information (such as node name). $ kubectl get pods \-o wide -// List a single replication controller with specified NAME in ps output format. +# List a single replication controller with specified NAME in ps output format. $ kubectl get replicationcontroller web -// List a single pod in JSON output format. +# List a single pod in JSON output format. $ kubectl get \-o json pod web\-pod\-13je7 -// Return only the phase value of the specified pod. +# Return only the phase value of the specified pod. $ kubectl get \-o template web\-pod\-13je7 \-\-template={{.status.phase}} \-\-api\-version=v1 -// List all replication controllers and services together in ps output format. +# List all replication controllers and services together in ps output format. $ kubectl get rc,services -// List one or more resources by their type and names. +# List one or more resources by their type and names. $ kubectl get rc/web service/frontend pods/web\-pod\-13je7 .fi diff --git a/docs/man/man1/kubectl-label.1 b/docs/man/man1/kubectl-label.1 index a74ab28140ad1..fdde683382eff 100644 --- a/docs/man/man1/kubectl-label.1 +++ b/docs/man/man1/kubectl-label.1 @@ -163,20 +163,20 @@ If \-\-resource\-version is specified, then updates will use this resource versi .RS .nf -// Update pod 'foo' with the label 'unhealthy' and the value 'true'. +# Update pod 'foo' with the label 'unhealthy' and the value 'true'. $ kubectl label pods foo unhealthy=true -// Update pod 'foo' with the label 'status' and the value 'unhealthy', overwriting any existing value. +# Update pod 'foo' with the label 'status' and the value 'unhealthy', overwriting any existing value. $ kubectl label \-\-overwrite pods foo status=unhealthy -// Update all pods in the namespace +# Update all pods in the namespace $ kubectl label pods \-\-all status=unhealthy -// Update pod 'foo' only if the resource is unchanged from version 1. +# Update pod 'foo' only if the resource is unchanged from 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. +# Update pod 'foo' by removing a label named 'bar' if it exists. +# Does not require the \-\-overwrite flag. $ kubectl label pods foo bar\- .fi diff --git a/docs/man/man1/kubectl-logs.1 b/docs/man/man1/kubectl-logs.1 index 657afc01273f6..d4cc5bdc46662 100644 --- a/docs/man/man1/kubectl-logs.1 +++ b/docs/man/man1/kubectl-logs.1 @@ -141,13 +141,13 @@ Print the logs for a container in a pod. If the pod has only one container, the .RS .nf -// Returns snapshot of ruby\-container logs from pod 123456\-7890. +# Returns snapshot of ruby\-container logs from pod 123456\-7890. $ kubectl logs 123456\-7890 ruby\-container -// Returns snapshot of previous terminated ruby\-container logs from pod 123456\-7890. +# Returns snapshot of previous terminated ruby\-container logs from pod 123456\-7890. $ kubectl logs \-p 123456\-7890 ruby\-container -// Starts streaming of ruby\-container logs from pod 123456\-7890. +# Starts streaming of ruby\-container logs from pod 123456\-7890. $ kubectl logs \-f 123456\-7890 ruby\-container .fi diff --git a/docs/man/man1/kubectl-patch.1 b/docs/man/man1/kubectl-patch.1 index acd2a370d8ef2..fd108a1c2ff52 100644 --- a/docs/man/man1/kubectl-patch.1 +++ b/docs/man/man1/kubectl-patch.1 @@ -141,10 +141,10 @@ Please refer to the models in .nf -// Partially update a node using strategic merge patch +# Partially update a node using strategic merge patch kubectl patch node k8s\-node\-1 \-p '{"spec":{"unschedulable":true}}' -// Update a container's image; spec.containers[*].name is required because it's a merge key +# Update a container's image; spec.containers[*].name is required because it's a merge key kubectl patch pod valid\-pod \-p '{"spec":{"containers":[{"name":"kubernetes\-serve\-hostname","image":"new image"}]}}' .fi diff --git a/docs/man/man1/kubectl-port-forward.1 b/docs/man/man1/kubectl-port-forward.1 index 6c543d7921d63..2b0531261bedb 100644 --- a/docs/man/man1/kubectl-port-forward.1 +++ b/docs/man/man1/kubectl-port-forward.1 @@ -130,16 +130,16 @@ Forward one or more local ports to a pod. .nf -// listens on ports 5000 and 6000 locally, forwarding data to/from ports 5000 and 6000 in the pod +# listens on ports 5000 and 6000 locally, forwarding data to/from ports 5000 and 6000 in the pod $ kubectl port\-forward mypod 5000 6000 -// listens on port 8888 locally, forwarding to 5000 in the pod +# listens on port 8888 locally, forwarding to 5000 in the pod $ kubectl port\-forward mypod 8888:5000 -// listens on a random port locally, forwarding to 5000 in the pod +# listens on a random port locally, forwarding to 5000 in the pod $ kubectl port\-forward mypod :5000 -// listens on a random port locally, forwarding to 5000 in the pod +# listens on a random port locally, forwarding to 5000 in the pod $ kubectl port\-forward mypod 0:5000 .fi diff --git a/docs/man/man1/kubectl-proxy.1 b/docs/man/man1/kubectl-proxy.1 index d07777c7bed60..6f80e85247645 100644 --- a/docs/man/man1/kubectl-proxy.1 +++ b/docs/man/man1/kubectl-proxy.1 @@ -186,15 +186,15 @@ The above lets you 'curl localhost:8001/custom/api/v1/pods' .RS .nf -// Run a proxy to kubernetes apiserver on port 8011, serving static content from ./local/www/ +# Run a proxy to kubernetes apiserver on port 8011, serving static content from ./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. +# 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 -// 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/ +# 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 .fi diff --git a/docs/man/man1/kubectl-replace.1 b/docs/man/man1/kubectl-replace.1 index a264fbd4fd231..564af995ad2ca 100644 --- a/docs/man/man1/kubectl-replace.1 +++ b/docs/man/man1/kubectl-replace.1 @@ -158,16 +158,16 @@ Please refer to the models in .RS .nf -// Replace a pod using the data in pod.json. +# Replace a pod using the data in pod.json. $ kubectl replace \-f ./pod.json -// Replace a pod based on the JSON passed into stdin. +# Replace a pod based on the JSON passed into stdin. $ cat pod.json | kubectl replace \-f \- -// Update a single\-container pod's image version (tag) to v4 +# 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 \- -// Force replace, delete and then re\-create the resource +# Force replace, delete and then re\-create the resource kubectl replace \-\-force \-f ./pod.json .fi diff --git a/docs/man/man1/kubectl-rolling-update.1 b/docs/man/man1/kubectl-rolling-update.1 index b073cc67af726..fa2ea4aba167d 100644 --- a/docs/man/man1/kubectl-rolling-update.1 +++ b/docs/man/man1/kubectl-rolling-update.1 @@ -179,17 +179,17 @@ existing replication controller and overwrite at least one (common) label in its .RS .nf -// Update pods of frontend\-v1 using new replication controller data in frontend\-v2.json. +# Update pods of frontend\-v1 using new replication controller data in frontend\-v2.json. $ kubectl rolling\-update frontend\-v1 \-f frontend\-v2.json -// Update pods of frontend\-v1 using JSON data passed into stdin. +# Update pods of frontend\-v1 using JSON data passed into stdin. $ 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. +# 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 -// Update the pods of frontend by just changing the image, and keeping the old name +# Update the pods of frontend by just changing the image, and keeping the old name $ kubectl rolling\-update frontend \-\-image=image:v2 diff --git a/docs/man/man1/kubectl-run.1 b/docs/man/man1/kubectl-run.1 index 53b2cccadb557..a7bfceabfd979 100644 --- a/docs/man/man1/kubectl-run.1 +++ b/docs/man/man1/kubectl-run.1 @@ -191,16 +191,16 @@ Creates a replication controller to manage the created container(s). .RS .nf -// Starts a single instance of nginx. +# Starts a single instance of nginx. $ kubectl run nginx \-\-image=nginx -// Starts a replicated instance of nginx. +# Starts a replicated instance of nginx. $ kubectl run nginx \-\-image=nginx \-\-replicas=5 -// Dry run. Print the corresponding API objects without creating them. +# Dry run. Print the corresponding API objects without creating them. $ kubectl run nginx \-\-image=nginx \-\-dry\-run -// Start a single instance of nginx, but overload the spec of the replication controller with a partial set of values parsed from JSON. +# Start a single instance of nginx, but overload the spec of the replication controller with a partial set of values parsed from JSON. $ kubectl run nginx \-\-image=nginx \-\-overrides='{ "apiVersion": "v1", "spec": { ... } }' .fi diff --git a/docs/man/man1/kubectl-scale.1 b/docs/man/man1/kubectl-scale.1 index 81d0ea236f6cd..072e14f5a5591 100644 --- a/docs/man/man1/kubectl-scale.1 +++ b/docs/man/man1/kubectl-scale.1 @@ -151,13 +151,13 @@ scale is sent to the server. .RS .nf -// Scale replication controller named 'foo' to 3. +# Scale replication controller named 'foo' to 3. $ kubectl scale \-\-replicas=3 replicationcontrollers foo -// If the replication controller named foo's current size is 2, scale foo to 3. +# If the replication controller named foo's current size is 2, scale foo to 3. $ kubectl scale \-\-current\-replicas=2 \-\-replicas=3 replicationcontrollers foo -// Scale multiple replication controllers. +# Scale multiple replication controllers. $ kubectl scale \-\-replicas=5 rc/foo rc/bar .fi diff --git a/docs/man/man1/kubectl-stop.1 b/docs/man/man1/kubectl-stop.1 index 437d0852932bc..f0803b2a3f64e 100644 --- a/docs/man/man1/kubectl-stop.1 +++ b/docs/man/man1/kubectl-stop.1 @@ -161,16 +161,16 @@ If the resource is scalable it will be scaled to 0 before deletion. .RS .nf -// Shut down foo. +# Shut down foo. $ kubectl stop replicationcontroller foo -// Stop pods and services with label name=myLabel. +# Stop pods and services with label name=myLabel. $ kubectl stop pods,services \-l name=myLabel -// Shut down the service defined in service.json +# Shut down the service defined in service.json $ kubectl stop \-f service.json -// Shut down all resources in the path/to/resources directory +# Shut down all resources in the path/to/resources directory $ kubectl stop \-f path/to/resources .fi diff --git a/docs/user-guide/kubectl/kubectl_attach.md b/docs/user-guide/kubectl/kubectl_attach.md index 6aebd7163a941..3bc263bdea13e 100644 --- a/docs/user-guide/kubectl/kubectl_attach.md +++ b/docs/user-guide/kubectl/kubectl_attach.md @@ -47,14 +47,14 @@ kubectl attach POD -c CONTAINER ### Examples ``` -// get output from running pod 123456-7890, using the first container by default +# get output from running pod 123456-7890, using the first container by default $ kubectl attach 123456-7890 - -// get output from ruby-container from pod 123456-7890 + +# get output from ruby-container from pod 123456-7890 $ kubectl attach 123456-7890 -c ruby-container date -// switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-780 -// and sends stdout/stderr from 'bash' back to the client +# switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-780 +# and sends stdout/stderr from 'bash' back to the client $ kubectl attach 123456-7890 -c ruby-container -i -t ``` @@ -100,7 +100,7 @@ $ kubectl attach 123456-7890 -c ruby-container -i -t * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra at 2015-08-05 14:22:30.874171127 +0000 UTC +###### Auto generated by spf13/cobra at 2015-08-12 16:38:35.552121602 +0000 UTC [![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_config_set-cluster.md b/docs/user-guide/kubectl/kubectl_config_set-cluster.md index b29c666ece8a6..999cf637a521f 100644 --- a/docs/user-guide/kubectl/kubectl_config_set-cluster.md +++ b/docs/user-guide/kubectl/kubectl_config_set-cluster.md @@ -48,13 +48,13 @@ kubectl config set-cluster NAME [--server=server] [--certificate-authority=path/ ### Examples ``` -// Set only the server field on the e2e cluster entry without touching other values. +# 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 -// Embed certificate authority data for the e2e cluster entry +# Embed certificate authority data for the e2e cluster entry $ kubectl config set-cluster e2e --certificate-authority=~/.kube/e2e/kubernetes.ca.crt -// Disable cert checking for the dev cluster entry +# Disable cert checking for the dev cluster entry $ kubectl config set-cluster e2e --insecure-skip-tls-verify=true ``` @@ -98,7 +98,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 at 2015-08-05 14:22:30.87626611 +0000 UTC +###### Auto generated by spf13/cobra at 2015-08-12 16:38:35.5536843 +0000 UTC [![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 2507432b121d1..acd77f110e5e7 100644 --- a/docs/user-guide/kubectl/kubectl_config_set-context.md +++ b/docs/user-guide/kubectl/kubectl_config_set-context.md @@ -48,7 +48,7 @@ kubectl config set-context NAME [--cluster=cluster_nickname] [--user=user_nickna ### Examples ``` -// Set the user field on the gce context entry without touching other values +# Set the user field on the gce context entry without touching other values $ kubectl config set-context gce --user=cluster-admin ``` @@ -91,7 +91,7 @@ $ kubectl config set-context gce --user=cluster-admin * [kubectl config](kubectl_config.md) - config modifies kubeconfig files -###### Auto generated by spf13/cobra at 2015-08-05 14:22:30.876621894 +0000 UTC +###### Auto generated by spf13/cobra at 2015-08-12 16:38:35.553957807 +0000 UTC [![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 7e6d27df19e89..4b009a3fd0f82 100644 --- a/docs/user-guide/kubectl/kubectl_config_set-credentials.md +++ b/docs/user-guide/kubectl/kubectl_config_set-credentials.md @@ -60,14 +60,14 @@ kubectl config set-credentials NAME [--client-certificate=path/to/certfile] [--c ### Examples ``` -// Set only the "client-key" field on the "cluster-admin" -// entry, without touching other values: +# 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 -// Set basic auth for the "cluster-admin" entry +# Set basic auth for the "cluster-admin" entry $ kubectl config set-credentials cluster-admin --username=admin --password=uXFGweU9l35qcif -// Embed client certificate data in the "cluster-admin" entry +# Embed client certificate data in the "cluster-admin" entry $ kubectl config set-credentials cluster-admin --client-certificate=~/.kube/admin.crt --embed-certs=true ``` @@ -111,7 +111,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 at 2015-08-05 14:22:30.876445802 +0000 UTC +###### Auto generated by spf13/cobra at 2015-08-12 16:38:35.553818643 +0000 UTC [![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 873b0a7c5d8d3..71bb6be650fdf 100644 --- a/docs/user-guide/kubectl/kubectl_config_view.md +++ b/docs/user-guide/kubectl/kubectl_config_view.md @@ -49,10 +49,10 @@ kubectl config view ### Examples ``` -// Show Merged kubeconfig settings. +# Show Merged kubeconfig settings. $ kubectl config view -// Get the password for the e2e user +# Get the password for the e2e user $ kubectl config view -o template --template='{{range .users}}{{ if eq .name "e2e" }}{{ index .user.password }}{{end}}{{end}}' ``` @@ -103,7 +103,7 @@ $ kubectl config view -o template --template='{{range .users}}{{ if eq .name "e2 * [kubectl config](kubectl_config.md) - config modifies kubeconfig files -###### Auto generated by spf13/cobra at 2015-08-07 19:25:02.005424182 +0000 UTC +###### Auto generated by spf13/cobra at 2015-08-12 16:38:35.553558331 +0000 UTC [![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_create.md b/docs/user-guide/kubectl/kubectl_create.md index aa95c6e71eca8..d62a2ea0f37ef 100644 --- a/docs/user-guide/kubectl/kubectl_create.md +++ b/docs/user-guide/kubectl/kubectl_create.md @@ -49,10 +49,10 @@ kubectl create -f FILENAME ### Examples ``` -// Create a pod using the data in pod.json. +# Create a pod using the data in pod.json. $ kubectl create -f ./pod.json -// Create a pod based on the JSON passed into stdin. +# Create a pod based on the JSON passed into stdin. $ cat pod.json | kubectl create -f - ``` @@ -97,7 +97,7 @@ $ cat pod.json | kubectl create -f - * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra at 2015-08-05 14:22:30.872168232 +0000 UTC +###### Auto generated by spf13/cobra at 2015-08-12 16:38:35.550238308 +0000 UTC [![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_delete.md b/docs/user-guide/kubectl/kubectl_delete.md index 13757c9641ca4..6a18c9dbc7e07 100644 --- a/docs/user-guide/kubectl/kubectl_delete.md +++ b/docs/user-guide/kubectl/kubectl_delete.md @@ -55,19 +55,19 @@ kubectl delete ([-f FILENAME] | TYPE [(NAME | -l label | --all)]) ### Examples ``` -// Delete a pod using the type and name specified in pod.json. +# Delete a pod using the type and name specified in pod.json. $ kubectl delete -f ./pod.json -// Delete a pod based on the type and name in the JSON passed into stdin. +# Delete a pod based on the type and name in the JSON passed into stdin. $ cat pod.json | kubectl delete -f - -// Delete pods and services with label name=myLabel. +# Delete pods and services with label name=myLabel. $ kubectl delete pods,services -l name=myLabel -// Delete a pod with UID 1234-56-7890-234234-456456. +# Delete a pod with UID 1234-56-7890-234234-456456. $ kubectl delete pod 1234-56-7890-234234-456456 -// Delete all pods +# Delete all pods $ kubectl delete pods --all ``` @@ -118,7 +118,7 @@ $ kubectl delete pods --all * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra at 2015-08-05 23:27:50.885990004 +0000 UTC +###### Auto generated by spf13/cobra at 2015-08-12 16:38:35.550716188 +0000 UTC [![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 6f5a8dbe7bbab..d75ed978c9669 100644 --- a/docs/user-guide/kubectl/kubectl_describe.md +++ b/docs/user-guide/kubectl/kubectl_describe.md @@ -60,23 +60,23 @@ kubectl describe (-f FILENAME | TYPE [NAME_PREFIX | -l label] | TYPE/NAME) ### Examples ``` -// Describe a node +# Describe a node $ kubectl describe nodes kubernetes-minion-emt8.c.myproject.internal -// Describe a pod +# Describe a pod $ kubectl describe pods/nginx -// Describe a pod using the data in pod.json. +# Describe a pod using the data in pod.json. $ kubectl describe -f pod.json -// Describe all pods +# Describe all pods $ kubectl describe pods -// Describe pods by label name=myLabel +# Describe pods by label 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). +# 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 ``` @@ -121,7 +121,7 @@ $ kubectl describe pods frontend * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra at 2015-08-12 07:26:58.783477397 +0000 UTC +###### Auto generated by spf13/cobra at 2015-08-12 17:00:51.070612795 +0000 UTC [![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_exec.md b/docs/user-guide/kubectl/kubectl_exec.md index ead0a960afc89..ca3303cfcbd6b 100644 --- a/docs/user-guide/kubectl/kubectl_exec.md +++ b/docs/user-guide/kubectl/kubectl_exec.md @@ -47,14 +47,14 @@ kubectl exec POD -c CONTAINER -- COMMAND [args...] ### Examples ``` -// get output from running 'date' from pod 123456-7890, using the first container by default +# get output from running 'date' from pod 123456-7890, using the first container by default $ kubectl exec 123456-7890 date -// get output from running 'date' in ruby-container from pod 123456-7890 +# get output from running 'date' in ruby-container from pod 123456-7890 $ kubectl exec 123456-7890 -c ruby-container date -// switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-780 -// and sends stdout/stderr from 'bash' back to the client +# switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-780 +# and sends stdout/stderr from 'bash' back to the client $ kubectl exec 123456-7890 -c ruby-container -i -t -- bash -il ``` @@ -101,7 +101,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 at 2015-08-05 14:22:30.874366729 +0000 UTC +###### Auto generated by spf13/cobra at 2015-08-12 16:38:35.552259405 +0000 UTC [![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_expose.md b/docs/user-guide/kubectl/kubectl_expose.md index 0f03eba586170..e9194037e8204 100644 --- a/docs/user-guide/kubectl/kubectl_expose.md +++ b/docs/user-guide/kubectl/kubectl_expose.md @@ -51,16 +51,16 @@ kubectl expose (-f FILENAME | TYPE NAME) --port=port [--protocol=TCP|UDP] [--tar ### Examples ``` -// Creates a service for a replicated nginx, which serves on port 80 and connects to the containers on port 8000. +# Creates 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 # Creates 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 -// Creates a second service based on the above service, exposing the container port 8443 as port 443 with the name "nginx-https" +# Creates 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 -// Create a service for a replicated streaming application on port 4100 balancing UDP traffic and named 'video-stream'. +# 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 ``` @@ -122,7 +122,7 @@ $ kubectl expose rc streamer --port=4100 --protocol=udp --name=video-stream * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra at 2015-08-12 08:16:20.804863501 +0000 UTC +###### Auto generated by spf13/cobra at 2015-08-12 17:00:51.073556749 +0000 UTC [![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 a3e5f810aacad..9e73ab473ad19 100644 --- a/docs/user-guide/kubectl/kubectl_get.md +++ b/docs/user-guide/kubectl/kubectl_get.md @@ -55,25 +55,25 @@ kubectl get [(-o|--output=)json|yaml|template|wide|...] (TYPE [(NAME | -l label] ### Examples ``` -// List all pods in ps output format. +# List all pods in ps output format. $ kubectl get pods -// List all pods in ps output format with more information (such as node name). +# List all pods in ps output format with more information (such as node name). $ kubectl get pods -o wide -// List a single replication controller with specified NAME in ps output format. +# List a single replication controller with specified NAME in ps output format. $ kubectl get replicationcontroller web -// List a single pod in JSON output format. +# List a single pod in JSON output format. $ kubectl get -o json pod web-pod-13je7 -// Return only the phase value of the specified pod. +# Return only the phase value of the specified pod. $ kubectl get -o template web-pod-13je7 --template={{.status.phase}} --api-version=v1 -// List all replication controllers and services together in ps output format. +# List all replication controllers and services together in ps output format. $ kubectl get rc,services -// List one or more resources by their type and names. +# List one or more resources by their type and names. $ kubectl get rc/web service/frontend pods/web-pod-13je7 ``` @@ -125,7 +125,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 at 2015-08-07 19:25:01.995301464 +0000 UTC +###### Auto generated by spf13/cobra at 2015-08-12 16:38:35.549908733 +0000 UTC [![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 ec05d81f5536a..fe81f5a2a4786 100644 --- a/docs/user-guide/kubectl/kubectl_label.md +++ b/docs/user-guide/kubectl/kubectl_label.md @@ -51,20 +51,20 @@ kubectl label [--overwrite] TYPE NAME KEY_1=VAL_1 ... KEY_N=VAL_N [--resource-ve ### Examples ``` -// Update pod 'foo' with the label 'unhealthy' and the value 'true'. +# Update pod 'foo' with the label 'unhealthy' and the value 'true'. $ kubectl label pods foo unhealthy=true -// Update pod 'foo' with the label 'status' and the value 'unhealthy', overwriting any existing value. +# Update pod 'foo' with the label 'status' and the value 'unhealthy', overwriting any existing value. $ kubectl label --overwrite pods foo status=unhealthy -// Update all pods in the namespace +# Update all pods in the namespace $ kubectl label pods --all status=unhealthy -// Update pod 'foo' only if the resource is unchanged from version 1. +# Update pod 'foo' only if the resource is unchanged from 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. +# Update pod 'foo' by removing a label named 'bar' if it exists. +# Does not require the --overwrite flag. $ kubectl label pods foo bar- ``` @@ -115,7 +115,7 @@ $ kubectl label pods foo bar- * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra at 2015-08-07 19:25:02.004743482 +0000 UTC +###### Auto generated by spf13/cobra at 2015-08-12 16:38:35.553249869 +0000 UTC [![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 201308b6e140d..71101fb83e1d4 100644 --- a/docs/user-guide/kubectl/kubectl_logs.md +++ b/docs/user-guide/kubectl/kubectl_logs.md @@ -47,13 +47,13 @@ kubectl logs [-f] [-p] POD [-c CONTAINER] ### Examples ``` -// Returns snapshot of ruby-container logs from pod 123456-7890. +# Returns snapshot of ruby-container logs from pod 123456-7890. $ kubectl logs 123456-7890 ruby-container -// Returns snapshot of previous terminated ruby-container logs from pod 123456-7890. +# Returns snapshot of previous terminated ruby-container logs from pod 123456-7890. $ kubectl logs -p 123456-7890 ruby-container -// Starts streaming of ruby-container logs from pod 123456-7890. +# Starts streaming of ruby-container logs from pod 123456-7890. $ kubectl logs -f 123456-7890 ruby-container ``` @@ -100,7 +100,7 @@ $ kubectl logs -f 123456-7890 ruby-container * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra at 2015-08-05 14:22:30.873022075 +0000 UTC +###### Auto generated by spf13/cobra at 2015-08-12 16:38:35.55101853 +0000 UTC [![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_patch.md b/docs/user-guide/kubectl/kubectl_patch.md index 1fa55839f9d5b..24e2fa625e4a9 100644 --- a/docs/user-guide/kubectl/kubectl_patch.md +++ b/docs/user-guide/kubectl/kubectl_patch.md @@ -52,10 +52,10 @@ kubectl patch TYPE NAME -p PATCH ``` -// Partially update a node using strategic merge patch +# Partially update a node using strategic merge patch kubectl patch node k8s-node-1 -p '{"spec":{"unschedulable":true}}' -// Update a container's image; spec.containers[*].name is required because it's a merge key +# Update a container's image; spec.containers[*].name is required because it's a merge key kubectl patch pod valid-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve-hostname","image":"new image"}]}}' ``` @@ -100,7 +100,7 @@ kubectl patch pod valid-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra at 2015-08-07 09:20:43.877286912 +0000 UTC +###### Auto generated by spf13/cobra at 2015-08-12 16:38:35.550556305 +0000 UTC [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_patch.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_port-forward.md b/docs/user-guide/kubectl/kubectl_port-forward.md index 84cc12ccbe5a6..0fd8a47391448 100644 --- a/docs/user-guide/kubectl/kubectl_port-forward.md +++ b/docs/user-guide/kubectl/kubectl_port-forward.md @@ -48,16 +48,16 @@ kubectl port-forward POD [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT ``` -// listens on ports 5000 and 6000 locally, forwarding data to/from ports 5000 and 6000 in the pod +# listens on ports 5000 and 6000 locally, forwarding data to/from ports 5000 and 6000 in the pod $ kubectl port-forward mypod 5000 6000 -// listens on port 8888 locally, forwarding to 5000 in the pod +# listens on port 8888 locally, forwarding to 5000 in the pod $ kubectl port-forward mypod 8888:5000 -// listens on a random port locally, forwarding to 5000 in the pod +# listens on a random port locally, forwarding to 5000 in the pod $ kubectl port-forward mypod :5000 -// listens on a random port locally, forwarding to 5000 in the pod +# listens on a random port locally, forwarding to 5000 in the pod $ kubectl port-forward mypod 0:5000 ``` @@ -101,7 +101,7 @@ $ kubectl port-forward mypod 0:5000 * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra at 2015-08-07 09:20:43.879885036 +0000 UTC +###### Auto generated by spf13/cobra at 2015-08-12 16:38:35.552397633 +0000 UTC [![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 fe81fa6619cf3..a87510e509344 100644 --- a/docs/user-guide/kubectl/kubectl_proxy.md +++ b/docs/user-guide/kubectl/kubectl_proxy.md @@ -62,15 +62,15 @@ kubectl proxy [--port=PORT] [--www=static-dir] [--www-prefix=prefix] [--api-pref ### Examples ``` -// Run a proxy to kubernetes apiserver on port 8011, serving static content from ./local/www/ +# Run a proxy to kubernetes apiserver on port 8011, serving static content from ./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. +# 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 -// 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/ +# 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 ``` @@ -123,7 +123,7 @@ $ kubectl proxy --api-prefix=/k8s-api * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra at 2015-08-05 14:22:30.874751273 +0000 UTC +###### Auto generated by spf13/cobra at 2015-08-12 16:38:35.55255853 +0000 UTC [![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 e6bbb71cc85d9..de8a035c1f188 100644 --- a/docs/user-guide/kubectl/kubectl_replace.md +++ b/docs/user-guide/kubectl/kubectl_replace.md @@ -53,16 +53,16 @@ kubectl replace -f FILENAME ### Examples ``` -// Replace a pod using the data in pod.json. +# Replace a pod using the data in pod.json. $ kubectl replace -f ./pod.json -// Replace a pod based on the JSON passed into stdin. +# Replace a pod based on the JSON passed into stdin. $ cat pod.json | kubectl replace -f - -// Update a single-container pod's image version (tag) to v4 +# 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 - -// Force replace, delete and then re-create the resource +# Force replace, delete and then re-create the resource kubectl replace --force -f ./pod.json ``` @@ -111,7 +111,7 @@ kubectl replace --force -f ./pod.json * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra at 2015-08-10 16:02:35.925298963 +0000 UTC +###### Auto generated by spf13/cobra at 2015-08-12 16:38:35.550406842 +0000 UTC [![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 c3a5178fc043b..6350614f4cb82 100644 --- a/docs/user-guide/kubectl/kubectl_rolling-update.md +++ b/docs/user-guide/kubectl/kubectl_rolling-update.md @@ -51,17 +51,17 @@ kubectl rolling-update OLD_CONTROLLER_NAME ([NEW_CONTROLLER_NAME] --image=NEW_CO ### Examples ``` -// Update pods of frontend-v1 using new replication controller data in frontend-v2.json. +# Update pods of frontend-v1 using new replication controller data in frontend-v2.json. $ kubectl rolling-update frontend-v1 -f frontend-v2.json -// Update pods of frontend-v1 using JSON data passed into stdin. +# Update pods of frontend-v1 using JSON data passed into stdin. $ 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. +# 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 -// Update the pods of frontend by just changing the image, and keeping the old name +# Update the pods of frontend by just changing the image, and keeping the old name $ kubectl rolling-update frontend --image=image:v2 ``` @@ -117,7 +117,7 @@ $ kubectl rolling-update frontend --image=image:v2 * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra at 2015-08-10 14:26:04.707001372 +0000 UTC +###### Auto generated by spf13/cobra at 2015-08-12 16:38:35.55183074 +0000 UTC [![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_run.md b/docs/user-guide/kubectl/kubectl_run.md index 60872be501374..78234a607c82c 100644 --- a/docs/user-guide/kubectl/kubectl_run.md +++ b/docs/user-guide/kubectl/kubectl_run.md @@ -48,16 +48,16 @@ kubectl run NAME --image=image [--port=port] [--replicas=replicas] [--dry-run=bo ### Examples ``` -// Starts a single instance of nginx. +# Starts a single instance of nginx. $ kubectl run nginx --image=nginx -// Starts a replicated instance of nginx. +# Starts a replicated instance of nginx. $ kubectl run nginx --image=nginx --replicas=5 -// Dry run. Print the corresponding API objects without creating them. +# Dry run. Print the corresponding API objects without creating them. $ kubectl run nginx --image=nginx --dry-run -// Start a single instance of nginx, but overload the spec of the replication controller with a partial set of values parsed from JSON. +# Start a single instance of nginx, but overload the spec of the replication controller with a partial set of values parsed from JSON. $ kubectl run nginx --image=nginx --overrides='{ "apiVersion": "v1", "spec": { ... } }' ``` @@ -116,7 +116,7 @@ $ kubectl run nginx --image=nginx --overrides='{ "apiVersion": "v1", "spec": { . * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra at 2015-08-07 19:25:02.003600767 +0000 UTC +###### Auto generated by spf13/cobra at 2015-08-12 16:38:35.552754871 +0000 UTC [![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 361abaacfd4e0..be2c3c29eb7c8 100644 --- a/docs/user-guide/kubectl/kubectl_scale.md +++ b/docs/user-guide/kubectl/kubectl_scale.md @@ -52,13 +52,13 @@ kubectl scale [--resource-version=version] [--current-replicas=count] --replicas ### Examples ``` -// Scale replication controller named 'foo' to 3. +# Scale replication controller named 'foo' to 3. $ kubectl scale --replicas=3 replicationcontrollers foo -// If the replication controller named foo's current size is 2, scale foo to 3. +# If the replication controller named foo's current size is 2, scale foo to 3. $ kubectl scale --current-replicas=2 --replicas=3 replicationcontrollers foo -// Scale multiple replication controllers. +# Scale multiple replication controllers. $ kubectl scale --replicas=5 rc/foo rc/bar ``` @@ -106,7 +106,7 @@ $ kubectl scale --replicas=5 rc/foo rc/bar * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra at 2015-08-05 23:27:50.886701916 +0000 UTC +###### Auto generated by spf13/cobra at 2015-08-12 16:38:35.551986915 +0000 UTC [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_scale.md?pixel)]() diff --git a/docs/user-guide/kubectl/kubectl_stop.md b/docs/user-guide/kubectl/kubectl_stop.md index cfb84f2a58230..1023ccb0caab8 100644 --- a/docs/user-guide/kubectl/kubectl_stop.md +++ b/docs/user-guide/kubectl/kubectl_stop.md @@ -53,16 +53,16 @@ kubectl stop (-f FILENAME | TYPE (NAME | -l label | --all)) ### Examples ``` -// Shut down foo. +# Shut down foo. $ kubectl stop replicationcontroller foo -// Stop pods and services with label name=myLabel. +# Stop pods and services with label name=myLabel. $ kubectl stop pods,services -l name=myLabel -// Shut down the service defined in service.json +# Shut down the service defined in service.json $ kubectl stop -f service.json -// Shut down all resources in the path/to/resources directory +# Shut down all resources in the path/to/resources directory $ kubectl stop -f path/to/resources ``` @@ -112,7 +112,7 @@ $ kubectl stop -f path/to/resources * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager -###### Auto generated by spf13/cobra at 2015-08-05 23:27:50.888354767 +0000 UTC +###### Auto generated by spf13/cobra at 2015-08-12 16:38:35.552901364 +0000 UTC [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_stop.md?pixel)]() diff --git a/pkg/kubectl/cmd/attach.go b/pkg/kubectl/cmd/attach.go index 07848233eb2e6..a3dc22387a708 100644 --- a/pkg/kubectl/cmd/attach.go +++ b/pkg/kubectl/cmd/attach.go @@ -33,14 +33,14 @@ import ( ) const ( - attach_example = `// get output from running pod 123456-7890, using the first container by default + attach_example = `# get output from running pod 123456-7890, using the first container by default $ kubectl attach 123456-7890 - -// get output from ruby-container from pod 123456-7890 + +# get output from ruby-container from pod 123456-7890 $ kubectl attach 123456-7890 -c ruby-container date -// switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-780 -// and sends stdout/stderr from 'bash' back to the client +# switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-780 +# and sends stdout/stderr from 'bash' back to the client $ kubectl attach 123456-7890 -c ruby-container -i -t` ) diff --git a/pkg/kubectl/cmd/config/create_authinfo.go b/pkg/kubectl/cmd/config/create_authinfo.go index b27425c499678..3373b2b488e76 100644 --- a/pkg/kubectl/cmd/config/create_authinfo.go +++ b/pkg/kubectl/cmd/config/create_authinfo.go @@ -58,14 +58,14 @@ Specifying a name that already exists will merge new fields on top of existing v Bearer token and basic auth are mutually exclusive. `, clientcmd.FlagCertFile, clientcmd.FlagKeyFile, clientcmd.FlagBearerToken, clientcmd.FlagUsername, clientcmd.FlagPassword) -const create_authinfo_example = `// Set only the "client-key" field on the "cluster-admin" -// entry, without touching other values: +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 -// Set basic auth for the "cluster-admin" entry +# Set basic auth for the "cluster-admin" entry $ kubectl config set-credentials cluster-admin --username=admin --password=uXFGweU9l35qcif -// Embed client certificate data in the "cluster-admin" entry +# Embed client certificate data in the "cluster-admin" entry $ kubectl config set-credentials cluster-admin --client-certificate=~/.kube/admin.crt --embed-certs=true` func NewCmdConfigSetAuthInfo(out io.Writer, configAccess ConfigAccess) *cobra.Command { diff --git a/pkg/kubectl/cmd/config/create_cluster.go b/pkg/kubectl/cmd/config/create_cluster.go index 976c8b8524e5b..8f72cf44f3d10 100644 --- a/pkg/kubectl/cmd/config/create_cluster.go +++ b/pkg/kubectl/cmd/config/create_cluster.go @@ -43,13 +43,13 @@ type createClusterOptions struct { 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. + 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 -// Embed certificate authority data for the e2e cluster entry +# Embed certificate authority data for the e2e cluster entry $ kubectl config set-cluster e2e --certificate-authority=~/.kube/e2e/kubernetes.ca.crt -// Disable cert checking for the dev cluster entry +# Disable cert checking for the dev cluster entry $ kubectl config set-cluster e2e --insecure-skip-tls-verify=true` ) diff --git a/pkg/kubectl/cmd/config/create_context.go b/pkg/kubectl/cmd/config/create_context.go index 71194018d50af..3c1b0576841e4 100644 --- a/pkg/kubectl/cmd/config/create_context.go +++ b/pkg/kubectl/cmd/config/create_context.go @@ -39,7 +39,7 @@ type createContextOptions struct { 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 + create_context_example = `# Set the user field on the gce context entry without touching other values $ kubectl config set-context gce --user=cluster-admin` ) diff --git a/pkg/kubectl/cmd/config/view.go b/pkg/kubectl/cmd/config/view.go index d3cdb64945e5c..e914ccbab1572 100644 --- a/pkg/kubectl/cmd/config/view.go +++ b/pkg/kubectl/cmd/config/view.go @@ -43,10 +43,10 @@ const ( view_long = `displays Merged kubeconfig settings or a specified kubeconfig file. You can use --output=template --template=TEMPLATE to extract specific values.` - view_example = `// Show Merged kubeconfig settings. + view_example = `# Show Merged kubeconfig settings. $ kubectl config view -// Get the password for the e2e user +# Get the password for the e2e user $ kubectl config view -o template --template='{{range .users}}{{ if eq .name "e2e" }}{{ index .user.password }}{{end}}{{end}}'` ) diff --git a/pkg/kubectl/cmd/create.go b/pkg/kubectl/cmd/create.go index 5fa12a877e10f..5f2f10736c7ca 100644 --- a/pkg/kubectl/cmd/create.go +++ b/pkg/kubectl/cmd/create.go @@ -34,10 +34,10 @@ const ( create_long = `Create a resource by filename or stdin. JSON and YAML formats are accepted.` - create_example = `// Create a pod using the data in pod.json. + create_example = `# Create a pod using the data in pod.json. $ kubectl create -f ./pod.json -// Create a pod based on the JSON passed into stdin. +# Create a pod based on the JSON passed into stdin. $ cat pod.json | kubectl create -f -` ) diff --git a/pkg/kubectl/cmd/delete.go b/pkg/kubectl/cmd/delete.go index 62e2de5117943..f4ba900da7577 100644 --- a/pkg/kubectl/cmd/delete.go +++ b/pkg/kubectl/cmd/delete.go @@ -41,19 +41,19 @@ Only one type of the arguments may be specified: filenames, resources and names, 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. + delete_example = `# Delete a pod using the type and name specified in pod.json. $ kubectl delete -f ./pod.json -// Delete a pod based on the type and name in the JSON passed into stdin. +# Delete a pod based on the type and name in the JSON passed into stdin. $ cat pod.json | kubectl delete -f - -// Delete pods and services with label name=myLabel. +# Delete pods and services with label name=myLabel. $ kubectl delete pods,services -l name=myLabel -// Delete a pod with UID 1234-56-7890-234234-456456. +# Delete a pod with UID 1234-56-7890-234234-456456. $ kubectl delete pod 1234-56-7890-234234-456456 -// Delete all pods +# Delete all pods $ kubectl delete pods --all` ) diff --git a/pkg/kubectl/cmd/describe.go b/pkg/kubectl/cmd/describe.go index 944647bd9143f..cc4ec90e868f8 100644 --- a/pkg/kubectl/cmd/describe.go +++ b/pkg/kubectl/cmd/describe.go @@ -47,23 +47,23 @@ Possible resource types include (case insensitive): pods (po), services (svc), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns) or secrets.` - describe_example = `// Describe a node + describe_example = `# Describe a node $ kubectl describe nodes kubernetes-minion-emt8.c.myproject.internal -// Describe a pod +# Describe a pod $ kubectl describe pods/nginx -// Describe a pod using the data in pod.json. +# Describe a pod using the data in pod.json. $ kubectl describe -f pod.json -// Describe all pods +# Describe all pods $ kubectl describe pods -// Describe pods by label name=myLabel +# Describe pods by label 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). +# 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` ) diff --git a/pkg/kubectl/cmd/exec.go b/pkg/kubectl/cmd/exec.go index 68689ccba45e9..4cb2d658654cb 100644 --- a/pkg/kubectl/cmd/exec.go +++ b/pkg/kubectl/cmd/exec.go @@ -33,14 +33,14 @@ import ( ) const ( - exec_example = `// get output from running 'date' from pod 123456-7890, using the first container by default + exec_example = `# get output from running 'date' from pod 123456-7890, using the first container by default $ kubectl exec 123456-7890 date -// get output from running 'date' in ruby-container from pod 123456-7890 +# get output from running 'date' in ruby-container from pod 123456-7890 $ kubectl exec 123456-7890 -c ruby-container date -// switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-780 -// and sends stdout/stderr from 'bash' back to the client +# switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-780 +# and sends stdout/stderr from 'bash' back to the client $ kubectl exec 123456-7890 -c ruby-container -i -t -- bash -il` ) diff --git a/pkg/kubectl/cmd/expose.go b/pkg/kubectl/cmd/expose.go index 3e0cd3590405e..b8ba4db6b0a29 100644 --- a/pkg/kubectl/cmd/expose.go +++ b/pkg/kubectl/cmd/expose.go @@ -34,16 +34,16 @@ Looks up a replication controller or service by name and uses the selector for t selector for a new Service on the specified port. If no labels are specified, the new service will re-use the labels from the resource it exposes.` - expose_example = `// Creates a service for a replicated nginx, which serves on port 80 and connects to the containers on port 8000. + expose_example = `# Creates 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 # Creates 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 -// Creates a second service based on the above service, exposing the container port 8443 as port 443 with the name "nginx-https" +# Creates 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 -// Create a service for a replicated streaming application on port 4100 balancing UDP traffic and named 'video-stream'. +# 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` ) diff --git a/pkg/kubectl/cmd/get.go b/pkg/kubectl/cmd/get.go index d341b9973d043..3afa4e05457e3 100644 --- a/pkg/kubectl/cmd/get.go +++ b/pkg/kubectl/cmd/get.go @@ -38,25 +38,25 @@ resourcequotas (quota), namespaces (ns), endpoints (ep) 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. + get_example = `# List all pods in ps output format. $ kubectl get pods -// List all pods in ps output format with more information (such as node name). +# List all pods in ps output format with more information (such as node name). $ kubectl get pods -o wide -// List a single replication controller with specified NAME in ps output format. +# List a single replication controller with specified NAME in ps output format. $ kubectl get replicationcontroller web -// List a single pod in JSON output format. +# List a single pod in JSON output format. $ kubectl get -o json pod web-pod-13je7 -// Return only the phase value of the specified pod. +# Return only the phase value of the specified pod. $ kubectl get -o template web-pod-13je7 --template={{.status.phase}} --api-version=v1 -// List all replication controllers and services together in ps output format. +# List all replication controllers and services together in ps output format. $ kubectl get rc,services -// List one or more resources by their type and names. +# List one or more resources by their type and names. $ kubectl get rc/web service/frontend pods/web-pod-13je7` ) diff --git a/pkg/kubectl/cmd/label.go b/pkg/kubectl/cmd/label.go index ce874580e8cc9..ce6bed24c57fe 100644 --- a/pkg/kubectl/cmd/label.go +++ b/pkg/kubectl/cmd/label.go @@ -35,20 +35,20 @@ const ( A label must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to %[1]d characters. 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'. + label_example = `# Update pod 'foo' with the label 'unhealthy' and the value 'true'. $ kubectl label pods foo unhealthy=true -// Update pod 'foo' with the label 'status' and the value 'unhealthy', overwriting any existing value. +# Update pod 'foo' with the label 'status' and the value 'unhealthy', overwriting any existing value. $ kubectl label --overwrite pods foo status=unhealthy -// Update all pods in the namespace +# Update all pods in the namespace $ kubectl label pods --all status=unhealthy -// Update pod 'foo' only if the resource is unchanged from version 1. +# Update pod 'foo' only if the resource is unchanged from 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. +# Update pod 'foo' by removing a label named 'bar' if it exists. +# Does not require the --overwrite flag. $ kubectl label pods foo bar-` ) diff --git a/pkg/kubectl/cmd/log.go b/pkg/kubectl/cmd/log.go index 810fd4b3a87d3..e81ffda05ee94 100644 --- a/pkg/kubectl/cmd/log.go +++ b/pkg/kubectl/cmd/log.go @@ -29,13 +29,13 @@ import ( ) const ( - log_example = `// Returns snapshot of ruby-container logs from pod 123456-7890. + log_example = `# Returns snapshot of ruby-container logs from pod 123456-7890. $ kubectl logs 123456-7890 ruby-container -// Returns snapshot of previous terminated ruby-container logs from pod 123456-7890. +# Returns snapshot of previous terminated ruby-container logs from pod 123456-7890. $ kubectl logs -p 123456-7890 ruby-container -// Starts streaming of ruby-container logs from pod 123456-7890. +# Starts streaming of ruby-container logs from pod 123456-7890. $ kubectl logs -f 123456-7890 ruby-container` ) diff --git a/pkg/kubectl/cmd/patch.go b/pkg/kubectl/cmd/patch.go index bb30372d9154e..826c8fa259eb6 100644 --- a/pkg/kubectl/cmd/patch.go +++ b/pkg/kubectl/cmd/patch.go @@ -33,10 +33,10 @@ JSON and YAML formats are accepted. Please refer to the models in https://htmlpreview.github.io/?https://github.com/GoogleCloudPlatform/kubernetes/HEAD/docs/api-reference/definitions.html to find if a field is mutable.` patch_example = ` -// Partially update a node using strategic merge patch +# Partially update a node using strategic merge patch kubectl patch node k8s-node-1 -p '{"spec":{"unschedulable":true}}' -// Update a container's image; spec.containers[*].name is required because it's a merge key +# Update a container's image; spec.containers[*].name is required because it's a merge key kubectl patch pod valid-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve-hostname","image":"new image"}]}}'` ) diff --git a/pkg/kubectl/cmd/portforward.go b/pkg/kubectl/cmd/portforward.go index e6c9b0f1daebc..dec1b698e9c24 100644 --- a/pkg/kubectl/cmd/portforward.go +++ b/pkg/kubectl/cmd/portforward.go @@ -30,16 +30,16 @@ import ( const ( portforward_example = ` -// listens on ports 5000 and 6000 locally, forwarding data to/from ports 5000 and 6000 in the pod +# listens on ports 5000 and 6000 locally, forwarding data to/from ports 5000 and 6000 in the pod $ kubectl port-forward mypod 5000 6000 -// listens on port 8888 locally, forwarding to 5000 in the pod +# listens on port 8888 locally, forwarding to 5000 in the pod $ kubectl port-forward mypod 8888:5000 -// listens on a random port locally, forwarding to 5000 in the pod +# listens on a random port locally, forwarding to 5000 in the pod $ kubectl port-forward mypod :5000 -// listens on a random port locally, forwarding to 5000 in the pod +# listens on a random port locally, forwarding to 5000 in the pod $ kubectl port-forward mypod 0:5000` ) diff --git a/pkg/kubectl/cmd/proxy.go b/pkg/kubectl/cmd/proxy.go index 55716f32afb67..5ab96b185ee40 100644 --- a/pkg/kubectl/cmd/proxy.go +++ b/pkg/kubectl/cmd/proxy.go @@ -31,15 +31,15 @@ import ( const ( default_port = 8001 - proxy_example = `// Run a proxy to kubernetes apiserver on port 8011, serving static content from ./local/www/ + proxy_example = `# Run a proxy to kubernetes apiserver on port 8011, serving static content from ./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. +# 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 -// 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/ +# 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` ) diff --git a/pkg/kubectl/cmd/replace.go b/pkg/kubectl/cmd/replace.go index c43782f893f35..39fe4d9658291 100644 --- a/pkg/kubectl/cmd/replace.go +++ b/pkg/kubectl/cmd/replace.go @@ -39,16 +39,16 @@ complete resource spec must be provided. This can be obtained by $ kubectl get TYPE NAME -o yaml Please refer to the models in https://htmlpreview.github.io/?https://github.com/GoogleCloudPlatform/kubernetes/HEAD/docs/api-reference/definitions.html to find if a field is mutable.` - replace_example = `// Replace a pod using the data in pod.json. + replace_example = `# Replace a pod using the data in pod.json. $ kubectl replace -f ./pod.json -// Replace a pod based on the JSON passed into stdin. +# Replace a pod based on the JSON passed into stdin. $ cat pod.json | kubectl replace -f - -// Update a single-container pod's image version (tag) to v4 +# 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 - -// Force replace, delete and then re-create the resource +# Force replace, delete and then re-create the resource kubectl replace --force -f ./pod.json` ) diff --git a/pkg/kubectl/cmd/rollingupdate.go b/pkg/kubectl/cmd/rollingupdate.go index e80e4b17d6dfa..8f2b4087fa360 100644 --- a/pkg/kubectl/cmd/rollingupdate.go +++ b/pkg/kubectl/cmd/rollingupdate.go @@ -40,17 +40,17 @@ const ( Replaces the specified replication controller with a new replication controller by updating one pod at a time to use the 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. + 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 -// Update pods of frontend-v1 using JSON data passed into stdin. +# Update pods of frontend-v1 using JSON data passed into stdin. $ 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. +# 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 -// Update the pods of frontend by just changing the image, and keeping the old name +# Update the pods of frontend by just changing the image, and keeping the old name $ kubectl rolling-update frontend --image=image:v2 ` ) diff --git a/pkg/kubectl/cmd/run.go b/pkg/kubectl/cmd/run.go index 8ae1a62c03018..bf8336a4092fe 100644 --- a/pkg/kubectl/cmd/run.go +++ b/pkg/kubectl/cmd/run.go @@ -34,16 +34,16 @@ import ( const ( run_long = `Create and run a particular image, possibly replicated. Creates a replication controller to manage the created container(s).` - run_example = `// Starts a single instance of nginx. + run_example = `# Starts a single instance of nginx. $ kubectl run nginx --image=nginx -// Starts a replicated instance of nginx. +# Starts a replicated instance of nginx. $ kubectl run nginx --image=nginx --replicas=5 -// Dry run. Print the corresponding API objects without creating them. +# Dry run. Print the corresponding API objects without creating them. $ kubectl run nginx --image=nginx --dry-run -// Start a single instance of nginx, but overload the spec of the replication controller with a partial set of values parsed from JSON. +# Start a single instance of nginx, but overload the spec of the replication controller with a partial set of values parsed from JSON. $ kubectl run nginx --image=nginx --overrides='{ "apiVersion": "v1", "spec": { ... } }'` ) diff --git a/pkg/kubectl/cmd/scale.go b/pkg/kubectl/cmd/scale.go index 5f89612cb5b56..7fe0f5a6349d0 100644 --- a/pkg/kubectl/cmd/scale.go +++ b/pkg/kubectl/cmd/scale.go @@ -36,13 +36,13 @@ Scale also allows users to specify one or more preconditions for the scale actio If --current-replicas or --resource-version is specified, it is validated before the 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. + scale_example = `# Scale replication controller named 'foo' to 3. $ kubectl scale --replicas=3 replicationcontrollers foo -// If the replication controller named foo's current size is 2, scale foo to 3. +# If the replication controller named foo's current size is 2, scale foo to 3. $ kubectl scale --current-replicas=2 --replicas=3 replicationcontrollers foo -// Scale multiple replication controllers. +# Scale multiple replication controllers. $ kubectl scale --replicas=5 rc/foo rc/bar` ) diff --git a/pkg/kubectl/cmd/stop.go b/pkg/kubectl/cmd/stop.go index 23ccc004a5b31..f666ab918270b 100644 --- a/pkg/kubectl/cmd/stop.go +++ b/pkg/kubectl/cmd/stop.go @@ -33,16 +33,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. + stop_example = `# Shut down foo. $ kubectl stop replicationcontroller foo -// Stop pods and services with label name=myLabel. +# Stop pods and services with label name=myLabel. $ kubectl stop pods,services -l name=myLabel -// Shut down the service defined in service.json +# Shut down the service defined in service.json $ kubectl stop -f service.json -// Shut down all resources in the path/to/resources directory +# Shut down all resources in the path/to/resources directory $ kubectl stop -f path/to/resources` )