Merged master; fixed merge conflict.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
assignees:
|
||||
- erictune
|
||||
- janetkuo
|
||||
- satnam6502
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
---
|
||||
---
|
||||
---
|
||||
assignees:
|
||||
- lavalamp
|
||||
- mikedanese
|
||||
|
||||
* TOC
|
||||
---
|
||||
|
||||
* TOC
|
||||
{:toc}
|
||||
|
||||
## Accessing the cluster API
|
||||
@@ -18,10 +22,10 @@ or someone else setup the cluster and provided you with credentials and a locati
|
||||
|
||||
Check the location and credentials that kubectl knows about with this command:
|
||||
|
||||
```shell
|
||||
```shell
|
||||
$ kubectl config view
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
Many of the [examples](https://github.com/kubernetes/kubernetes/tree/{{page.githubbranch}}/examples/) provide an introduction to using
|
||||
kubectl and complete documentation is found in the [kubectl manual](/docs/user-guide/kubectl/kubectl).
|
||||
|
||||
@@ -29,7 +33,7 @@ kubectl and complete documentation is found in the [kubectl manual](/docs/user-g
|
||||
|
||||
Kubectl handles locating and authenticating to the apiserver.
|
||||
If you want to directly access the REST API with an http client like
|
||||
curl or wget, or a browser, there are several ways to locate and authenticate:
|
||||
curl or wget, or a browser, there are several ways to locate and authenticate:
|
||||
|
||||
- Run kubectl in proxy mode.
|
||||
- Recommended approach.
|
||||
@@ -48,29 +52,29 @@ The following command runs kubectl in a mode where it acts as a reverse proxy.
|
||||
locating the apiserver and authenticating.
|
||||
Run it like this:
|
||||
|
||||
```shell
|
||||
```shell
|
||||
$ kubectl proxy --port=8080 &
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
See [kubectl proxy](/docs/user-guide/kubectl/kubectl_proxy) for more details.
|
||||
|
||||
Then you can explore the API with curl, wget, or a browser, like so:
|
||||
|
||||
```shell
|
||||
```shell
|
||||
$ curl http://localhost:8080/api/
|
||||
{
|
||||
"versions": [
|
||||
"v1"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
#### Without kubectl proxy
|
||||
|
||||
It is also possible to avoid using kubectl proxy by passing an authentication token
|
||||
directly to the apiserver, like this:
|
||||
|
||||
```shell
|
||||
```shell
|
||||
$ APISERVER=$(kubectl config view | grep server | cut -f 2- -d ":" | tr -d " ")
|
||||
$ TOKEN=$(kubectl config view | grep token | cut -f 2 -d ":" | tr -d " ")
|
||||
$ curl $APISERVER/api --header "Authorization: Bearer $TOKEN" --insecure
|
||||
@@ -79,8 +83,8 @@ $ curl $APISERVER/api --header "Authorization: Bearer $TOKEN" --insecure
|
||||
"v1"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
The above example uses the `--insecure` flag. This leaves it subject to MITM
|
||||
attacks. When kubectl accesses the cluster it uses a stored root certificate
|
||||
and client certificates to access the server. (These are installed in the
|
||||
@@ -119,14 +123,14 @@ is associated with a service account, and a credential (token) for that
|
||||
service account is placed into the filesystem tree of each container in that pod,
|
||||
at `/var/run/secrets/kubernetes.io/serviceaccount/token`.
|
||||
|
||||
If available, a certificate bundle is placed into the filesystem tree of each
|
||||
container at `/var/run/secrets/kubernetes.io/serviceaccount/ca.crt`, and should be
|
||||
used to verify the serving certificate of the apiserver.
|
||||
|
||||
Finally, the default namespace to be used for namespaced API operations is placed in a file
|
||||
at `/var/run/secrets/kubernetes.io/serviceaccount/namespace` in each container.
|
||||
|
||||
From within a pod the recommended ways to connect to API are:
|
||||
If available, a certificate bundle is placed into the filesystem tree of each
|
||||
container at `/var/run/secrets/kubernetes.io/serviceaccount/ca.crt`, and should be
|
||||
used to verify the serving certificate of the apiserver.
|
||||
|
||||
Finally, the default namespace to be used for namespaced API operations is placed in a file
|
||||
at `/var/run/secrets/kubernetes.io/serviceaccount/namespace` in each container.
|
||||
|
||||
From within a pod the recommended ways to connect to API are:
|
||||
|
||||
- run a kubectl proxy as one of the containers in the pod, or as a background
|
||||
process within a container. This proxies the
|
||||
@@ -134,7 +138,7 @@ From within a pod the recommended ways to connect to API are:
|
||||
in any container of the pod can access it. See this [example of using kubectl proxy
|
||||
in a pod](https://github.com/kubernetes/kubernetes/tree/{{page.githubbranch}}/examples/kubectl-container/).
|
||||
- use the Go client library, and create a client using the `client.NewInCluster()` factory.
|
||||
This handles locating and authenticating to the apiserver.
|
||||
This handles locating and authenticating to the apiserver.
|
||||
|
||||
In each case, the credentials of the pod are used to communicate securely with the apiserver.
|
||||
|
||||
@@ -150,7 +154,7 @@ such as your desktop machine.
|
||||
|
||||
### Ways to connect
|
||||
|
||||
You have several options for connecting to nodes, pods and services from outside the cluster:
|
||||
You have several options for connecting to nodes, pods and services from outside the cluster:
|
||||
|
||||
- Access services through public IPs.
|
||||
- Use a service with type `NodePort` or `LoadBalancer` to make the service reachable outside
|
||||
@@ -182,7 +186,7 @@ You have several options for connecting to nodes, pods and services from outside
|
||||
Typically, there are several services which are started on a cluster by kube-system. Get a list of these
|
||||
with the `kubectl cluster-info` command:
|
||||
|
||||
```shell
|
||||
```shell
|
||||
$ kubectl cluster-info
|
||||
|
||||
Kubernetes master is running at https://104.197.5.247
|
||||
@@ -191,8 +195,8 @@ $ kubectl cluster-info
|
||||
kube-dns is running at https://104.197.5.247/api/v1/proxy/namespaces/kube-system/services/kube-dns
|
||||
grafana is running at https://104.197.5.247/api/v1/proxy/namespaces/kube-system/services/monitoring-grafana
|
||||
heapster is running at https://104.197.5.247/api/v1/proxy/namespaces/kube-system/services/monitoring-heapster
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
This shows the proxy-verb URL for accessing each service.
|
||||
For example, this cluster has cluster-level logging enabled (using Elasticsearch), which can be reached
|
||||
at `https://104.197.5.247/api/v1/proxy/namespaces/kube-system/services/elasticsearch-logging/` if suitable credentials are passed, or through a kubectl proxy at, for example:
|
||||
@@ -211,7 +215,7 @@ If you haven't specified a name for your port, you don't have to specify *port_n
|
||||
* To access the Elasticsearch service endpoint `_search?q=user:kimchy`, you would use: `http://104.197.5.247/api/v1/proxy/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy`
|
||||
* To access the Elasticsearch cluster health information `_cluster/health?pretty=true`, you would use: `https://104.197.5.247/api/v1/proxy/namespaces/kube-system/services/elasticsearch-logging/_cluster/health?pretty=true`
|
||||
|
||||
```json
|
||||
```json
|
||||
{
|
||||
"cluster_name" : "kubernetes_logging",
|
||||
"status" : "yellow",
|
||||
@@ -224,11 +228,11 @@ If you haven't specified a name for your port, you don't have to specify *port_n
|
||||
"initializing_shards" : 0,
|
||||
"unassigned_shards" : 5
|
||||
}
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
#### Using web browsers to access services running on the cluster
|
||||
|
||||
You may be able to put an apiserver proxy url into the address bar of a browser. However:
|
||||
You may be able to put an apiserver proxy url into the address bar of a browser. However:
|
||||
|
||||
- Web browsers cannot usually pass tokens, so you may need to use basic (password) auth. Apiserver can be configured to accept basic auth,
|
||||
but your cluster may not be configured to accept basic auth.
|
||||
@@ -241,7 +245,7 @@ The redirect capabilities have been deprecated and removed. Please use a proxy
|
||||
|
||||
## So Many Proxies
|
||||
|
||||
There are several different proxies you may encounter when using Kubernetes:
|
||||
There are several different proxies you may encounter when using Kubernetes:
|
||||
|
||||
1. The [kubectl proxy](#directly-accessing-the-rest-api):
|
||||
- runs on a user's desktop or in a pod
|
||||
@@ -275,4 +279,4 @@ There are several different proxies you may encounter when using Kubernetes:
|
||||
- implementation varies by cloud provider.
|
||||
|
||||
Kubernetes users will typically not need to worry about anything other than the first two types. The cluster admin
|
||||
will typically ensure that the latter types are setup correctly.
|
||||
will typically ensure that the latter types are setup correctly.
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
---
|
||||
assignees:
|
||||
- mikedanese
|
||||
- thockin
|
||||
|
||||
---
|
||||
|
||||
We have [labels](/docs/user-guide/labels) for identifying metadata.
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
---
|
||||
assignees:
|
||||
- mikedanese
|
||||
- thockin
|
||||
|
||||
---
|
||||
|
||||
This guide is to help users debug applications that are deployed into Kubernetes and not behaving correctly.
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
---
|
||||
assignees:
|
||||
- mikedanese
|
||||
- thockin
|
||||
|
||||
---
|
||||
|
||||
* TOC
|
||||
@@ -9,7 +13,7 @@ container needs. When containers have their resource requests specified, the sc
|
||||
able to make better decisions about which nodes to place pods on; and when containers have their
|
||||
limits specified, contention for resources on a node can be handled in a specified manner. For
|
||||
more details about the difference between requests and limits, please refer to
|
||||
[Resource QoS](https://github.com/kubernetes/kubernetes/blob/{{page.githubbranch}}/docs/proposals/resource-qos.md).
|
||||
[Resource QoS](https://github.com/kubernetes/kubernetes/blob/{{page.githubbranch}}/docs/design/resource-qos.md).
|
||||
|
||||
*CPU* and *memory* are each a *resource type*. A resource type has a base unit. CPU is specified
|
||||
in units of cores. Memory is specified in units of bytes.
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
---
|
||||
assignees:
|
||||
- mikedanese
|
||||
|
||||
---
|
||||
|
||||
This document is meant to highlight and consolidate in one place configuration best practices that are introduced throughout the user-guide and getting-started documentation and examples. This is a living document so if you think of something that is not on this list but might be useful to others, please don't hesitate to file an issue or submit a PR.
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
assignees:
|
||||
- dchen1107
|
||||
- pmorie
|
||||
|
||||
@@ -101,3 +101,6 @@ This pod runs a `cat` command to print the value of one of the keys in the volum
|
||||
$ kubectl logs config-volume-test-pod
|
||||
value-1
|
||||
```
|
||||
|
||||
Alternatively you can use [`mount-file-pod.yaml`](mount-file-pod.yaml) file to mount
|
||||
only a file from ConfigMap, preserving original content of /etc directory.
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
---
|
||||
assignees:
|
||||
- eparis
|
||||
- pmorie
|
||||
|
||||
---
|
||||
Many applications require configuration via some combination of config files, command line
|
||||
arguments, and environment variables. These configuration artifacts should be decoupled from image
|
||||
@@ -362,7 +366,7 @@ spec:
|
||||
containers:
|
||||
- name: test-container
|
||||
image: gcr.io/google_containers/busybox
|
||||
command: [ "/bin/sh", "cat /etc/config/special.how" ]
|
||||
command: [ "/bin/sh", "-c", "cat /etc/config/special.how" ]
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
mountPath: /etc/config
|
||||
@@ -390,7 +394,7 @@ spec:
|
||||
containers:
|
||||
- name: test-container
|
||||
image: gcr.io/google_containers/busybox
|
||||
command: [ "/bin/sh", "cat /etc/config/path/to/special-key" ]
|
||||
command: [ "/bin/sh","-c","cat /etc/config/path/to/special-key" ]
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
mountPath: /etc/config
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: config-single-file-volume-pod
|
||||
spec:
|
||||
containers:
|
||||
- name: test-container
|
||||
image: gcr.io/google_containers/busybox
|
||||
command: [ "/bin/sh", "-c", "cat /etc/special-key" ]
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
mountPath: /etc/special-key
|
||||
subPath: path/to/special-key
|
||||
volumes:
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: test-configmap
|
||||
items:
|
||||
- key: data-1
|
||||
path: path/to/special-key
|
||||
restartPolicy: Never
|
||||
@@ -1,4 +1,8 @@
|
||||
---
|
||||
assignees:
|
||||
- caesarxuchao
|
||||
- thockin
|
||||
|
||||
---
|
||||
|
||||
* TOC
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
---
|
||||
assignees:
|
||||
- caesarxuchao
|
||||
- lavalamp
|
||||
- thockin
|
||||
|
||||
---
|
||||
|
||||
* TOC
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
---
|
||||
assignees:
|
||||
- caesarxuchao
|
||||
- mikedanese
|
||||
|
||||
---
|
||||
|
||||
kubectl port-forward forwards connections to a local port to a port on a pod. Its man page is available [here](/docs/user-guide/kubectl/kubectl_port-forward). Compared to [kubectl proxy](/docs/user-guide/accessing-the-cluster/#using-kubectl-proxy), `kubectl port-forward` is more generic as it can forward TCP traffic while `kubectl proxy` can only forward HTTP traffic. This guide demonstrates how to use `kubectl port-forward` to connect to a Redis database, which may be useful for database debugging.
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
---
|
||||
---
|
||||
---
|
||||
assignees:
|
||||
- caesarxuchao
|
||||
- lavalamp
|
||||
|
||||
---
|
||||
|
||||
You have seen the [basics](/docs/user-guide/accessing-the-cluster) about `kubectl proxy` and `apiserver proxy`. This guide shows how to use them together to access a service([kube-ui](/docs/user-guide/ui)) running on the Kubernetes cluster from your workstation.
|
||||
|
||||
@@ -8,11 +12,11 @@ You have seen the [basics](/docs/user-guide/accessing-the-cluster) about `kubect
|
||||
|
||||
kube-ui is deployed as a cluster add-on. To find its apiserver proxy URL,
|
||||
|
||||
```shell
|
||||
```shell
|
||||
$ kubectl cluster-info | grep "KubeUI"
|
||||
KubeUI is running at https://173.255.119.104/api/v1/proxy/namespaces/kube-system/services/kube-ui
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
if this command does not find the URL, try the steps [here](/docs/user-guide/ui/#accessing-the-ui).
|
||||
|
||||
|
||||
@@ -20,9 +24,9 @@ if this command does not find the URL, try the steps [here](/docs/user-guide/ui/
|
||||
|
||||
The above proxy URL is an access to the kube-ui service provided by the apiserver. To access it, you still need to authenticate to the apiserver. `kubectl proxy` can handle the authentication.
|
||||
|
||||
```shell
|
||||
```shell
|
||||
$ kubectl proxy --port=8001
|
||||
Starting to serve on localhost:8001
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
Now you can access the kube-ui service on your local workstation at [http://localhost:8001/api/v1/proxy/namespaces/kube-system/services/kube-ui](http://localhost:8001/api/v1/proxy/namespaces/kube-system/services/kube-ui)
|
||||
@@ -1,4 +1,8 @@
|
||||
---
|
||||
assignees:
|
||||
- mikedanese
|
||||
- thockin
|
||||
|
||||
---
|
||||
|
||||
This document describes the environment for Kubelet managed containers on a Kubernetes node (kNode). In contrast to the Kubernetes cluster API, which provides an API for creating and managing containers, the Kubernetes container environment provides the container access to information about what else is going on in the cluster.
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
---
|
||||
assignees:
|
||||
- mikedanese
|
||||
|
||||
---
|
||||
|
||||
* TOC
|
||||
@@ -48,7 +51,7 @@ Here are examples for these rules in table format
|
||||
|
||||
## Capabilities
|
||||
|
||||
By default, Docker containers are "unprivileged" and cannot, for example, run a Docker daemon inside a Docker container. We can have fine grain control over the capabilities using cap-add and cap-drop.More details [here](https://docs.docker.com/reference/run/#runtime-privilege-linux-capabilities-and-lxc-configuration).
|
||||
By default, Docker containers are "unprivileged" and cannot, for example, run a Docker daemon inside a Docker container. We can have fine grain control over the capabilities using cap-add and cap-drop. More details [here](https://docs.docker.com/engine/reference/run/#/runtime-privilege-and-linux-capabilities).
|
||||
|
||||
The relationship between Docker's capabilities and [Linux capabilities](http://man7.org/linux/man-pages/man7/capabilities.7.html)
|
||||
|
||||
@@ -90,4 +93,4 @@ The relationship between Docker's capabilities and [Linux capabilities](http://m
|
||||
| LEASE | CAP_LEASE |
|
||||
| SETFCAP | CAP_SETFCAP |
|
||||
| WAKE_ALARM | CAP_WAKE_ALARM |
|
||||
| BLOCK_SUSPEND | CAP_BLOCK_SUSPEND |
|
||||
| BLOCK_SUSPEND | CAP_BLOCK_SUSPEND |
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
---
|
||||
assignees:
|
||||
- bprashanth
|
||||
|
||||
---
|
||||
|
||||
* TOC
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
---
|
||||
assignees:
|
||||
- bprashanth
|
||||
- janetkuo
|
||||
- thockin
|
||||
|
||||
---
|
||||
|
||||
An issue that comes up rather frequently for new installations of Kubernetes is
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
---
|
||||
assignees:
|
||||
- bgrant0607
|
||||
- caesarxuchao
|
||||
- thockin
|
||||
|
||||
---
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
---
|
||||
assignees:
|
||||
- bgrant0607
|
||||
- janetkuo
|
||||
|
||||
---
|
||||
|
||||
* TOC
|
||||
@@ -74,6 +78,8 @@ nginx-deployment-2035384211-qqcnn 1/1 Running 0 18s app
|
||||
|
||||
The created Replica Set will ensure that there are three nginx Pods at all times.
|
||||
|
||||
**Note:** You must specify appropriate selector and pod template labels of a Deployment (in this case, `app = nginx`), i.e. don't overlap with other controllers (including Deployments, Replica Sets, Replication Controllers, etc.) Kubernetes won't stop you from doing that, and if you end up with multiple controllers that have overlapping selectors, those controllers will fight with each others and won't behave correctly.
|
||||
|
||||
## The Status of a Deployment
|
||||
|
||||
After creating or updating a Deployment, you would want to confirm whether it succeeded or not. The simplest way to do this is through `kubectl rollout status`.
|
||||
@@ -495,6 +501,10 @@ template is different than `.spec.template` or if the total number of such Pods
|
||||
exceeds `.spec.replicas`. It will bring up new Pods with `.spec.template` if
|
||||
number of Pods are less than the desired number.
|
||||
|
||||
Note that you should not create other pods whose labels match this selector, either directly, via another Deployment or via another controller such as Replica Sets or Replication Controllers. Otherwise, the Deployment will think that those pods were created by it. Kubernetes will not stop you from doing this.
|
||||
|
||||
If you have multiple controllers that have overlapping selectors, the controllers will fight with each others and won't behave correctly.
|
||||
|
||||
### Strategy
|
||||
|
||||
`.spec.strategy` specifies the strategy used to replace old Pods by new ones.
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
---
|
||||
assignees:
|
||||
- bgrant0607
|
||||
- brendandburns
|
||||
- thockin
|
||||
|
||||
---
|
||||
|
||||
In this doc, we introduce the Kubernetes command line for interacting with the api to docker-cli users. The tool, kubectl, is designed to be familiar to docker-cli users but there are a few necessary differences. Each section of this doc highlights a docker subcommand explains the kubectl equivalent.
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
assignees:
|
||||
- bgrant0607
|
||||
- mikedanese
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
---
|
||||
assignees:
|
||||
- bgrant0607
|
||||
- mikedanese
|
||||
|
||||
---
|
||||
|
||||
It is sometimes useful for a container to have information about itself, but we
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
assignees:
|
||||
- mikedanese
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
---
|
||||
assignees:
|
||||
- mikedanese
|
||||
|
||||
---
|
||||
|
||||
This example demonstrates running pods, replication controllers, and
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
assignees:
|
||||
- quinton-hoole
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
---
|
||||
assignees:
|
||||
- bprashanth
|
||||
- quinton-hoole
|
||||
|
||||
---
|
||||
|
||||
This guide explains how to use Kubernetes Federated Services to deploy
|
||||
|
||||
@@ -1,26 +1,30 @@
|
||||
---
|
||||
assignees:
|
||||
- caesarxuchao
|
||||
- mikedanese
|
||||
|
||||
---
|
||||
|
||||
|
||||
* TOC
|
||||
{:toc}
|
||||
|
||||
## WARNING: Garbage Collector is an alpha feature and is disabled by default. Use it at your own risk!
|
||||
|
||||
### What is garbage collector for
|
||||
|
||||
{:toc}
|
||||
|
||||
## WARNING: Garbage Collector is an alpha feature and is disabled by default. Use it at your own risk!
|
||||
|
||||
### What is garbage collector for
|
||||
|
||||
The garbage collector (GC) cascadingly deletes dependent API objects when the owner is deleted. One use case is if two objects have functional dependency, you can specify the dependency in their configuration file when creating them, and if one of them is deleted, the GC will delete the other one automatically. The other use case is if there is logical dependency among API objects, e.g., the pods created by a replicaset depending on the replicaset, Kubernetes will automatically set the dependency (this will be implemented in release 1.4) and the GC will delete the pods when the replicaset is deleted.
|
||||
|
||||
### How does the garbage collector work
|
||||
|
||||
### How does the garbage collector work
|
||||
|
||||
In release 1.3, there is a new `ownerReferences` field in the `metadata` of every Kubernetes API objects. The GC monitors the cluster and checks the `metadata.ownerReferences` field of each object. If none of the owners present in `metadata.ownerReferences` exists in the cluster, the GC will request the API server to delete the object.
|
||||
|
||||
Currently a user needs to manually set the `metadata.ownerReferences`. In release 1.4, controllers will automatically set the field for the objects it controls. For example, when the replicaset controller creates or adopts pods, it will automatically add the replicaset to the `metadata.ownerReferences` fields of the pods.
|
||||
|
||||
### How to request the garbage collector to not delete dependents
|
||||
|
||||
### How to request the garbage collector to not delete dependents
|
||||
|
||||
When deleting an object, you can prevent the GC from deleting that object's dependents by specifying `deleteOptions.orphanDependents=true` in the deletion request. It prevents garbage collection by removing the object from its dependents' metadata.ownerReferences field.
|
||||
|
||||
### How to enable the garbage collector
|
||||
|
||||
|
||||
### How to enable the garbage collector
|
||||
|
||||
The garbage collector is an alpha feature so it is disabled by default. To enable it, you need to start the kube-apiserver and kube-controller-manager with flag `--enable-garbage-collector`.
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
---
|
||||
---
|
||||
---
|
||||
assignees:
|
||||
- caesarxuchao
|
||||
- mikedanese
|
||||
|
||||
---
|
||||
|
||||
Developers can use `kubectl exec` to run commands in a container. This guide demonstrates two use cases.
|
||||
|
||||
@@ -9,28 +13,28 @@ Kubernetes exposes [services](/docs/user-guide/services/#environment-variables)
|
||||
|
||||
We first create a pod and a service,
|
||||
|
||||
```shell
|
||||
```shell
|
||||
$ kubectl create -f examples/guestbook/redis-master-controller.yaml
|
||||
$ kubectl create -f examples/guestbook/redis-master-service.yaml
|
||||
```
|
||||
```
|
||||
wait until the pod is Running and Ready,
|
||||
|
||||
```shell
|
||||
```shell
|
||||
$ kubectl get pod
|
||||
NAME READY REASON RESTARTS AGE
|
||||
redis-master-ft9ex 1/1 Running 0 12s
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
then we can check the environment variables of the pod,
|
||||
|
||||
```shell
|
||||
```shell
|
||||
$ kubectl exec redis-master-ft9ex env
|
||||
...
|
||||
REDIS_MASTER_SERVICE_PORT=6379
|
||||
REDIS_MASTER_SERVICE_HOST=10.0.0.219
|
||||
...
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
We can use these environment variables in applications to find the service.
|
||||
|
||||
|
||||
@@ -39,32 +43,32 @@ We can use these environment variables in applications to find the service.
|
||||
It is convenient to use `kubectl exec` to check if the volumes are mounted as expected.
|
||||
We first create a Pod with a volume mounted at /data/redis,
|
||||
|
||||
```shell
|
||||
```shell
|
||||
kubectl create -f docs/user-guide/walkthrough/pod-redis.yaml
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
wait until the pod is Running and Ready,
|
||||
|
||||
```shell
|
||||
```shell
|
||||
$ kubectl get pods
|
||||
NAME READY REASON RESTARTS AGE
|
||||
storage 1/1 Running 0 1m
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
we then use `kubectl exec` to verify that the volume is mounted at /data/redis,
|
||||
|
||||
```shell
|
||||
```shell
|
||||
$ kubectl exec storage ls /data
|
||||
redis
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
## Using kubectl exec to open a bash terminal in a pod
|
||||
|
||||
After all, open a terminal in a pod is the most direct way to introspect the pod. Assuming the pod/storage is still running, run
|
||||
|
||||
```shell
|
||||
```shell
|
||||
$ kubectl exec -ti storage -- bash
|
||||
root@storage:/data#
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
This gets you a terminal.
|
||||
@@ -0,0 +1,5 @@
|
||||
assignees:
|
||||
- fgrzadkowski
|
||||
- janetkuo
|
||||
- jszczepkowski
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
---
|
||||
assignees:
|
||||
- fgrzadkowski
|
||||
- jszczepkowski
|
||||
|
||||
---
|
||||
|
||||
This document describes the current state of Horizontal Pod Autoscaling in Kubernetes.
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
---
|
||||
assignees:
|
||||
- fgrzadkowski
|
||||
- jszczepkowski
|
||||
- justinsb
|
||||
|
||||
---
|
||||
|
||||
Horizontal Pod Autoscaling automatically scales the number of pods
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
---
|
||||
assignees:
|
||||
- mikedanese
|
||||
- thockin
|
||||
|
||||
---
|
||||
|
||||
All objects in the Kubernetes REST API are unambiguously identified by a Name and a UID.
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
---
|
||||
assignees:
|
||||
- erictune
|
||||
- thockin
|
||||
|
||||
---
|
||||
|
||||
Each container in a pod has its own image. Currently, the only type of image supported is a [Docker Image](https://docs.docker.com/userguide/dockerimages/).
|
||||
@@ -81,6 +85,21 @@ The kubelet will fetch and periodically refresh ECR credentials. It needs the f
|
||||
- `ecr:ListImages`
|
||||
- `ecr:BatchGetImage`
|
||||
|
||||
Requirements:
|
||||
|
||||
- You must be using kubelet version `v1.2.0` or newer. (e.g. run `/usr/bin/kubelet --version=true`).
|
||||
- Your nodes must be in the same region as the registry you are using
|
||||
- ECR must be offered in your region
|
||||
|
||||
Troubleshooting:
|
||||
|
||||
- Verify all requirements above.
|
||||
- Get $REGION (e.g. `us-west-2`) credentials on your workstation. SSH into the host and run Docker manually with those creds. Does it work?
|
||||
- Verify kubelet is running with `--cloud-provider=aws`.
|
||||
- Check kubelet logs (e.g. `journalctl -t kubelet`) for log lines like:
|
||||
- `plugins.go:56] Registering credential provider: aws-ecr-key`
|
||||
- `provider.go:91] Refreshing cache for provider: *aws_credentials.ecrProvider`
|
||||
|
||||
### Configuring Nodes to Authenticate to a Private Repository
|
||||
|
||||
**Note:** if you are running on Google Container Engine (GKE), there will already be a `.dockercfg` on each node
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
---
|
||||
assignees:
|
||||
- davidopp
|
||||
|
||||
---
|
||||
|
||||
* TOC
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
---
|
||||
assignees:
|
||||
- bprashanth
|
||||
|
||||
---
|
||||
|
||||
* TOC
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
---
|
||||
assignees:
|
||||
- janetkuo
|
||||
- thockin
|
||||
|
||||
---
|
||||
|
||||
Once your application is running, you'll inevitably need to debug problems with it.
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
---
|
||||
assignees:
|
||||
- erictune
|
||||
- soltysh
|
||||
|
||||
---
|
||||
|
||||
* TOC
|
||||
@@ -251,9 +255,9 @@ The pattern names are also links to examples and more detailed description.
|
||||
|
||||
| Pattern | Single Job object | Fewer pods than work items? | Use app unmodified? | Works in Kube 1.1? |
|
||||
| -------------------------------------------------------------------- |:-----------------:|:---------------------------:|:-------------------:|:-------------------:|
|
||||
| [Job Template Expansion](/docs/user-guide/job/expansions) | | | ✓ | ✓ |
|
||||
| [Queue with Pod Per Work Item](/docs/user-guide/job/work-queue-1/) | ✓ | | sometimes | ✓ |
|
||||
| [Queue with Variable Pod Count](/docs/user-guide/job/work-queue-2/) | ✓ | ✓ | | ✓ |
|
||||
| [Job Template Expansion](/docs/user-guide/jobs/expansions) | | | ✓ | ✓ |
|
||||
| [Queue with Pod Per Work Item](/docs/user-guide/jobs/work-queue-1/) | ✓ | | sometimes | ✓ |
|
||||
| [Queue with Variable Pod Count](/docs/user-guide/jobs/work-queue-2/) | ✓ | ✓ | | ✓ |
|
||||
| Single Job with Static Work Assignment | ✓ | | ✓ | |
|
||||
|
||||
When you specify completions with `.spec.completions`, each Pod created by the Job controller
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
assignees:
|
||||
- caesarxuchao
|
||||
- erictune
|
||||
- soltysh
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
---
|
||||
|
||||
---
|
||||
|
||||
JSONPath template is composed of JSONPath expressions enclosed by {}.
|
||||
|
||||
+126
-122
@@ -1,5 +1,9 @@
|
||||
---
|
||||
---
|
||||
---
|
||||
assignees:
|
||||
- mikedanese
|
||||
- thockin
|
||||
|
||||
---
|
||||
|
||||
Authentication in kubernetes can differ for different individuals.
|
||||
|
||||
@@ -22,7 +26,7 @@ http://issue.k8s.io/1755
|
||||
|
||||
### Example kubeconfig file
|
||||
|
||||
```yaml
|
||||
```yaml
|
||||
current-context: federal-context
|
||||
apiVersion: v1
|
||||
clusters:
|
||||
@@ -60,104 +64,104 @@ users:
|
||||
user:
|
||||
client-certificate: path/to/my/client/cert
|
||||
client-key: path/to/my/client/key
|
||||
```
|
||||
|
||||
### Breakdown/explanation of components
|
||||
|
||||
#### cluster
|
||||
|
||||
```yaml
|
||||
clusters:
|
||||
- cluster:
|
||||
certificate-authority: path/to/my/cafile
|
||||
server: https://horse.org:4443
|
||||
name: horse-cluster
|
||||
- cluster:
|
||||
insecure-skip-tls-verify: true
|
||||
server: https://pig.org:443
|
||||
name: pig-cluster
|
||||
```
|
||||
|
||||
A `cluster` contains endpoint data for a kubernetes cluster. This includes the fully
|
||||
qualified url for the kubernetes apiserver, as well as the cluster's certificate
|
||||
authority or `insecure-skip-tls-verify: true`, if the cluster's serving
|
||||
certificate is not signed by a system trusted certificate authority.
|
||||
A `cluster` has a name (nickname) which acts as a dictionary key for the cluster
|
||||
within this kubeconfig file. You can add or modify `cluster` entries using
|
||||
[`kubectl config set-cluster`](/docs/user-guide/kubectl/kubectl_config_set-cluster/).
|
||||
|
||||
#### user
|
||||
|
||||
```yaml
|
||||
users:
|
||||
- name: blue-user
|
||||
user:
|
||||
token: blue-token
|
||||
- name: green-user
|
||||
user:
|
||||
client-certificate: path/to/my/client/cert
|
||||
client-key: path/to/my/client/key
|
||||
```
|
||||
|
||||
A `user` defines client credentials for authenticating to a kubernetes cluster. A
|
||||
`user` has a name (nickname) which acts as its key within the list of user entries
|
||||
after kubeconfig is loaded/merged. Available credentials are `client-certificate`,
|
||||
`client-key`, `token`, and `username/password`. `username/password` and `token`
|
||||
are mutually exclusive, but client certs and keys can be combined with them.
|
||||
You can add or modify `user` entries using
|
||||
[`kubectl config set-credentials`](/docs/user-guide/kubectl/kubectl_config_set-credentials).
|
||||
|
||||
#### context
|
||||
|
||||
```yaml
|
||||
contexts:
|
||||
- context:
|
||||
cluster: horse-cluster
|
||||
namespace: chisel-ns
|
||||
user: green-user
|
||||
name: federal-context
|
||||
```
|
||||
|
||||
A `context` defines a named [`cluster`](#cluster),[`user`](#user),[`namespace`](/docs/user-guide/namespaces) tuple
|
||||
which is used to send requests to the specified cluster using the provided authentication info and
|
||||
namespace. Each of the three is optional; it is valid to specify a context with only one of `cluster`,
|
||||
`user`,`namespace`, or to specify none. Unspecified values, or named values that don't have corresponding
|
||||
entries in the loaded kubeconfig (e.g. if the context specified a `pink-user` for the above kubeconfig file)
|
||||
will be replaced with the default. See [Loading and merging rules](#loading-and-merging) below for override/merge behavior.
|
||||
You can add or modify `context` entries with [`kubectl config set-context`](/docs/user-guide/kubectl/kubectl_config_set-context).
|
||||
|
||||
#### current-context
|
||||
|
||||
```yaml
|
||||
current-context: federal-context
|
||||
```
|
||||
|
||||
`current-context` is the nickname or 'key' for the cluster,user,namespace tuple that kubectl
|
||||
will use by default when loading config from this file. You can override any of the values in kubectl
|
||||
from the commandline, by passing `--context=CONTEXT`, `--cluster=CLUSTER`, `--user=USER`, and/or `--namespace=NAMESPACE` respectively.
|
||||
You can change the `current-context` with [`kubectl config use-context`](/docs/user-guide/kubectl/kubectl_config_use-context).
|
||||
|
||||
#### miscellaneous
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
kind: Config
|
||||
preferences:
|
||||
colors: true
|
||||
```
|
||||
|
||||
`apiVersion` and `kind` identify the version and schema for the client parser and should not
|
||||
be edited manually.
|
||||
|
||||
`preferences` specify optional (and currently unused) kubectl preferences.
|
||||
|
||||
## Viewing kubeconfig files
|
||||
|
||||
`kubectl config view` will display the current kubeconfig settings. By default
|
||||
it will show you all loaded kubeconfig settings; you can filter the view to just
|
||||
the settings relevant to the `current-context` by passing `--minify`. See
|
||||
[`kubectl config view`](/docs/user-guide/kubectl/kubectl_config_view) for other options.
|
||||
|
||||
```
|
||||
|
||||
### Breakdown/explanation of components
|
||||
|
||||
#### cluster
|
||||
|
||||
```yaml
|
||||
clusters:
|
||||
- cluster:
|
||||
certificate-authority: path/to/my/cafile
|
||||
server: https://horse.org:4443
|
||||
name: horse-cluster
|
||||
- cluster:
|
||||
insecure-skip-tls-verify: true
|
||||
server: https://pig.org:443
|
||||
name: pig-cluster
|
||||
```
|
||||
|
||||
A `cluster` contains endpoint data for a kubernetes cluster. This includes the fully
|
||||
qualified url for the kubernetes apiserver, as well as the cluster's certificate
|
||||
authority or `insecure-skip-tls-verify: true`, if the cluster's serving
|
||||
certificate is not signed by a system trusted certificate authority.
|
||||
A `cluster` has a name (nickname) which acts as a dictionary key for the cluster
|
||||
within this kubeconfig file. You can add or modify `cluster` entries using
|
||||
[`kubectl config set-cluster`](/docs/user-guide/kubectl/kubectl_config_set-cluster/).
|
||||
|
||||
#### user
|
||||
|
||||
```yaml
|
||||
users:
|
||||
- name: blue-user
|
||||
user:
|
||||
token: blue-token
|
||||
- name: green-user
|
||||
user:
|
||||
client-certificate: path/to/my/client/cert
|
||||
client-key: path/to/my/client/key
|
||||
```
|
||||
|
||||
A `user` defines client credentials for authenticating to a kubernetes cluster. A
|
||||
`user` has a name (nickname) which acts as its key within the list of user entries
|
||||
after kubeconfig is loaded/merged. Available credentials are `client-certificate`,
|
||||
`client-key`, `token`, and `username/password`. `username/password` and `token`
|
||||
are mutually exclusive, but client certs and keys can be combined with them.
|
||||
You can add or modify `user` entries using
|
||||
[`kubectl config set-credentials`](/docs/user-guide/kubectl/kubectl_config_set-credentials).
|
||||
|
||||
#### context
|
||||
|
||||
```yaml
|
||||
contexts:
|
||||
- context:
|
||||
cluster: horse-cluster
|
||||
namespace: chisel-ns
|
||||
user: green-user
|
||||
name: federal-context
|
||||
```
|
||||
|
||||
A `context` defines a named [`cluster`](#cluster),[`user`](#user),[`namespace`](/docs/user-guide/namespaces) tuple
|
||||
which is used to send requests to the specified cluster using the provided authentication info and
|
||||
namespace. Each of the three is optional; it is valid to specify a context with only one of `cluster`,
|
||||
`user`,`namespace`, or to specify none. Unspecified values, or named values that don't have corresponding
|
||||
entries in the loaded kubeconfig (e.g. if the context specified a `pink-user` for the above kubeconfig file)
|
||||
will be replaced with the default. See [Loading and merging rules](#loading-and-merging) below for override/merge behavior.
|
||||
You can add or modify `context` entries with [`kubectl config set-context`](/docs/user-guide/kubectl/kubectl_config_set-context).
|
||||
|
||||
#### current-context
|
||||
|
||||
```yaml
|
||||
current-context: federal-context
|
||||
```
|
||||
|
||||
`current-context` is the nickname or 'key' for the cluster,user,namespace tuple that kubectl
|
||||
will use by default when loading config from this file. You can override any of the values in kubectl
|
||||
from the commandline, by passing `--context=CONTEXT`, `--cluster=CLUSTER`, `--user=USER`, and/or `--namespace=NAMESPACE` respectively.
|
||||
You can change the `current-context` with [`kubectl config use-context`](/docs/user-guide/kubectl/kubectl_config_use-context).
|
||||
|
||||
#### miscellaneous
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
kind: Config
|
||||
preferences:
|
||||
colors: true
|
||||
```
|
||||
|
||||
`apiVersion` and `kind` identify the version and schema for the client parser and should not
|
||||
be edited manually.
|
||||
|
||||
`preferences` specify optional (and currently unused) kubectl preferences.
|
||||
|
||||
## Viewing kubeconfig files
|
||||
|
||||
`kubectl config view` will display the current kubeconfig settings. By default
|
||||
it will show you all loaded kubeconfig settings; you can filter the view to just
|
||||
the settings relevant to the `current-context` by passing `--minify`. See
|
||||
[`kubectl config view`](/docs/user-guide/kubectl/kubectl_config_view) for other options.
|
||||
|
||||
## Building your own kubeconfig file
|
||||
|
||||
NOTE, that if you are deploying k8s via kube-up.sh, you do not need to create your own kubeconfig files, the script will do it for you.
|
||||
@@ -168,11 +172,11 @@ So, lets do a quick walk through the basics of the above file so you can easily
|
||||
|
||||
The above file would likely correspond to an api-server which was launched using the `--token-auth-file=tokens.csv` option, where the tokens.csv file looked something like this:
|
||||
|
||||
```conf
|
||||
```conf
|
||||
blue-user,blue-user,1
|
||||
mister-red,mister-red,2
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
Also, since we have other users who validate using **other** mechanisms, the api-server would have probably been launched with other authentication options (there are many such options, make sure you understand which ones YOU care about before crafting a kubeconfig file, as nobody needs to implement all the different permutations of possible authentication schemes).
|
||||
|
||||
- Since the user for the current context is "green-user", any client of the api-server using this kubeconfig file would naturally be able to log in successfully, because we are providing the green-user's client credentials.
|
||||
@@ -182,7 +186,7 @@ In the above scenario, green-user would have to log in by providing certificates
|
||||
|
||||
## Loading and merging rules
|
||||
|
||||
The rules for loading and merging the kubeconfig files are straightforward, but there are a lot of them. The final config is built in this order:
|
||||
The rules for loading and merging the kubeconfig files are straightforward, but there are a lot of them. The final config is built in this order:
|
||||
|
||||
1. Get the kubeconfig from disk. This is done with the following hierarchy and merge rules:
|
||||
|
||||
@@ -215,12 +219,12 @@ The rules for loading and merging the kubeconfig files are straightforward, but
|
||||
1. The command line flags are: `client-certificate`, `client-key`, `username`, `password`, and `token`.
|
||||
1. If there are two conflicting techniques, fail.
|
||||
1. For any information still missing, use default values and potentially prompt for authentication information
|
||||
1. All file references inside of a kubeconfig file are resolved relative to the location of the kubeconfig file itself. When file references are presented on the command line
|
||||
they are resolved relative to the current working directory. When paths are saved in the ~/.kube/config, relative paths are stored relatively while absolute paths are stored absolutely.
|
||||
1. All file references inside of a kubeconfig file are resolved relative to the location of the kubeconfig file itself. When file references are presented on the command line
|
||||
they are resolved relative to the current working directory. When paths are saved in the ~/.kube/config, relative paths are stored relatively while absolute paths are stored absolutely.
|
||||
|
||||
Any path in a kubeconfig file is resolved relative to the location of the kubeconfig file itself.
|
||||
|
||||
|
||||
Any path in a kubeconfig file is resolved relative to the location of the kubeconfig file itself.
|
||||
|
||||
|
||||
## Manipulation of kubeconfig via `kubectl config <subcommand>`
|
||||
|
||||
In order to more easily manipulate kubeconfig files, there are a series of subcommands to `kubectl config` to help.
|
||||
@@ -228,18 +232,18 @@ See [kubectl/kubectl_config.md](/docs/user-guide/kubectl/kubectl_config) for hel
|
||||
|
||||
### Example
|
||||
|
||||
```shell
|
||||
```shell
|
||||
$ kubectl config set-credentials myself --username=admin --password=secret
|
||||
$ kubectl config set-cluster local-server --server=http://localhost:8080
|
||||
$ kubectl config set-context default-context --cluster=local-server --user=myself
|
||||
$ kubectl config use-context default-context
|
||||
$ kubectl config set contexts.default-context.namespace the-right-prefix
|
||||
$ kubectl config view
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
produces this output
|
||||
|
||||
```yaml
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
clusters:
|
||||
- cluster:
|
||||
@@ -259,11 +263,11 @@ users:
|
||||
user:
|
||||
password: secret
|
||||
username: admin
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
and a kubeconfig file that looks like this
|
||||
|
||||
```yaml
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
clusters:
|
||||
- cluster:
|
||||
@@ -283,11 +287,11 @@ users:
|
||||
user:
|
||||
password: secret
|
||||
username: admin
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
#### Commands for the example file
|
||||
|
||||
```shell
|
||||
```shell
|
||||
$ kubectl config set preferences.colors true
|
||||
$ kubectl config set-cluster cow-cluster --server=http://cow.org:8080 --api-version=v1
|
||||
$ kubectl config set-cluster horse-cluster --server=https://horse.org:4443 --certificate-authority=path/to/my/cafile
|
||||
@@ -297,8 +301,8 @@ $ kubectl config set-credentials green-user --client-certificate=path/to/my/clie
|
||||
$ kubectl config set-context queen-anne-context --cluster=pig-cluster --user=black-user --namespace=saw-ns
|
||||
$ kubectl config set-context federal-context --cluster=horse-cluster --user=green-user --namespace=chisel-ns
|
||||
$ kubectl config use-context federal-context
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
### Final notes for tying it all together
|
||||
|
||||
So, tying this all together, a quick start to creating your own kubeconfig file:
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
---
|
||||
assignees:
|
||||
- bgrant0607
|
||||
- erictune
|
||||
- krousey
|
||||
|
||||
---
|
||||
An assortment of compact kubectl examples
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
---
|
||||
assignees:
|
||||
- bgrant0607
|
||||
- janetkuo
|
||||
|
||||
---
|
||||
|
||||
* TOC
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
---
|
||||
assignees:
|
||||
- bgrant0607
|
||||
- hw-qiaolei
|
||||
|
||||
---
|
||||
|
||||
Use this overview of the `kubectl` command line interface to help you start running commands against Kubernetes clusters. This overview quickly covers `kubectl` syntax, describes the command operations, and provides common examples. For details about each command, including all the supported flags and subcommands, see the [kubectl](/docs/user-guide/kubectl/kubectl) reference documentation.
|
||||
|
||||
@@ -20,6 +20,7 @@ kubectl
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -45,37 +46,47 @@ kubectl
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl annotate](/docs/user-guide/kubectl/kubectl_annotate/) - Update the annotations on a resource
|
||||
* [kubectl api-versions](/docs/user-guide/kubectl/kubectl_api-versions/) - Print the supported API versions on the server, in the form of "group/version".
|
||||
* [kubectl apply](/docs/user-guide/kubectl/kubectl_apply/) - Apply a configuration to a resource by filename or stdin
|
||||
* [kubectl attach](/docs/user-guide/kubectl/kubectl_attach/) - Attach to a running container.
|
||||
* [kubectl autoscale](/docs/user-guide/kubectl/kubectl_autoscale/) - Auto-scale a deployment or replication controller
|
||||
* [kubectl cluster-info](/docs/user-guide/kubectl/kubectl_cluster-info/) - Display cluster info
|
||||
* [kubectl config](/docs/user-guide/kubectl/kubectl_config/) - config modifies kubeconfig files
|
||||
* [kubectl convert](/docs/user-guide/kubectl/kubectl_convert/) - Convert config files between different API versions
|
||||
* [kubectl cordon](/docs/user-guide/kubectl/kubectl_cordon/) - Mark node as unschedulable
|
||||
* [kubectl create](/docs/user-guide/kubectl/kubectl_create/) - Create a resource by filename or stdin
|
||||
* [kubectl delete](/docs/user-guide/kubectl/kubectl_delete/) - Delete resources by filenames, stdin, resources and names, or by resources and label selector.
|
||||
* [kubectl describe](/docs/user-guide/kubectl/kubectl_describe/) - Show details of a specific resource or group of resources
|
||||
* [kubectl drain](/docs/user-guide/kubectl/kubectl_drain/) - Drain node in preparation for maintenance
|
||||
* [kubectl edit](/docs/user-guide/kubectl/kubectl_edit/) - Edit a resource on the server
|
||||
* [kubectl exec](/docs/user-guide/kubectl/kubectl_exec/) - Execute a command in a container.
|
||||
* [kubectl explain](/docs/user-guide/kubectl/kubectl_explain/) - Documentation of resources.
|
||||
* [kubectl expose](/docs/user-guide/kubectl/kubectl_expose/) - Take a replication controller, service or pod and expose it as a new Kubernetes Service
|
||||
* [kubectl get](/docs/user-guide/kubectl/kubectl_get/) - Display one or many resources
|
||||
* [kubectl label](/docs/user-guide/kubectl/kubectl_label/) - Update the labels on a resource
|
||||
* [kubectl logs](/docs/user-guide/kubectl/kubectl_logs/) - Print the logs for a container in a pod.
|
||||
* [kubectl namespace](/docs/user-guide/kubectl/kubectl_namespace/) - SUPERSEDED: Set and view the current Kubernetes namespace
|
||||
* [kubectl patch](/docs/user-guide/kubectl/kubectl_patch/) - Update field(s) of a resource using strategic merge patch.
|
||||
* [kubectl port-forward](/docs/user-guide/kubectl/kubectl_port-forward/) - Forward one or more local ports to a pod.
|
||||
* [kubectl proxy](/docs/user-guide/kubectl/kubectl_proxy/) - Run a proxy to the Kubernetes API server
|
||||
* [kubectl replace](/docs/user-guide/kubectl/kubectl_replace/) - Replace a resource by filename or stdin.
|
||||
* [kubectl rolling-update](/docs/user-guide/kubectl/kubectl_rolling-update/) - Perform a rolling update of the given ReplicationController.
|
||||
* [kubectl rollout](/docs/user-guide/kubectl/kubectl_rollout/) - rollout manages a deployment
|
||||
* [kubectl run](/docs/user-guide/kubectl/kubectl_run/) - Run a particular image on the cluster.
|
||||
* [kubectl scale](/docs/user-guide/kubectl/kubectl_scale/) - Set a new size for a Replication Controller, Job, or Deployment.
|
||||
* [kubectl uncordon](/docs/user-guide/kubectl/kubectl_uncordon/) - Mark node as schedulable
|
||||
* [kubectl version](/docs/user-guide/kubectl/kubectl_version/) - Print the client and server version information.
|
||||
* [kubectl annotate](../kubectl_annotate/) - Update the annotations on a resource
|
||||
* [kubectl api-versions](../kubectl_api-versions/) - Print the supported API versions on the server, in the form of "group/version".
|
||||
* [kubectl apply](../kubectl_apply/) - Apply a configuration to a resource by filename or stdin
|
||||
* [kubectl attach](../kubectl_attach/) - Attach to a running container.
|
||||
* [kubectl autoscale](../kubectl_autoscale/) - Auto-scale a Deployment, ReplicaSet, or ReplicationController
|
||||
* [kubectl cluster-info](../kubectl_cluster-info/) - Display cluster info
|
||||
* [kubectl completion](../kubectl_completion/) - Output shell completion code for the given shell (bash or zsh)
|
||||
* [kubectl config](../kubectl_config/) - config modifies kubeconfig files
|
||||
* [kubectl convert](../kubectl_convert/) - Convert config files between different API versions
|
||||
* [kubectl cordon](../kubectl_cordon/) - Mark node as unschedulable
|
||||
* [kubectl create](../kubectl_create/) - Create a resource by filename or stdin
|
||||
* [kubectl delete](../kubectl_delete/) - Delete resources by filenames, stdin, resources and names, or by resources and label selector.
|
||||
* [kubectl describe](../kubectl_describe/) - Show details of a specific resource or group of resources
|
||||
* [kubectl drain](../kubectl_drain/) - Drain node in preparation for maintenance
|
||||
* [kubectl edit](../kubectl_edit/) - Edit a resource on the server
|
||||
* [kubectl exec](../kubectl_exec/) - Execute a command in a container.
|
||||
* [kubectl explain](../kubectl_explain/) - Documentation of resources.
|
||||
* [kubectl expose](../kubectl_expose/) - Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service
|
||||
* [kubectl get](../kubectl_get/) - Display one or many resources
|
||||
* [kubectl label](../kubectl_label/) - Update the labels on a resource
|
||||
* [kubectl logs](../kubectl_logs/) - Print the logs for a container in a pod.
|
||||
* [kubectl namespace](../kubectl_namespace/) - SUPERSEDED: Set and view the current Kubernetes namespace
|
||||
* [kubectl patch](../kubectl_patch/) - Update field(s) of a resource using strategic merge patch.
|
||||
* [kubectl port-forward](../kubectl_port-forward/) - Forward one or more local ports to a pod.
|
||||
* [kubectl proxy](../kubectl_proxy/) - Run a proxy to the Kubernetes API server
|
||||
* [kubectl replace](../kubectl_replace/) - Replace a resource by filename or stdin.
|
||||
* [kubectl rolling-update](../kubectl_rolling-update/) - Perform a rolling update of the given ReplicationController.
|
||||
* [kubectl rollout](../kubectl_rollout/) - rollout manages a deployment
|
||||
* [kubectl run](../kubectl_run/) - Run a particular image on the cluster.
|
||||
* [kubectl scale](../kubectl_scale/) - Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job.
|
||||
* [kubectl set](../kubectl_set/) - Set specific features on objects
|
||||
* [kubectl taint](../kubectl_taint/) - Update the taints on one or more nodes
|
||||
* [kubectl uncordon](../kubectl_uncordon/) - Mark node as schedulable
|
||||
* [kubectl version](../kubectl_version/) - Print the client and server version information.
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -15,10 +15,12 @@ It is intended to store non-identifying auxiliary data, especially data manipula
|
||||
If --overwrite is true, then existing annotations can be overwritten, otherwise attempting to overwrite an annotation 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.
|
||||
|
||||
Possible resources include (case insensitive): pods (po), services (svc),
|
||||
replicationcontrollers (rc), nodes (no), events (ev), componentstatuses (cs),
|
||||
limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc),
|
||||
horizontalpodautoscalers (hpa), resourcequotas (quota) or secrets.
|
||||
Possible resources include (case insensitive):
|
||||
pod (po), service (svc), replicationcontroller (rc),
|
||||
node (no), event (ev), componentstatuse (cs),
|
||||
limitrange (limits), persistentvolume (pv), persistentvolumeclaim (pvc),
|
||||
horizontalpodautoscaler (hpa), resourcequota (quota), secret
|
||||
|
||||
|
||||
```
|
||||
kubectl annotate [--overwrite] (-f FILENAME | TYPE NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--resource-version=version]
|
||||
@@ -53,11 +55,13 @@ kubectl annotate pods foo description-
|
||||
```
|
||||
--all[=false]: select all resources in the namespace of the specified resource types
|
||||
-f, --filename=[]: Filename, directory, or URL to a file identifying the resource to update the annotation
|
||||
--include-extended-apis[=true]: If true, include definitions of new APIs via calls to the API server. [default true]
|
||||
--no-headers[=false]: When using the default output, don't print headers.
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.2/docs/user-guide/jsonpath.md].
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.3/docs/user-guide/jsonpath.md].
|
||||
--output-version="": Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
|
||||
--overwrite[=false]: If true, allow annotations to be overwritten, otherwise reject annotation updates that overwrite existing annotations.
|
||||
--record[=false]: Record current kubectl command in the resource annotation.
|
||||
-R, --recursive[=false]: Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
|
||||
--resource-version="": If non-empty, the annotation update will only succeed if this is the current resource-version for the object. Only valid when specifying a single resource.
|
||||
-l, --selector="": Selector (label query) to filter on
|
||||
-a, --show-all[=false]: When printing, show all resources (default hide terminated pods.)
|
||||
@@ -70,6 +74,7 @@ kubectl annotate pods foo description-
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -95,6 +100,14 @@ kubectl annotate pods foo description-
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 11-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
---
|
||||
|
||||
## kubectl api-versions
|
||||
|
||||
Print the supported API versions on the server, in the form of "group/version".
|
||||
@@ -17,6 +18,7 @@ kubectl api-versions
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -42,6 +44,14 @@ kubectl api-versions
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -10,6 +10,7 @@ Apply a configuration to a resource by filename or stdin
|
||||
|
||||
Apply a configuration to a resource by filename or stdin.
|
||||
The resource will be created if it doesn't exist yet.
|
||||
To use 'apply', always create the resource initially with either 'apply' or 'create --save-config'.
|
||||
|
||||
JSON and YAML formats are accepted.
|
||||
|
||||
@@ -31,8 +32,10 @@ cat pod.json | kubectl apply -f -
|
||||
|
||||
```
|
||||
-f, --filename=[]: Filename, directory, or URL to file that contains the configuration to apply
|
||||
--include-extended-apis[=true]: If true, include definitions of new APIs via calls to the API server. [default true]
|
||||
-o, --output="": Output mode. Use "-o name" for shorter output (resource/name).
|
||||
--record[=false]: Record current kubectl command in the resource annotation.
|
||||
-R, --recursive[=false]: Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
|
||||
--schema-cache-dir="~/.kube/schema": If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
|
||||
--validate[=true]: If true, use a schema to validate the input before sending it
|
||||
```
|
||||
@@ -41,6 +44,7 @@ cat pod.json | kubectl apply -f -
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -66,6 +70,14 @@ cat pod.json | kubectl apply -f -
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -40,6 +40,7 @@ kubectl attach 123456-7890 -c ruby-container -i -t
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -65,6 +66,14 @@ kubectl attach 123456-7890 -c ruby-container -i -t
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
---
|
||||
---
|
||||
|
||||
## kubectl autoscale
|
||||
|
||||
Auto-scale a deployment or replication controller
|
||||
Auto-scale a Deployment, ReplicaSet, or ReplicationController
|
||||
|
||||
### Synopsis
|
||||
|
||||
|
||||
Creates an autoscaler that automatically chooses and sets the number of pods that run in a kubernetes cluster.
|
||||
|
||||
Looks up a deployment or replication controller by name and creates an autoscaler that uses this deployment or replication controller as a reference.
|
||||
Looks up a Deployment, ReplicaSet, or ReplicationController by name and creates an autoscaler that uses the given resource as a reference.
|
||||
An autoscaler can automatically increase or decrease number of pods deployed within the system as needed.
|
||||
|
||||
```
|
||||
@@ -19,7 +20,7 @@ kubectl autoscale (-f FILENAME | TYPE NAME | TYPE/NAME) [--min=MINPODS] --max=MA
|
||||
### Examples
|
||||
|
||||
```
|
||||
# Auto scale a deployment "foo", with the number of pods between 2 to 10, target CPU utilization at a default value that server applies:
|
||||
# Auto scale a deployment "foo", with the number of pods between 2 to 10, no target CPU utilization specfied so a default autoscaling policy will be used:
|
||||
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%:
|
||||
@@ -29,17 +30,19 @@ kubectl autoscale rc foo --max=5 --cpu-percent=80
|
||||
### Options
|
||||
|
||||
```
|
||||
--cpu-percent=-1: The target average CPU utilization (represented as a percent of requested CPU) over all the pods. If it's not specified or negative, the server will apply a default value.
|
||||
--dry-run[=false]: If true, only print the object that would be sent, without creating it.
|
||||
--cpu-percent=-1: The target average CPU utilization (represented as a percent of requested CPU) over all the pods. If it's not specified or negative, a default autoscaling policy will be used.
|
||||
--dry-run[=false]: If true, only print the object that would be sent, without sending it.
|
||||
-f, --filename=[]: Filename, directory, or URL to a file identifying the resource to autoscale.
|
||||
--generator="horizontalpodautoscaler/v1beta1": The name of the API generator to use. Currently there is only 1 generator.
|
||||
--generator="horizontalpodautoscaler/v1": The name of the API generator to use. Currently there is only 1 generator.
|
||||
--include-extended-apis[=true]: If true, include definitions of new APIs via calls to the API server. [default true]
|
||||
--max=-1: The upper limit for the number of pods that can be set by the autoscaler. Required.
|
||||
--min=-1: The lower limit for the number of pods that can be set by the autoscaler. If it's not specified or negative, the server will apply a default value.
|
||||
--name="": The name for the newly created object. If not specified, the name of the input resource will be used.
|
||||
--no-headers[=false]: When using the default output, don't print headers.
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.2/docs/user-guide/jsonpath.md].
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.3/docs/user-guide/jsonpath.md].
|
||||
--output-version="": Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
|
||||
--record[=false]: Record current kubectl command in the resource annotation.
|
||||
-R, --recursive[=false]: Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
|
||||
--save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
|
||||
-a, --show-all[=false]: When printing, show all resources (default hide terminated pods.)
|
||||
--show-labels[=false]: When printing, show all labels as the last column (default hide labels column)
|
||||
@@ -51,6 +54,7 @@ kubectl autoscale rc foo --max=5 --cpu-percent=80
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -76,6 +80,14 @@ kubectl autoscale rc foo --max=5 --cpu-percent=80
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 11-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
---
|
||||
|
||||
## kubectl cluster-info
|
||||
|
||||
Display cluster info
|
||||
@@ -8,15 +9,23 @@ Display cluster info
|
||||
|
||||
|
||||
Display addresses of the master and services with label kubernetes.io/cluster-service=true
|
||||
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
|
||||
|
||||
```
|
||||
kubectl cluster-info
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
--include-extended-apis[=true]: If true, include definitions of new APIs via calls to the API server. [default true]
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -42,6 +51,15 @@ kubectl cluster-info
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl cluster-info dump](kubectl_cluster-info_dump.md) - Dump lots of relevant info for debugging and diagnosis.
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
---
|
||||
---
|
||||
|
||||
## kubectl cluster-info dump
|
||||
|
||||
Dump lots of relevant info for debugging and diagnosis.
|
||||
|
||||
### Synopsis
|
||||
|
||||
|
||||
|
||||
Dumps cluster info out suitable for debugging and diagnosing cluster problems. By default, dumps everything to
|
||||
stdout. You can optionally specify a directory with --output-directory. If you specify a directory, kubernetes will
|
||||
build a set of files in that directory. By default only dumps things in the 'kube-system' namespace, but you can
|
||||
switch to a different namespace with the --namespaces flag, or specify --all-namespaces to dump all namespaces.
|
||||
|
||||
The command also dumps the logs of all of the pods in the cluster, these logs are dumped into different directories
|
||||
based on namespace and pod name.
|
||||
|
||||
|
||||
```
|
||||
kubectl cluster-info dump
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
```
|
||||
# Dump current cluster state to stdout
|
||||
kubectl cluster-info dump
|
||||
|
||||
# Dump current cluster state to /path/to/cluster-state
|
||||
kubectl cluster-info dump --output-directory=/path/to/cluster-state
|
||||
|
||||
# Dump all namespaces to stdout
|
||||
kubectl cluster-info dump --all-namespaces
|
||||
|
||||
# Dump a set of namespaces to /path/to/cluster-state
|
||||
kubectl cluster-info dump --namespaces default,kube-system --output-directory=/path/to/cluster-state
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
--all-namespaces[=false]: If true, dump all namespaces. If true, --namespaces is ignored.
|
||||
--namespaces=[]: A comma separated list of namespaces to dump.
|
||||
--output-directory="": Where to output the files. If empty or '-' uses stdout, otherwise creates a directory hierarchy in that directory
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
--cluster="": The name of the kubeconfig cluster to use
|
||||
--context="": The name of the kubeconfig context to use
|
||||
--insecure-skip-tls-verify[=false]: If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
|
||||
--kubeconfig="": Path to the kubeconfig file to use for CLI requests.
|
||||
--log-backtrace-at=:0: when logging hits line file:N, emit a stack trace
|
||||
--log-dir="": If non-empty, write log files in this directory
|
||||
--log-flush-frequency=5s: Maximum number of seconds between log flushes
|
||||
--logtostderr[=true]: log to standard error instead of files
|
||||
--match-server-version[=false]: Require server version to match client version
|
||||
--namespace="": If present, the namespace scope for this CLI request.
|
||||
--password="": Password for basic authentication to the API server.
|
||||
-s, --server="": The address and port of the Kubernetes API server
|
||||
--stderrthreshold=2: logs at or above this threshold go to stderr
|
||||
--token="": Bearer token for authentication to the API server.
|
||||
--user="": The name of the kubeconfig user to use
|
||||
--username="": Username for basic authentication to the API server.
|
||||
--v=0: log level for V logs
|
||||
--vmodule=: comma-separated list of pattern=N settings for file-filtered logging
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl cluster-info](kubectl_cluster-info.md) - Display cluster info
|
||||
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
@@ -0,0 +1,80 @@
|
||||
---
|
||||
---
|
||||
|
||||
## kubectl completion
|
||||
|
||||
Output shell completion code for the given shell (bash or zsh)
|
||||
|
||||
### Synopsis
|
||||
|
||||
|
||||
Output shell completion code for the given shell (bash or zsh).
|
||||
|
||||
This command prints shell code which must be evaluation to provide interactive
|
||||
completion of kubectl commands.
|
||||
|
||||
|
||||
```
|
||||
kubectl completion SHELL
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
```
|
||||
|
||||
$ source <(kubectl completion bash)
|
||||
|
||||
will load the kubectl completion code for bash. Note that this depends on the bash-completion
|
||||
framework. It must be sourced before sourcing the kubectl completion, i.e. on the Mac:
|
||||
|
||||
$ brew install bash-completion
|
||||
$ source $(brew --prefix)/etc/bash_completion
|
||||
$ source <(kubectl completion bash)
|
||||
|
||||
If you use zsh, the following will load kubectl zsh completion:
|
||||
|
||||
$ source <(kubectl completion zsh)
|
||||
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
--cluster="": The name of the kubeconfig cluster to use
|
||||
--context="": The name of the kubeconfig context to use
|
||||
--insecure-skip-tls-verify[=false]: If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
|
||||
--kubeconfig="": Path to the kubeconfig file to use for CLI requests.
|
||||
--log-backtrace-at=:0: when logging hits line file:N, emit a stack trace
|
||||
--log-dir="": If non-empty, write log files in this directory
|
||||
--log-flush-frequency=5s: Maximum number of seconds between log flushes
|
||||
--logtostderr[=true]: log to standard error instead of files
|
||||
--match-server-version[=false]: Require server version to match client version
|
||||
--namespace="": If present, the namespace scope for this CLI request.
|
||||
--password="": Password for basic authentication to the API server.
|
||||
-s, --server="": The address and port of the Kubernetes API server
|
||||
--stderrthreshold=2: logs at or above this threshold go to stderr
|
||||
--token="": Bearer token for authentication to the API server.
|
||||
--user="": The name of the kubeconfig user to use
|
||||
--username="": Username for basic authentication to the API server.
|
||||
--v=0: log level for V logs
|
||||
--vmodule=: comma-separated list of pattern=N settings for file-filtered logging
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
@@ -30,6 +30,7 @@ kubectl config SUBCOMMAND
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -54,15 +55,22 @@ kubectl config SUBCOMMAND
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl config current-context](/docs/user-guide/kubectl/kubectl_config_current-context/) - Displays the current-context
|
||||
* [kubectl config set](/docs/user-guide/kubectl/kubectl_config_set/) - Sets an individual value in a kubeconfig file
|
||||
* [kubectl config set-cluster](/docs/user-guide/kubectl/kubectl_config_set-cluster/) - Sets a cluster entry in kubeconfig
|
||||
* [kubectl config set-context](/docs/user-guide/kubectl/kubectl_config_set-context/) - Sets a context entry in kubeconfig
|
||||
* [kubectl config set-credentials](/docs/user-guide/kubectl/kubectl_config_set-credentials/) - Sets a user entry in kubeconfig
|
||||
* [kubectl config unset](/docs/user-guide/kubectl/kubectl_config_unset/) - Unsets an individual value in a kubeconfig file
|
||||
* [kubectl config use-context](/docs/user-guide/kubectl/kubectl_config_use-context/) - Sets the current-context in a kubeconfig file
|
||||
* [kubectl config view](/docs/user-guide/kubectl/kubectl_config_view/)
|
||||
- Displays merged kubeconfig settings or a specified kubeconfig file.
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl config current-context](kubectl_config_current-context.md) - Displays the current-context
|
||||
* [kubectl config set](kubectl_config_set.md) - Sets an individual value in a kubeconfig file
|
||||
* [kubectl config set-cluster](kubectl_config_set-cluster.md) - Sets a cluster entry in kubeconfig
|
||||
* [kubectl config set-context](kubectl_config_set-context.md) - Sets a context entry in kubeconfig
|
||||
* [kubectl config set-credentials](kubectl_config_set-credentials.md) - Sets a user entry in kubeconfig
|
||||
* [kubectl config unset](kubectl_config_unset.md) - Unsets an individual value in a kubeconfig file
|
||||
* [kubectl config use-context](kubectl_config_use-context.md) - Sets the current-context in a kubeconfig file
|
||||
* [kubectl config view](kubectl_config_view.md) - Displays merged kubeconfig settings or a specified kubeconfig file.
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -25,6 +25,7 @@ kubectl config current-context
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -50,6 +51,14 @@ kubectl config current-context
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl config](/docs/user-guide/kubectl/kubectl_config/) - config modifies kubeconfig files
|
||||
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -32,7 +32,7 @@ kubectl config set-cluster e2e --insecure-skip-tls-verify=true
|
||||
|
||||
```
|
||||
--api-version="": api-version for the cluster entry in kubeconfig
|
||||
--certificate-authority="": path to certificate-authority for the cluster entry in kubeconfig
|
||||
--certificate-authority="": path to certificate-authority file for the cluster entry in kubeconfig
|
||||
--embed-certs[=false]: embed-certs for the cluster entry in kubeconfig
|
||||
--insecure-skip-tls-verify[=false]: insecure-skip-tls-verify for the cluster entry in kubeconfig
|
||||
--server="": server for the cluster entry in kubeconfig
|
||||
@@ -42,6 +42,7 @@ kubectl config set-cluster e2e --insecure-skip-tls-verify=true
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
--cluster="": The name of the kubeconfig cluster to use
|
||||
@@ -64,6 +65,14 @@ kubectl config set-cluster e2e --insecure-skip-tls-verify=true
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl config](/docs/user-guide/kubectl/kubectl_config/) - config modifies kubeconfig files
|
||||
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -34,6 +34,7 @@ kubectl config set-context gce --user=cluster-admin
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -56,6 +57,14 @@ kubectl config set-context gce --user=cluster-admin
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl config](/docs/user-guide/kubectl/kubectl_config/) - config modifies kubeconfig files
|
||||
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -44,8 +44,8 @@ kubectl config set-credentials cluster-admin --client-certificate=~/.kube/admin.
|
||||
### Options
|
||||
|
||||
```
|
||||
--client-certificate="": path to client-certificate for the user entry in kubeconfig
|
||||
--client-key="": path to client-key for the user entry in kubeconfig
|
||||
--client-certificate="": path to client-certificate file for the user entry in kubeconfig
|
||||
--client-key="": path to client-key file for the user entry in kubeconfig
|
||||
--embed-certs[=false]: embed client cert/key for the user entry in kubeconfig
|
||||
--password="": password for the user entry in kubeconfig
|
||||
--token="": token for the user entry in kubeconfig
|
||||
@@ -56,6 +56,7 @@ kubectl config set-credentials cluster-admin --client-certificate=~/.kube/admin.
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--cluster="": The name of the kubeconfig cluster to use
|
||||
--context="": The name of the kubeconfig context to use
|
||||
@@ -76,6 +77,14 @@ kubectl config set-credentials cluster-admin --client-certificate=~/.kube/admin.
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl config](/docs/user-guide/kubectl/kubectl_config/) - config modifies kubeconfig files
|
||||
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -10,16 +10,23 @@ Sets an individual value in a kubeconfig file
|
||||
|
||||
Sets an individual value in a kubeconfig file
|
||||
PROPERTY_NAME is a dot delimited name where each token represents either a attribute name or a map key. Map keys may not contain dots.
|
||||
PROPERTY_VALUE is the new value you wish to set.
|
||||
PROPERTY_VALUE is the new value you wish to set. Binary fields such as 'certificate-authority-data' expect a base64 encoded string unless the --set-raw-bytes flag is used.
|
||||
|
||||
```
|
||||
kubectl config set PROPERTY_NAME PROPERTY_VALUE
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
--set-raw-bytes[=false]: When writing a []byte PROPERTY_VALUE, write the given string directly without base64 decoding.
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -45,6 +52,14 @@ kubectl config set PROPERTY_NAME PROPERTY_VALUE
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl config](/docs/user-guide/kubectl/kubectl_config/) - config modifies kubeconfig files
|
||||
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -19,6 +19,7 @@ kubectl config unset PROPERTY_NAME
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -44,6 +45,14 @@ kubectl config unset PROPERTY_NAME
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl config](/docs/user-guide/kubectl/kubectl_config/) - config modifies kubeconfig files
|
||||
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -18,6 +18,7 @@ kubectl config use-context CONTEXT_NAME
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -43,6 +44,14 @@ kubectl config use-context CONTEXT_NAME
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl config](/docs/user-guide/kubectl/kubectl_config/) - config modifies kubeconfig files
|
||||
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
---
|
||||
|
||||
## kubectl config view
|
||||
|
||||
Displays merged kubeconfig settings or a specified kubeconfig file.
|
||||
@@ -32,7 +33,7 @@ kubectl config view -o jsonpath='{.users[?(@.name == "e2e")].user.password}'
|
||||
--merge[=true]: merge together the full hierarchy of kubeconfig files
|
||||
--minify[=false]: remove all information not used by current-context from the output
|
||||
--no-headers[=false]: When using the default output, don't print headers.
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.2/docs/user-guide/jsonpath.md].
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.3/docs/user-guide/jsonpath.md].
|
||||
--output-version="": Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
|
||||
--raw[=false]: display raw byte data
|
||||
-a, --show-all[=false]: When printing, show all resources (default hide terminated pods.)
|
||||
@@ -45,6 +46,7 @@ kubectl config view -o jsonpath='{.users[?(@.name == "e2e")].user.password}'
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -70,7 +72,14 @@ kubectl config view -o jsonpath='{.users[?(@.name == "e2e")].user.password}'
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl config](/docs/user-guide/kubectl/kubectl_config/) - config modifies kubeconfig files
|
||||
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
|
||||
|
||||
###### Auto generated by spf13/cobra on 11-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
---
|
||||
|
||||
## kubectl convert
|
||||
|
||||
Convert config files between different API versions
|
||||
@@ -41,10 +42,12 @@ kubectl convert -f . | kubectl create -f -
|
||||
|
||||
```
|
||||
-f, --filename=[]: Filename, directory, or URL to file to need to get converted.
|
||||
--include-extended-apis[=true]: If true, include definitions of new APIs via calls to the API server. [default true]
|
||||
--local[=true]: If true, convert will NOT try to contact api-server but run locally.
|
||||
--no-headers[=false]: When using the default output, don't print headers.
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.2/docs/user-guide/jsonpath.md].
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.3/docs/user-guide/jsonpath.md].
|
||||
--output-version="": Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
|
||||
-R, --recursive[=false]: Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
|
||||
--schema-cache-dir="~/.kube/schema": If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
|
||||
-a, --show-all[=false]: When printing, show all resources (default hide terminated pods.)
|
||||
--show-labels[=false]: When printing, show all labels as the last column (default hide labels column)
|
||||
@@ -57,6 +60,7 @@ kubectl convert -f . | kubectl create -f -
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -82,6 +86,14 @@ kubectl convert -f . | kubectl create -f -
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 11-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -27,6 +27,7 @@ kubectl cordon foo
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -52,6 +53,14 @@ kubectl cordon foo
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -30,8 +30,10 @@ cat pod.json | kubectl create -f -
|
||||
|
||||
```
|
||||
-f, --filename=[]: Filename, directory, or URL to file to use to create the resource
|
||||
--include-extended-apis[=true]: If true, include definitions of new APIs via calls to the API server. [default true]
|
||||
-o, --output="": Output mode. Use "-o name" for shorter output (resource/name).
|
||||
--record[=false]: Record current kubectl command in the resource annotation.
|
||||
-R, --recursive[=false]: Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
|
||||
--save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
|
||||
--schema-cache-dir="~/.kube/schema": If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
|
||||
--validate[=true]: If true, use a schema to validate the input before sending it
|
||||
@@ -41,6 +43,7 @@ cat pod.json | kubectl create -f -
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -66,10 +69,18 @@ cat pod.json | kubectl create -f -
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl create configmap](/docs/user-guide/kubectl/kubectl_create_configmap/) - Create a configMap from a local file, directory or literal value.
|
||||
* [kubectl create namespace](/docs/user-guide/kubectl/kubectl_create_namespace/) - Create a namespace with the specified name.
|
||||
* [kubectl create secret](/docs/user-guide/kubectl/kubectl_create_secret/) - Create a secret using specified subcommand.
|
||||
* [kubectl create serviceaccount](/docs/user-guide/kubectl/kubectl_create_serviceaccount/) - Create a service account with the specified name.
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl create configmap](kubectl_create_configmap.md) - Create a configMap from a local file, directory or literal value.
|
||||
* [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.
|
||||
* [kubectl create serviceaccount](kubectl_create_serviceaccount.md) - Create a service account with the specified name.
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -21,7 +21,7 @@ symlinks, devices, pipes, etc).
|
||||
|
||||
|
||||
```
|
||||
kubectl create configmap NAME [--type=string] [--from-file=[key=]source] [--from-literal=key1=value1] [--dry-run]
|
||||
kubectl create configmap NAME [--from-file=[key=]source] [--from-literal=key1=value1] [--dry-run]
|
||||
```
|
||||
|
||||
### Examples
|
||||
@@ -31,7 +31,7 @@ kubectl create configmap NAME [--type=string] [--from-file=[key=]source] [--from
|
||||
kubectl create configmap 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 my-config --from-file=ssh-privatekey=~/.ssh/id_rsa --from-file=ssh-publickey=~/.ssh/id_rsa.pub
|
||||
kubectl create configmap my-config --from-file=key1=/path/to/bar/file1.txt --from-file=key2=/path/to/bar/file2.txt
|
||||
|
||||
# Create a new configMap named my-config with key1=config1 and key2=config2
|
||||
kubectl create configmap my-config --from-literal=key1=config1 --from-literal=key2=config2
|
||||
@@ -45,7 +45,7 @@ kubectl create configmap NAME [--type=string] [--from-file=[key=]source] [--from
|
||||
--from-literal=[]: Specify a key and literal value to insert in configmap (i.e. mykey=somevalue)
|
||||
--generator="configmap/v1": The name of the API generator to use.
|
||||
--no-headers[=false]: When using the default output, don't print headers.
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.2/docs/user-guide/jsonpath.md].
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.3/docs/user-guide/jsonpath.md].
|
||||
--output-version="": Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
|
||||
--save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
|
||||
--schema-cache-dir="~/.kube/schema": If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
|
||||
@@ -60,6 +60,7 @@ kubectl create configmap NAME [--type=string] [--from-file=[key=]source] [--from
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -85,6 +86,14 @@ kubectl create configmap NAME [--type=string] [--from-file=[key=]source] [--from
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl create](/docs/user-guide/kubectl/kubectl_create/) - Create a resource by filename or stdin
|
||||
* [kubectl create](kubectl_create.md) - Create a resource by filename or stdin
|
||||
|
||||
###### Auto generated by spf13/cobra on 11-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
---
|
||||
|
||||
## kubectl create namespace
|
||||
|
||||
Create a namespace with the specified name.
|
||||
@@ -27,7 +28,7 @@ kubectl create namespace NAME [--dry-run]
|
||||
--dry-run[=false]: If true, only print the object that would be sent, without sending it.
|
||||
--generator="namespace/v1": The name of the API generator to use.
|
||||
--no-headers[=false]: When using the default output, don't print headers.
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.2/docs/user-guide/jsonpath.md].
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.3/docs/user-guide/jsonpath.md].
|
||||
--output-version="": Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
|
||||
--save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
|
||||
--schema-cache-dir="~/.kube/schema": If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
|
||||
@@ -42,6 +43,7 @@ kubectl create namespace NAME [--dry-run]
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -67,6 +69,14 @@ kubectl create namespace NAME [--dry-run]
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl create](/docs/user-guide/kubectl/kubectl_create/) - Create a resource by filename or stdin
|
||||
* [kubectl create](kubectl_create.md) - Create a resource by filename or stdin
|
||||
|
||||
###### Auto generated by spf13/cobra on 11-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -18,6 +18,7 @@ kubectl create secret
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -43,8 +44,17 @@ kubectl create secret
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl create](/docs/user-guide/kubectl/kubectl_create/) - Create a resource by filename or stdin
|
||||
* [kubectl create secret docker-registry](/docs/user-guide/kubectl/kubectl_create_secret_docker-registry/) - Create a secret for use with a Docker registry.
|
||||
* [kubectl create secret generic](/docs/user-guide/kubectl/kubectl_create_secret_generic/) - Create a secret from a local file, directory or literal value.
|
||||
* [kubectl create](kubectl_create.md) - Create a resource by filename or stdin
|
||||
* [kubectl create secret docker-registry](kubectl_create_secret_docker-registry.md) - Create a secret for use with a Docker registry.
|
||||
* [kubectl create secret generic](kubectl_create_secret_generic.md) - Create a secret from a local file, directory or literal value.
|
||||
* [kubectl create secret tls](kubectl_create_secret_tls.md) - Create a TLS secret.
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
---
|
||||
|
||||
## kubectl create secret docker-registry
|
||||
|
||||
Create a secret for use with a Docker registry.
|
||||
@@ -29,7 +30,7 @@ kubectl create secret docker-registry NAME --docker-username=user --docker-passw
|
||||
|
||||
```
|
||||
# If you don't already have a .dockercfg file, you can create a dockercfg secret directly by using:
|
||||
$ kubectl create secret docker-registry my-secret --docker-server=DOCKER_REGISTRY_SERVER --docker-username=DOCKER_USER --docker-password=DOCKER_PASSWORD --docker-email=DOCKER_EMAIL
|
||||
kubectl create secret docker-registry my-secret --docker-server=DOCKER_REGISTRY_SERVER --docker-username=DOCKER_USER --docker-password=DOCKER_PASSWORD --docker-email=DOCKER_EMAIL
|
||||
```
|
||||
|
||||
### Options
|
||||
@@ -41,8 +42,9 @@ kubectl create secret docker-registry NAME --docker-username=user --docker-passw
|
||||
--docker-username="": Username for Docker registry authentication
|
||||
--dry-run[=false]: If true, only print the object that would be sent, without sending it.
|
||||
--generator="secret-for-docker-registry/v1": The name of the API generator to use.
|
||||
--include-extended-apis[=true]: If true, include definitions of new APIs via calls to the API server. [default true]
|
||||
--no-headers[=false]: When using the default output, don't print headers.
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.2/docs/user-guide/jsonpath.md].
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.3/docs/user-guide/jsonpath.md].
|
||||
--output-version="": Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
|
||||
--save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
|
||||
--schema-cache-dir="~/.kube/schema": If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
|
||||
@@ -57,6 +59,7 @@ kubectl create secret docker-registry NAME --docker-username=user --docker-passw
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -82,6 +85,14 @@ kubectl create secret docker-registry NAME --docker-username=user --docker-passw
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl create secret](/docs/user-guide/kubectl/kubectl_create_secret/) - Create a secret using specified subcommand.
|
||||
* [kubectl create secret](kubectl_create_secret.md) - Create a secret using specified subcommand.
|
||||
|
||||
###### Auto generated by spf13/cobra on 11-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -46,7 +46,7 @@ kubectl create secret generic NAME [--type=string] [--from-file=[key=]source] [-
|
||||
--from-literal=[]: Specify a key and literal value to insert in secret (i.e. mykey=somevalue)
|
||||
--generator="secret/v1": The name of the API generator to use.
|
||||
--no-headers[=false]: When using the default output, don't print headers.
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.2/docs/user-guide/jsonpath.md].
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.3/docs/user-guide/jsonpath.md].
|
||||
--output-version="": Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
|
||||
--save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
|
||||
--schema-cache-dir="~/.kube/schema": If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
|
||||
@@ -62,6 +62,7 @@ kubectl create secret generic NAME [--type=string] [--from-file=[key=]source] [-
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -87,6 +88,14 @@ kubectl create secret generic NAME [--type=string] [--from-file=[key=]source] [-
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl create secret](/docs/user-guide/kubectl/kubectl_create_secret/) - Create a secret using specified subcommand.
|
||||
* [kubectl create secret](kubectl_create_secret.md) - Create a secret using specified subcommand.
|
||||
|
||||
###### Auto generated by spf13/cobra on 11-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
---
|
||||
---
|
||||
|
||||
## kubectl create secret tls
|
||||
|
||||
Create a TLS secret.
|
||||
|
||||
### Synopsis
|
||||
|
||||
|
||||
|
||||
Create a TLS secret from the given public/private key pair.
|
||||
|
||||
The public/private key pair must exist before hand. The public key certificate must be .PEM encoded and match the given private key.
|
||||
|
||||
```
|
||||
kubectl create secret tls NAME --cert=path/to/cert/file --key=path/to/key/file [--dry-run]
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
```
|
||||
# Create a new TLS secret named tls-secret with the given key pair:
|
||||
kubectl create secret tls tls-secret --cert=path/to/tls.cert --key=path/to/tls.key
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
--cert="": Path to PEM encoded public key certificate.
|
||||
--dry-run[=false]: If true, only print the object that would be sent, without sending it.
|
||||
--generator="secret-for-tls/v1": The name of the API generator to use.
|
||||
--key="": Path to private key associated with given certificate.
|
||||
--no-headers[=false]: When using the default output, don't print headers.
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.3/docs/user-guide/jsonpath.md].
|
||||
--output-version="": Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
|
||||
--save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
|
||||
--schema-cache-dir="~/.kube/schema": If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
|
||||
-a, --show-all[=false]: When printing, show all resources (default hide terminated pods.)
|
||||
--show-labels[=false]: When printing, show all labels as the last column (default hide labels column)
|
||||
--sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
|
||||
--template="": Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
|
||||
--validate[=true]: If true, use a schema to validate the input before sending it
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
--cluster="": The name of the kubeconfig cluster to use
|
||||
--context="": The name of the kubeconfig context to use
|
||||
--insecure-skip-tls-verify[=false]: If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
|
||||
--kubeconfig="": Path to the kubeconfig file to use for CLI requests.
|
||||
--log-backtrace-at=:0: when logging hits line file:N, emit a stack trace
|
||||
--log-dir="": If non-empty, write log files in this directory
|
||||
--log-flush-frequency=5s: Maximum number of seconds between log flushes
|
||||
--logtostderr[=true]: log to standard error instead of files
|
||||
--match-server-version[=false]: Require server version to match client version
|
||||
--namespace="": If present, the namespace scope for this CLI request.
|
||||
--password="": Password for basic authentication to the API server.
|
||||
-s, --server="": The address and port of the Kubernetes API server
|
||||
--stderrthreshold=2: logs at or above this threshold go to stderr
|
||||
--token="": Bearer token for authentication to the API server.
|
||||
--user="": The name of the kubeconfig user to use
|
||||
--username="": Username for basic authentication to the API server.
|
||||
--v=0: log level for V logs
|
||||
--vmodule=: comma-separated list of pattern=N settings for file-filtered logging
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl create secret](kubectl_create_secret.md) - Create a secret using specified subcommand.
|
||||
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
@@ -27,8 +27,9 @@ kubectl create serviceaccount NAME [--dry-run]
|
||||
```
|
||||
--dry-run[=false]: If true, only print the object that would be sent, without sending it.
|
||||
--generator="serviceaccount/v1": The name of the API generator to use.
|
||||
--include-extended-apis[=true]: If true, include definitions of new APIs via calls to the API server. [default true]
|
||||
--no-headers[=false]: When using the default output, don't print headers.
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.2/docs/user-guide/jsonpath.md].
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.3/docs/user-guide/jsonpath.md].
|
||||
--output-version="": Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
|
||||
--save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
|
||||
--schema-cache-dir="~/.kube/schema": If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
|
||||
@@ -43,6 +44,7 @@ kubectl create serviceaccount NAME [--dry-run]
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -68,6 +70,14 @@ kubectl create serviceaccount NAME [--dry-run]
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl create](/docs/user-guide/kubectl/kubectl_create/) - Create a resource by filename or stdin
|
||||
* [kubectl create](kubectl_create.md) - Create a resource by filename or stdin
|
||||
|
||||
###### Auto generated by spf13/cobra on 11-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -37,6 +37,9 @@ kubectl delete pod,service baz foo
|
||||
# Delete pods and services with label name=myLabel.
|
||||
kubectl delete pods,services -l name=myLabel
|
||||
|
||||
# Delete a pod immediately (no graceful shutdown)
|
||||
kubectl delete pod foo --now
|
||||
|
||||
# Delete a pod with UID 1234-56-7890-234234-456456.
|
||||
kubectl delete pod 1234-56-7890-234234-456456
|
||||
|
||||
@@ -52,7 +55,10 @@ kubectl delete pods --all
|
||||
-f, --filename=[]: Filename, directory, or URL to a file containing the resource to delete.
|
||||
--grace-period=-1: Period of time in seconds given to the resource to terminate gracefully. Ignored if negative.
|
||||
--ignore-not-found[=false]: Treat "resource not found" as a successful delete. Defaults to "true" when --all is specified.
|
||||
--include-extended-apis[=true]: If true, include definitions of new APIs via calls to the API server. [default true]
|
||||
--now[=false]: If true, resources are force terminated without graceful deletion (same as --grace-period=0).
|
||||
-o, --output="": Output mode. Use "-o name" for shorter output (resource/name).
|
||||
-R, --recursive[=false]: Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
|
||||
-l, --selector="": Selector (label query) to filter on.
|
||||
--timeout=0: The length of time to wait before giving up on a delete, zero means determine a timeout from the size of the object
|
||||
```
|
||||
@@ -61,6 +67,7 @@ kubectl delete pods --all
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -86,7 +93,14 @@ kubectl delete pods --all
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -18,11 +18,11 @@ $ kubectl describe TYPE NAME_PREFIX
|
||||
will first check for an exact match on TYPE and NAME_PREFIX. If no such resource
|
||||
exists, it will output details for every resource that has a name prefixed with NAME_PREFIX
|
||||
|
||||
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), serviceaccounts, horizontalpodautoscalers (hpa),
|
||||
endpoints (ep) or secrets.
|
||||
Possible resource types include (case insensitive): pods (po), services (svc), deployments,
|
||||
replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
|
||||
persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns),
|
||||
serviceaccounts (sa), ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps,
|
||||
componentstatuses (cs), endpoints (ep), and secrets.
|
||||
|
||||
```
|
||||
kubectl describe (-f FILENAME | TYPE [NAME_PREFIX | -l label] | TYPE/NAME)
|
||||
@@ -55,13 +55,17 @@ kubectl describe pods frontend
|
||||
|
||||
```
|
||||
-f, --filename=[]: Filename, directory, or URL to a file containing the resource to describe
|
||||
--include-extended-apis[=true]: If true, include definitions of new APIs via calls to the API server. [default true]
|
||||
-R, --recursive[=false]: Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
|
||||
-l, --selector="": Selector (label query) to filter on
|
||||
--show-events[=true]: If true, display events related to the described object.
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -87,6 +91,14 @@ kubectl describe pods frontend
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -17,7 +17,8 @@ without --ignore-daemonsets, and regardless it will not delete any
|
||||
DaemonSet-managed pods, because those pods would be immediately replaced by the
|
||||
DaemonSet controller, which ignores unschedulable markings. If there are any
|
||||
pods that are neither mirror pods nor managed--by ReplicationController,
|
||||
DaemonSet or Job--, then drain will not delete any pods unless you use --force.
|
||||
ReplicaSet, DaemonSet or Job--, then drain will not delete any pods unless you
|
||||
use --force.
|
||||
|
||||
When you are ready to put the node back into service, use kubectl uncordon, which
|
||||
will make the node schedulable again.
|
||||
@@ -30,10 +31,10 @@ kubectl drain NODE
|
||||
### Examples
|
||||
|
||||
```
|
||||
# Drain node "foo", even if there are pods not managed by a ReplicationController, Job, or DaemonSet on it.
|
||||
# Drain node "foo", even if there are pods not managed by a ReplicationController, ReplicaSet, Job, or DaemonSet on it.
|
||||
$ kubectl drain foo --force
|
||||
|
||||
# As above, but abort if there are pods not managed by a ReplicationController, Job, or DaemonSet, and use a grace period of 15 minutes.
|
||||
# As above, but abort if there are pods not managed by a ReplicationController, ReplicaSet, Job, or DaemonSet, and use a grace period of 15 minutes.
|
||||
$ kubectl drain foo --grace-period=900
|
||||
|
||||
```
|
||||
@@ -41,7 +42,8 @@ $ kubectl drain foo --grace-period=900
|
||||
### Options
|
||||
|
||||
```
|
||||
--force[=false]: Continue even if there are pods not managed by a ReplicationController, Job, or DaemonSet.
|
||||
--delete-local-data[=false]: Continue even if there are pods using emptyDir (local data that will be deleted when the node is drained).
|
||||
--force[=false]: Continue even if there are pods not managed by a ReplicationController, ReplicaSet, Job, or DaemonSet.
|
||||
--grace-period=-1: Period of time in seconds given to each pod to terminate gracefully. If negative, the default value specified in the pod will be used.
|
||||
--ignore-daemonsets[=false]: Ignore DaemonSet-managed pods.
|
||||
```
|
||||
@@ -50,6 +52,7 @@ $ kubectl drain foo --grace-period=900
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -75,7 +78,14 @@ $ kubectl drain foo --grace-period=900
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -49,9 +49,11 @@ kubectl edit (RESOURCE/NAME | -f FILENAME)
|
||||
|
||||
```
|
||||
-f, --filename=[]: Filename, directory, or URL to file to use to edit the resource
|
||||
--include-extended-apis[=true]: If true, include definitions of new APIs via calls to the API server. [default true]
|
||||
-o, --output="yaml": Output format. One of: yaml|json.
|
||||
--output-version="": Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
|
||||
--record[=false]: Record current kubectl command in the resource annotation.
|
||||
-R, --recursive[=false]: Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
|
||||
--save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
|
||||
--windows-line-endings[=false]: Use Windows line-endings (default Unix line-endings)
|
||||
```
|
||||
@@ -60,6 +62,7 @@ kubectl edit (RESOURCE/NAME | -f FILENAME)
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -85,6 +88,14 @@ kubectl edit (RESOURCE/NAME | -f FILENAME)
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -41,6 +41,7 @@ kubectl exec 123456-7890 -c ruby-container -i -t -- bash -il
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -66,6 +67,14 @@ kubectl exec 123456-7890 -c ruby-container -i -t -- bash -il
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -10,11 +10,11 @@ Documentation of resources.
|
||||
|
||||
Documentation of resources.
|
||||
|
||||
Possible resource types include: pods (po), services (svc),
|
||||
replicationcontrollers (rc), nodes (no), events (ev), componentstatuses (cs),
|
||||
limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc),
|
||||
resourcequotas (quota), namespaces (ns), horizontalpodautoscalers (hpa)
|
||||
or endpoints (ep).
|
||||
Possible resource types include (case insensitive): pods (po), services (svc), deployments,
|
||||
replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
|
||||
persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns),
|
||||
serviceaccounts (sa), ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps,
|
||||
componentstatuses (cs), endpoints (ep), and secrets.
|
||||
|
||||
```
|
||||
kubectl explain RESOURCE
|
||||
@@ -33,6 +33,7 @@ kubectl explain pods.spec.containers
|
||||
### Options
|
||||
|
||||
```
|
||||
--include-extended-apis[=true]: If true, include definitions of new APIs via calls to the API server. [default true]
|
||||
--recursive[=false]: Print the fields of fields (Currently only 1 level deep)
|
||||
```
|
||||
|
||||
@@ -40,6 +41,7 @@ kubectl explain pods.spec.containers
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -65,7 +67,14 @@ kubectl explain pods.spec.containers
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -3,19 +3,24 @@
|
||||
|
||||
## kubectl expose
|
||||
|
||||
Take a replication controller, service or pod and expose it as a new Kubernetes Service
|
||||
Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service
|
||||
|
||||
### Synopsis
|
||||
|
||||
|
||||
Take a replication controller, service, replica set or pod and expose it as a new Kubernetes service.
|
||||
Expose a resource as a new Kubernetes service.
|
||||
|
||||
Looks up a deployment, service, replica set, replication controller or pod by name and uses the selector
|
||||
for that resource as the selector for a new service on the specified port. A deployment or replica set
|
||||
will be exposed as a service only if its selector is convertible to a selector that service supports,
|
||||
i.e. when the selector contains only the matchLabels component. Note that if no port is specified via
|
||||
--port and the exposed resource has multiple ports, all will be re-used by the new service. Also if no
|
||||
labels are specified, the new service will re-use the labels from the resource it exposes.
|
||||
|
||||
Possible resources include (case insensitive):
|
||||
pod (po), service (svc), replicationcontroller (rc),
|
||||
deployment, replicaset (rs)
|
||||
|
||||
Looks up a replication controller, service, replica set or pod by name and uses the selector for that
|
||||
resource as the selector for a new service on the specified port. A replica set will be exposed as a
|
||||
service only if it's selector is convertible to a selector that service supports, i.e. when the
|
||||
replica set selector contains only the matchLabels component. Note that if no port is specified
|
||||
via --port and the exposed resource has multiple ports, all will be re-used by the new service. Also
|
||||
if no labels are specified, the new service will re-use the labels from the resource it exposes.
|
||||
|
||||
```
|
||||
kubectl expose (-f FILENAME | TYPE NAME) [--port=port] [--protocol=TCP|UDP] [--target-port=number-or-name] [--name=name] [--external-ip=external-ip-of-service] [--type=type]
|
||||
@@ -41,13 +46,15 @@ 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
|
||||
|
||||
# Create a service for an nginx deployment, which serves on port 80 and connects to the containers on port 8000.
|
||||
kubectl expose deployment nginx --port=80 --target-port=8000
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
--container-port="": Synonym for --target-port
|
||||
--dry-run[=false]: If true, only print the object that would be sent, without creating it.
|
||||
--dry-run[=false]: If true, only print the object that would be sent, without sending it.
|
||||
--external-ip="": Additional external IP address (not managed by Kubernetes) to accept for the service. If this IP is routed to a node, the service can be accessed by this IP in addition to its generated service IP.
|
||||
-f, --filename=[]: Filename, directory, or URL to a file identifying the resource to expose a service
|
||||
--generator="service/v2": The name of the API generator to use. There are 2 generators: 'service/v1' and 'service/v2'. The only difference between them is that service port in v1 is named 'default', while it is left unnamed in v2. Default is 'service/v2'.
|
||||
@@ -55,12 +62,13 @@ kubectl expose rs nginx --port=80 --target-port=8000
|
||||
--load-balancer-ip="": IP to assign to to the Load Balancer. If empty, an ephemeral IP will be created and used (cloud-provider specific).
|
||||
--name="": The name for the newly created object.
|
||||
--no-headers[=false]: When using the default output, don't print headers.
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.2/docs/user-guide/jsonpath.md].
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.3/docs/user-guide/jsonpath.md].
|
||||
--output-version="": Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
|
||||
--overrides="": An inline JSON override for the generated object. If this is non-empty, it is used to override the generated object. Requires that the object supply a valid apiVersion field.
|
||||
--port="": The port that the service should serve on. Copied from the resource being exposed, if unspecified
|
||||
--protocol="TCP": The network protocol for the service to be created. Default is 'tcp'.
|
||||
--protocol="": The network protocol for the service to be created. Default is 'TCP'.
|
||||
--record[=false]: Record current kubectl command in the resource annotation.
|
||||
-R, --recursive[=false]: Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
|
||||
--save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
|
||||
--selector="": A label selector to use for this service. Only equality-based selector requirements are supported. If empty (the default) infer the selector from the replication controller or replica set.
|
||||
--session-affinity="": If non-empty, set the session affinity for the service to this; legal values: 'None', 'ClientIP'
|
||||
@@ -76,6 +84,7 @@ kubectl expose rs nginx --port=80 --target-port=8000
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -101,7 +110,14 @@ kubectl expose rs nginx --port=80 --target-port=8000
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 11-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -10,11 +10,11 @@ Display one or many resources
|
||||
|
||||
Display one or many resources.
|
||||
|
||||
Possible resource types include (case insensitive): pods (po), services (svc),
|
||||
replicationcontrollers (rc), nodes (no), events (ev), componentstatuses (cs),
|
||||
limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc),
|
||||
resourcequotas (quota), namespaces (ns), endpoints (ep),
|
||||
horizontalpodautoscalers (hpa), serviceaccounts or secrets.
|
||||
Possible resource types include (case insensitive): pods (po), services (svc), deployments,
|
||||
replicasets (rs), replicationcontrollers (rc), nodes (no), events (ev), limitranges (limits),
|
||||
persistentvolumes (pv), persistentvolumeclaims (pvc), resourcequotas (quota), namespaces (ns),
|
||||
serviceaccounts (sa), ingresses (ing), horizontalpodautoscalers (hpa), daemonsets (ds), configmaps,
|
||||
componentstatuses (cs), endpoints (ep), and 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).
|
||||
@@ -42,7 +42,7 @@ kubectl get -o json pod web-pod-13je7
|
||||
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={% raw %}{{.status.phase}}{% endraw %}
|
||||
kubectl get -o template pod/web-pod-13je7 --template={{.status.phase}}
|
||||
|
||||
# List all replication controllers and services together in ps output format.
|
||||
kubectl get rc,services
|
||||
@@ -57,10 +57,12 @@ kubectl get rc/web service/frontend pods/web-pod-13je7
|
||||
--all-namespaces[=false]: If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.
|
||||
--export[=false]: If true, use 'export' for the resources. Exported resources are stripped of cluster-specific information.
|
||||
-f, --filename=[]: Filename, directory, or URL to a file identifying the resource to get from a server.
|
||||
--include-extended-apis[=true]: If true, include definitions of new APIs via calls to the API server. [default true]
|
||||
-L, --label-columns=[]: Accepts a comma separated list of labels that are going to be presented as columns. Names are case-sensitive. You can also use multiple flag statements like -L label1 -L label2...
|
||||
--no-headers[=false]: When using the default output, don't print headers.
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.2/docs/user-guide/jsonpath.md].
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.3/docs/user-guide/jsonpath.md].
|
||||
--output-version="": Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
|
||||
-R, --recursive[=false]: Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
|
||||
-l, --selector="": Selector (label query) to filter on
|
||||
-a, --show-all[=false]: When printing, show all resources (default hide terminated pods.)
|
||||
--show-labels[=false]: When printing, show all labels as the last column (default hide labels column)
|
||||
@@ -74,6 +76,7 @@ kubectl get rc/web service/frontend pods/web-pod-13je7
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -99,6 +102,14 @@ kubectl get rc/web service/frontend pods/web-pod-13je7
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 11-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -47,11 +47,13 @@ kubectl label pods foo bar-
|
||||
--all[=false]: select all resources in the namespace of the specified resource types
|
||||
--dry-run[=false]: If true, only print the object that would be sent, without sending it.
|
||||
-f, --filename=[]: Filename, directory, or URL to a file identifying the resource to update the labels
|
||||
--include-extended-apis[=true]: If true, include definitions of new APIs via calls to the API server. [default true]
|
||||
--no-headers[=false]: When using the default output, don't print headers.
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.2/docs/user-guide/jsonpath.md].
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.3/docs/user-guide/jsonpath.md].
|
||||
--output-version="": Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
|
||||
--overwrite[=false]: If true, allow labels to be overwritten, otherwise reject label updates that overwrite existing labels.
|
||||
--record[=false]: Record current kubectl command in the resource annotation.
|
||||
-R, --recursive[=false]: Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
|
||||
--resource-version="": If non-empty, the labels update will only succeed if this is the current resource-version for the object. Only valid when specifying a single resource.
|
||||
-l, --selector="": Selector (label query) to filter on
|
||||
-a, --show-all[=false]: When printing, show all resources (default hide terminated pods.)
|
||||
@@ -64,6 +66,7 @@ kubectl label pods foo bar-
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -89,7 +92,14 @@ kubectl label pods foo bar-
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 11-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -38,6 +38,7 @@ kubectl logs --since=1h nginx
|
||||
```
|
||||
-c, --container="": Print the logs of this container
|
||||
-f, --follow[=false]: Specify if the logs should be streamed.
|
||||
--include-extended-apis[=true]: If true, include definitions of new APIs via calls to the API server. [default true]
|
||||
--limit-bytes=0: Maximum bytes of logs to return. Defaults to no limit.
|
||||
-p, --previous[=false]: If true, print the logs for the previous instance of the container in a pod if it exists.
|
||||
--since=0: Only return logs newer than a relative duration like 5s, 2m, or 3h. Defaults to all logs. Only one of since-time / since may be used.
|
||||
@@ -50,6 +51,7 @@ kubectl logs --since=1h nginx
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -75,7 +77,14 @@ kubectl logs --since=1h nginx
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -21,6 +21,7 @@ kubectl namespace [namespace]
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -46,6 +47,14 @@ kubectl namespace [namespace]
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -12,7 +12,7 @@ Update field(s) of a resource using strategic merge patch
|
||||
|
||||
JSON and YAML formats are accepted.
|
||||
|
||||
Please refer to the models in https://htmlpreview.github.io/?https://github.com/kubernetes/kubernetes/blob/release-1.2/docs/api-reference/v1/definitions.html to find if a field is mutable.
|
||||
Please refer to the models in https://htmlpreview.github.io/?https://github.com/kubernetes/kubernetes/blob/v1.3.0-beta.0/docs/api-reference/v1/definitions.html to find if a field is mutable.
|
||||
|
||||
```
|
||||
kubectl patch (-f FILENAME | TYPE NAME) -p PATCH
|
||||
@@ -39,9 +39,11 @@ kubectl patch pod valid-pod --type='json' -p='[{"op": "replace", "path": "/spec/
|
||||
|
||||
```
|
||||
-f, --filename=[]: Filename, directory, or URL to a file identifying the resource to update
|
||||
--include-extended-apis[=true]: If true, include definitions of new APIs via calls to the API server. [default true]
|
||||
-o, --output="": Output mode. Use "-o name" for shorter output (resource/name).
|
||||
-p, --patch="": The patch to be applied to the resource JSON file.
|
||||
--record[=false]: Record current kubectl command in the resource annotation.
|
||||
-R, --recursive[=false]: Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
|
||||
--type="strategic": The type of patch being provided; one of [json merge strategic]
|
||||
```
|
||||
|
||||
@@ -49,6 +51,7 @@ kubectl patch pod valid-pod --type='json' -p='[{"op": "replace", "path": "/spec/
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -74,7 +77,14 @@ kubectl patch pod valid-pod --type='json' -p='[{"op": "replace", "path": "/spec/
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
---
|
||||
|
||||
## kubectl port-forward
|
||||
|
||||
Forward one or more local ports to a pod.
|
||||
@@ -40,6 +41,7 @@ kubectl port-forward mypod 0:5000
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -65,7 +67,14 @@ kubectl port-forward mypod 0:5000
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -64,6 +64,7 @@ kubectl proxy --api-prefix=/k8s-api
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -89,7 +90,14 @@ kubectl proxy --api-prefix=/k8s-api
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -14,7 +14,7 @@ JSON and YAML formats are accepted. If replacing an existing resource, the
|
||||
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/kubernetes/kubernetes/blob/release-1.2/docs/api-reference/v1/definitions.html to find if a field is mutable.
|
||||
Please refer to the models in https://htmlpreview.github.io/?https://github.com/kubernetes/kubernetes/blob/v1.3.0-beta.0/docs/api-reference/v1/definitions.html to find if a field is mutable.
|
||||
|
||||
```
|
||||
kubectl replace -f FILENAME
|
||||
@@ -43,8 +43,10 @@ kubectl replace --force -f ./pod.json
|
||||
-f, --filename=[]: Filename, directory, or URL to file to use to replace the resource.
|
||||
--force[=false]: Delete and re-create the specified resource
|
||||
--grace-period=-1: Only relevant during a force replace. Period of time in seconds given to the old resource to terminate gracefully. Ignored if negative.
|
||||
--include-extended-apis[=true]: If true, include definitions of new APIs via calls to the API server. [default true]
|
||||
-o, --output="": Output mode. Use "-o name" for shorter output (resource/name).
|
||||
--record[=false]: Record current kubectl command in the resource annotation.
|
||||
-R, --recursive[=false]: Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
|
||||
--save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
|
||||
--schema-cache-dir="~/.kube/schema": If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
|
||||
--timeout=0: Only relevant during a force replace. The length of time to wait before giving up on a delete of the old resource, zero means determine a timeout from the size of the object
|
||||
@@ -55,6 +57,7 @@ kubectl replace --force -f ./pod.json
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -80,7 +83,14 @@ kubectl replace --force -f ./pod.json
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
---
|
||||
|
||||
## kubectl rolling-update
|
||||
|
||||
Perform a rolling update of the given ReplicationController.
|
||||
@@ -43,11 +44,13 @@ kubectl rolling-update frontend-v1 frontend-v2 --rollback
|
||||
```
|
||||
--container="": Container name which will have its image upgraded. Only relevant when --image is specified, ignored otherwise. Required when using --image on a multi-container pod
|
||||
--deployment-label-key="deployment": The key to use to differentiate between two different controllers, default 'deployment'. Only relevant when --image is specified, ignored otherwise
|
||||
--dry-run[=false]: If true, print out the changes that would be made, but don't actually make them.
|
||||
--dry-run[=false]: If true, only print the object that would be sent, without sending it.
|
||||
-f, --filename=[]: Filename or URL to file to use to create the new replication controller.
|
||||
--image="": Image to use for upgrading the replication controller. Must be distinct from the existing image (either new image or new image tag). Can not be used with --filename/-f
|
||||
--image-pull-policy="": Explicit policy for when to pull container images. Required when --image is same as existing image, ignored otherwise.
|
||||
--include-extended-apis[=true]: If true, include definitions of new APIs via calls to the API server. [default true]
|
||||
--no-headers[=false]: When using the default output, don't print headers.
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.2/docs/user-guide/jsonpath.md].
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.3/docs/user-guide/jsonpath.md].
|
||||
--output-version="": Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
|
||||
--poll-interval=3s: Time delay between polling for replication controller status after the update. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
|
||||
--rollback[=false]: If true, this is a request to abort an existing rollout that is partially rolled out. It effectively reverses current and next and runs a rollout
|
||||
@@ -65,6 +68,7 @@ kubectl rolling-update frontend-v1 frontend-v2 --rollback
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -90,7 +94,14 @@ kubectl rolling-update frontend-v1 frontend-v2 --rollback
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 11-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -8,7 +8,7 @@ rollout manages a deployment
|
||||
### Synopsis
|
||||
|
||||
|
||||
rollout manages a deployment using subcommands like "kubectl rollout undo deployment/abc"
|
||||
Manages a deployment using subcommands like "kubectl rollout undo deployment/abc"
|
||||
|
||||
```
|
||||
kubectl rollout SUBCOMMAND
|
||||
@@ -25,6 +25,7 @@ kubectl rollout undo deployment/abc
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -50,11 +51,19 @@ kubectl rollout undo deployment/abc
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl rollout history](/docs/user-guide/kubectl/kubectl_rollout_history/) - view rollout history
|
||||
* [kubectl rollout pause](/docs/user-guide/kubectl/kubectl_rollout_pause/) - Mark the provided resource as paused
|
||||
* [kubectl rollout resume](/docs/user-guide/kubectl/kubectl_rollout_resume/) - Resume a paused resource
|
||||
* [kubectl rollout undo](/docs/user-guide/kubectl/kubectl_rollout_undo/) - undoes a previous rollout
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl rollout history](kubectl_rollout_history.md) - view rollout history
|
||||
* [kubectl rollout pause](kubectl_rollout_pause.md) - Mark the provided resource as paused
|
||||
* [kubectl rollout resume](kubectl_rollout_resume.md) - Resume a paused resource
|
||||
* [kubectl rollout status](kubectl_rollout_status.md) - Watch rollout status until it's done
|
||||
* [kubectl rollout undo](kubectl_rollout_undo.md) - undoes a previous rollout
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -8,7 +8,7 @@ view rollout history
|
||||
### Synopsis
|
||||
|
||||
|
||||
view previous rollout revisions and configurations.
|
||||
View previous rollout revisions and configurations.
|
||||
|
||||
```
|
||||
kubectl rollout history (TYPE NAME | TYPE/NAME) [flags]
|
||||
@@ -19,12 +19,16 @@ kubectl rollout history (TYPE NAME | TYPE/NAME) [flags]
|
||||
```
|
||||
# View the rollout history of a deployment
|
||||
kubectl rollout history deployment/abc
|
||||
|
||||
# View the details of deployment revision 3
|
||||
kubectl rollout history deployment/abc --revision=3
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-f, --filename=[]: Filename, directory, or URL to a file identifying the resource to get from a server.
|
||||
-R, --recursive[=false]: Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
|
||||
--revision=0: See the details, including podTemplate of the revision specified
|
||||
```
|
||||
|
||||
@@ -32,6 +36,7 @@ kubectl rollout history deployment/abc
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -57,7 +62,14 @@ kubectl rollout history deployment/abc
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl rollout](/docs/user-guide/kubectl/kubectl_rollout/) - rollout manages a deployment
|
||||
* [kubectl rollout](kubectl_rollout.md) - rollout manages a deployment
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -31,12 +31,14 @@ kubectl rollout pause deployment/nginx
|
||||
|
||||
```
|
||||
-f, --filename=[]: Filename, directory, or URL to a file identifying the resource to get from a server.
|
||||
-R, --recursive[=false]: Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -62,6 +64,14 @@ kubectl rollout pause deployment/nginx
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl rollout](/docs/user-guide/kubectl/kubectl_rollout/) - rollout manages a deployment
|
||||
* [kubectl rollout](kubectl_rollout.md) - rollout manages a deployment
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -29,12 +29,14 @@ kubectl rollout resume deployment/nginx
|
||||
|
||||
```
|
||||
-f, --filename=[]: Filename, directory, or URL to a file identifying the resource to get from a server.
|
||||
-R, --recursive[=false]: Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -60,6 +62,14 @@ kubectl rollout resume deployment/nginx
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl rollout](/docs/user-guide/kubectl/kubectl_rollout/) - rollout manages a deployment
|
||||
* [kubectl rollout](kubectl_rollout.md) - rollout manages a deployment
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
---
|
||||
---
|
||||
|
||||
## kubectl rollout status
|
||||
|
||||
Watch rollout status until it's done
|
||||
|
||||
### Synopsis
|
||||
|
||||
|
||||
Watch the status of current rollout, until it's done.
|
||||
|
||||
```
|
||||
kubectl rollout status (TYPE NAME | TYPE/NAME) [flags]
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
```
|
||||
# Watch the rollout status of a deployment
|
||||
kubectl rollout status deployment/nginx
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-f, --filename=[]: Filename, directory, or URL to a file identifying the resource to get from a server.
|
||||
-R, --recursive[=false]: Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
--cluster="": The name of the kubeconfig cluster to use
|
||||
--context="": The name of the kubeconfig context to use
|
||||
--insecure-skip-tls-verify[=false]: If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
|
||||
--kubeconfig="": Path to the kubeconfig file to use for CLI requests.
|
||||
--log-backtrace-at=:0: when logging hits line file:N, emit a stack trace
|
||||
--log-dir="": If non-empty, write log files in this directory
|
||||
--log-flush-frequency=5s: Maximum number of seconds between log flushes
|
||||
--logtostderr[=true]: log to standard error instead of files
|
||||
--match-server-version[=false]: Require server version to match client version
|
||||
--namespace="": If present, the namespace scope for this CLI request.
|
||||
--password="": Password for basic authentication to the API server.
|
||||
-s, --server="": The address and port of the Kubernetes API server
|
||||
--stderrthreshold=2: logs at or above this threshold go to stderr
|
||||
--token="": Bearer token for authentication to the API server.
|
||||
--user="": The name of the kubeconfig user to use
|
||||
--username="": Username for basic authentication to the API server.
|
||||
--v=0: log level for V logs
|
||||
--vmodule=: comma-separated list of pattern=N settings for file-filtered logging
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl rollout](kubectl_rollout.md) - rollout manages a deployment
|
||||
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
@@ -8,7 +8,7 @@ undoes a previous rollout
|
||||
### Synopsis
|
||||
|
||||
|
||||
undo rolls back to a previous rollout.
|
||||
Rollback to a previous rollout.
|
||||
|
||||
```
|
||||
kubectl rollout undo (TYPE NAME | TYPE/NAME) [flags]
|
||||
@@ -19,12 +19,16 @@ kubectl rollout undo (TYPE NAME | TYPE/NAME) [flags]
|
||||
```
|
||||
# Rollback to the previous deployment
|
||||
kubectl rollout undo deployment/abc
|
||||
|
||||
# Rollback to deployment revision 3
|
||||
kubectl rollout undo deployment/abc --to-revision=3
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-f, --filename=[]: Filename, directory, or URL to a file identifying the resource to get from a server.
|
||||
-R, --recursive[=false]: Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
|
||||
--to-revision=0: The revision to rollback to. Default to 0 (last revision).
|
||||
```
|
||||
|
||||
@@ -32,6 +36,7 @@ kubectl rollout undo deployment/abc
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -57,7 +62,14 @@ kubectl rollout undo deployment/abc
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl rollout](/docs/user-guide/kubectl/kubectl_rollout/) - rollout manages a deployment
|
||||
* [kubectl rollout](kubectl_rollout.md) - rollout manages a deployment
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -36,8 +36,8 @@ 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": { ... } }'
|
||||
|
||||
# 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
|
||||
# Start a pod of busybox and keep it in the foreground, don't restart it if it exits.
|
||||
kubectl run -i -t 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 -- <arg1> <arg2> ... <argN>
|
||||
@@ -52,26 +52,27 @@ kubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'print
|
||||
### Options
|
||||
|
||||
```
|
||||
--attach[=false]: If true, wait for the Pod to start running, and then attach to the Pod as if 'kubectl attach ...' were called. Default false, unless '-i/--interactive' is set, in which case the default is true.
|
||||
--attach[=false]: If true, wait for the Pod to start running, and then attach to the Pod as if 'kubectl attach ...' were called. Default false, unless '-i/--stdin' is set, in which case the default is true.
|
||||
--command[=false]: If true and extra arguments are present, use them as the 'command' field in the container, rather than the 'args' field which is the default.
|
||||
--dry-run[=false]: If true, only print the object that would be sent, without sending it.
|
||||
--env=[]: Environment variables to set in the container
|
||||
--expose[=false]: If true, a public, external service is created for the container(s) which are run
|
||||
--generator="": The name of the API generator to use. Default is 'deployment/v1beta1' if --restart=Always, otherwise the default is 'job/v1'. This will happen only for cluster version at least 1.2, for olders we will fallback to 'run/v1' for --restart=Always, 'run-pod/v1' for others.
|
||||
--generator="": The name of the API generator to use. Default is 'deployment/v1beta1' if --restart=Always, 'job/v1' for OnFailure and 'run-pod/v1' for Never. This will happen only for cluster version at least 1.3, for 1.2 we will fallback to 'deployment/v1beta1' for --restart=Always, 'job/v1' for others, for olders we will fallback to 'run/v1' for --restart=Always, 'run-pod/v1' for others.
|
||||
--hostport=-1: The host port mapping for the container port. To demonstrate a single-machine container.
|
||||
--image="": The image for the container to run.
|
||||
--include-extended-apis[=true]: If true, include definitions of new APIs via calls to the API server. [default true]
|
||||
-l, --labels="": Labels to apply to the pod(s).
|
||||
--leave-stdin-open[=false]: If the pod is started in interactive mode or with stdin, leave stdin open after the first attach completes. By default, stdin will be closed after the first attach completes.
|
||||
--limits="": The resource requirement limits for this container. For example, 'cpu=200m,memory=512Mi'
|
||||
--limits="": The resource requirement limits for this container. For example, 'cpu=200m,memory=512Mi'. Note that server side components may assign limits depending on the server configuration, such as limit ranges.
|
||||
--no-headers[=false]: When using the default output, don't print headers.
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.2/docs/user-guide/jsonpath.md].
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.3/docs/user-guide/jsonpath.md].
|
||||
--output-version="": Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
|
||||
--overrides="": An inline JSON override for the generated object. If this is non-empty, it is used to override the generated object. Requires that the object supply a valid apiVersion field.
|
||||
--port=-1: The port that this container exposes. If --expose is true, this is also the port used by the service that is created.
|
||||
--record[=false]: Record current kubectl command in the resource annotation.
|
||||
-r, --replicas=1: Number of replicas to create for this container. Default is 1.
|
||||
--requests="": The resource requirement requests for this container. For example, 'cpu=100m,memory=256Mi'
|
||||
--restart="Always": The restart policy for this Pod. Legal values [Always, OnFailure, Never]. If set to 'Always' a deployment is created for this pod, if set to OnFailure or Never, a job is created for this pod and --replicas must be 1. Default 'Always'
|
||||
--requests="": The resource requirement requests for this container. For example, 'cpu=100m,memory=256Mi'. Note that server side components may assign requests depending on the server configuration, such as limit ranges.
|
||||
--restart="Always": The restart policy for this Pod. Legal values [Always, OnFailure, Never]. If set to 'Always' a deployment is created for this pod, if set to 'OnFailure', a job is created for this pod, if set to 'Never', a regular pod is created. For the latter two --replicas must be 1. Default 'Always'
|
||||
--rm[=false]: If true, delete resources created in this command for attached containers.
|
||||
--save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
|
||||
--service-generator="service/v2": The name of the generator to use for creating a service. Only used if --expose is true
|
||||
@@ -81,13 +82,14 @@ kubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'print
|
||||
--sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
|
||||
-i, --stdin[=false]: Keep stdin open on the container(s) in the pod, even if nothing is attached.
|
||||
--template="": Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
|
||||
--tty[=false]: Allocated a TTY for each container in the pod. Because -t is currently shorthand for --template, -t is not supported for --tty. This shorthand is deprecated and we expect to adopt -t for --tty soon.
|
||||
-t, --tty[=false]: Allocated a TTY for each container in the pod.
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -113,7 +115,14 @@ kubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'print
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 11-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
|
||||
## kubectl scale
|
||||
|
||||
Set a new size for a Replication Controller, Job, or Deployment.
|
||||
Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job.
|
||||
|
||||
### Synopsis
|
||||
|
||||
|
||||
Set a new size for a Replication Controller, Job, or Deployment.
|
||||
Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job.
|
||||
|
||||
Scale also allows users to specify one or more preconditions for the scale action.
|
||||
If --current-replicas or --resource-version is specified, it is validated before the
|
||||
@@ -22,8 +22,8 @@ kubectl scale [--resource-version=version] [--current-replicas=count] --replicas
|
||||
### Examples
|
||||
|
||||
```
|
||||
# Scale replication controller named 'foo' to 3.
|
||||
kubectl scale --replicas=3 rc/foo
|
||||
# Scale a replicaset named 'foo' to 3.
|
||||
kubectl scale --replicas=3 rs/foo
|
||||
|
||||
# Scale a resource identified by type and name specified in "foo.yaml" to 3.
|
||||
kubectl scale --replicas=3 -f foo.yaml
|
||||
@@ -43,8 +43,10 @@ kubectl scale --replicas=3 job/cron
|
||||
```
|
||||
--current-replicas=-1: Precondition for current size. Requires that the current size of the resource match this value in order to scale.
|
||||
-f, --filename=[]: Filename, directory, or URL to a file identifying the resource to set a new size
|
||||
--include-extended-apis[=true]: If true, include definitions of new APIs via calls to the API server. [default true]
|
||||
-o, --output="": Output mode. Use "-o name" for shorter output (resource/name).
|
||||
--record[=false]: Record current kubectl command in the resource annotation.
|
||||
-R, --recursive[=false]: Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
|
||||
--replicas=-1: The new desired number of replicas. Required.
|
||||
--resource-version="": Precondition for resource version. Requires that the current resource version match this value in order to scale.
|
||||
--timeout=0: The length of time to wait before giving up on a scale operation, zero means don't wait.
|
||||
@@ -54,6 +56,7 @@ kubectl scale --replicas=3 job/cron
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
@@ -79,7 +82,14 @@ kubectl scale --replicas=3 job/cron
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
---
|
||||
---
|
||||
|
||||
## kubectl set
|
||||
|
||||
Set specific features on objects
|
||||
|
||||
### Synopsis
|
||||
|
||||
|
||||
Configure application resources
|
||||
|
||||
These commands help you make changes to existing application resources.
|
||||
|
||||
```
|
||||
kubectl set SUBCOMMAND
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
--cluster="": The name of the kubeconfig cluster to use
|
||||
--context="": The name of the kubeconfig context to use
|
||||
--insecure-skip-tls-verify[=false]: If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
|
||||
--kubeconfig="": Path to the kubeconfig file to use for CLI requests.
|
||||
--log-backtrace-at=:0: when logging hits line file:N, emit a stack trace
|
||||
--log-dir="": If non-empty, write log files in this directory
|
||||
--log-flush-frequency=5s: Maximum number of seconds between log flushes
|
||||
--logtostderr[=true]: log to standard error instead of files
|
||||
--match-server-version[=false]: Require server version to match client version
|
||||
--namespace="": If present, the namespace scope for this CLI request.
|
||||
--password="": Password for basic authentication to the API server.
|
||||
-s, --server="": The address and port of the Kubernetes API server
|
||||
--stderrthreshold=2: logs at or above this threshold go to stderr
|
||||
--token="": Bearer token for authentication to the API server.
|
||||
--user="": The name of the kubeconfig user to use
|
||||
--username="": Username for basic authentication to the API server.
|
||||
--v=0: log level for V logs
|
||||
--vmodule=: comma-separated list of pattern=N settings for file-filtered logging
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl set image](kubectl_set_image.md) - Update image of a pod template
|
||||
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
@@ -0,0 +1,94 @@
|
||||
---
|
||||
---
|
||||
|
||||
## kubectl set image
|
||||
|
||||
Update image of a pod template
|
||||
|
||||
### Synopsis
|
||||
|
||||
|
||||
Update existing container image(s) of resources.
|
||||
|
||||
Possible resources include (case insensitive):
|
||||
pod (po), replicationcontroller (rc), deployment, daemonset (ds), job, replicaset (rs)
|
||||
|
||||
```
|
||||
kubectl set image (-f FILENAME | TYPE NAME) CONTAINER_NAME_1=CONTAINER_IMAGE_1 ... CONTAINER_NAME_N=CONTAINER_IMAGE_N
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
```
|
||||
# Set a deployment's nginx container image to 'nginx:1.9.1', and its busybox container image to 'busybox'.
|
||||
kubectl set image deployment/nginx busybox=busybox nginx=nginx:1.9.1
|
||||
|
||||
# Update all deployments' and rc's nginx container's image to 'nginx:1.9.1'
|
||||
kubectl set image deployments,rc nginx=nginx:1.9.1 --all
|
||||
|
||||
# Update image of all containers of daemonset abc to 'nginx:1.9.1'
|
||||
kubectl set image daemonset abc *=nginx:1.9.1
|
||||
|
||||
# Print result (in yaml format) of updating nginx container image from local file, without hitting the server
|
||||
kubectl set image -f path/to/file.yaml nginx=nginx:1.9.1 --local -o yaml
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
--all[=false]: select all resources in the namespace of the specified resource types
|
||||
-f, --filename=[]: Filename, directory, or URL to a file identifying the resource to get from a server.
|
||||
--local[=false]: If true, set image will NOT contact api-server but run locally.
|
||||
--no-headers[=false]: When using the default output, don't print headers.
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.3/docs/user-guide/jsonpath.md].
|
||||
--output-version="": Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
|
||||
--record[=false]: Record current kubectl command in the resource annotation.
|
||||
-R, --recursive[=false]: Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
|
||||
-l, --selector="": Selector (label query) to filter on
|
||||
-a, --show-all[=false]: When printing, show all resources (default hide terminated pods.)
|
||||
--show-labels[=false]: When printing, show all labels as the last column (default hide labels column)
|
||||
--sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
|
||||
--template="": Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
--cluster="": The name of the kubeconfig cluster to use
|
||||
--context="": The name of the kubeconfig context to use
|
||||
--insecure-skip-tls-verify[=false]: If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
|
||||
--kubeconfig="": Path to the kubeconfig file to use for CLI requests.
|
||||
--log-backtrace-at=:0: when logging hits line file:N, emit a stack trace
|
||||
--log-dir="": If non-empty, write log files in this directory
|
||||
--log-flush-frequency=5s: Maximum number of seconds between log flushes
|
||||
--logtostderr[=true]: log to standard error instead of files
|
||||
--match-server-version[=false]: Require server version to match client version
|
||||
--namespace="": If present, the namespace scope for this CLI request.
|
||||
--password="": Password for basic authentication to the API server.
|
||||
-s, --server="": The address and port of the Kubernetes API server
|
||||
--stderrthreshold=2: logs at or above this threshold go to stderr
|
||||
--token="": Bearer token for authentication to the API server.
|
||||
--user="": The name of the kubeconfig user to use
|
||||
--username="": Username for basic authentication to the API server.
|
||||
--v=0: log level for V logs
|
||||
--vmodule=: comma-separated list of pattern=N settings for file-filtered logging
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl set](kubectl_set.md) - Set specific features on objects
|
||||
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
@@ -78,6 +78,14 @@ $ kubectl stop -f path/to/resources
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](/docs/user-guide/kubectl/kubectl/) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 24-Nov-2015
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
---
|
||||
---
|
||||
|
||||
## kubectl taint
|
||||
|
||||
Update the taints on one or more nodes
|
||||
|
||||
### Synopsis
|
||||
|
||||
|
||||
Update the taints on one or more nodes.
|
||||
|
||||
A taint consists of a key, value, and effect. As an argument here, it is expressed as key=value:effect.
|
||||
The key must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to 253 characters.
|
||||
The value must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to 253 characters.
|
||||
The effect must be NoSchedule or PreferNoSchedule.
|
||||
Currently taint can only apply to node.
|
||||
|
||||
```
|
||||
kubectl taint NODE NAME KEY_1=VAL_1:TAINT_EFFECT_1 ... KEY_N=VAL_N:TAINT_EFFECT_N
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
```
|
||||
# Update node 'foo' with a taint with key 'dedicated' and value 'special-user' and effect 'NoSchedule'.
|
||||
# If a taint with that key already exists, its value and effect are replaced as specified.
|
||||
kubectl taint nodes foo dedicated=special-user:NoSchedule
|
||||
# Remove from node 'foo' the taint with key 'dedicated' if one exists.
|
||||
kubectl taint nodes foo dedicated-
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
--all[=false]: select all nodes in the cluster
|
||||
--include-extended-apis[=true]: If true, include definitions of new APIs via calls to the API server. [default true]
|
||||
--no-headers[=false]: When using the default output, don't print headers.
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/release-1.3/docs/user-guide/jsonpath.md].
|
||||
--output-version="": Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
|
||||
--overwrite[=false]: If true, allow taints to be overwritten, otherwise reject taint updates that overwrite existing taints.
|
||||
--schema-cache-dir="~/.kube/schema": If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
|
||||
-l, --selector="": Selector (label query) to filter on
|
||||
-a, --show-all[=false]: When printing, show all resources (default hide terminated pods.)
|
||||
--show-labels[=false]: When printing, show all labels as the last column (default hide labels column)
|
||||
--sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
|
||||
--template="": Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
|
||||
--validate[=true]: If true, use a schema to validate the input before sending it
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--as="": Username to impersonate for the operation.
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
--cluster="": The name of the kubeconfig cluster to use
|
||||
--context="": The name of the kubeconfig context to use
|
||||
--insecure-skip-tls-verify[=false]: If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
|
||||
--kubeconfig="": Path to the kubeconfig file to use for CLI requests.
|
||||
--log-backtrace-at=:0: when logging hits line file:N, emit a stack trace
|
||||
--log-dir="": If non-empty, write log files in this directory
|
||||
--log-flush-frequency=5s: Maximum number of seconds between log flushes
|
||||
--logtostderr[=true]: log to standard error instead of files
|
||||
--match-server-version[=false]: Require server version to match client version
|
||||
--namespace="": If present, the namespace scope for this CLI request.
|
||||
--password="": Password for basic authentication to the API server.
|
||||
-s, --server="": The address and port of the Kubernetes API server
|
||||
--stderrthreshold=2: logs at or above this threshold go to stderr
|
||||
--token="": Bearer token for authentication to the API server.
|
||||
--user="": The name of the kubeconfig user to use
|
||||
--username="": Username for basic authentication to the API server.
|
||||
--v=0: log level for V logs
|
||||
--vmodule=: comma-separated list of pattern=N settings for file-filtered logging
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 12-Aug-2016
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user