diff --git a/docs/api-reference/v1.8/index.html b/docs/api-reference/v1.8/index.html index 163546ea4d..2a872fcac1 100644 --- a/docs/api-reference/v1.8/index.html +++ b/docs/api-reference/v1.8/index.html @@ -11,7 +11,7 @@
- +| apps | -v1beta1 | +v1beta2 | StatefulSet |
DEPRECATED - This group version of StatefulSet is deprecated by apps/v1beta2/StatefulSet. See the release notes for more information. StatefulSet represents a set of pods with consistent identities. Identities are defined as:
+StatefulSet represents a set of pods with consistent identities. Identities are defined as:
| spec StatefulSetSpec |
+spec StatefulSetSpec |
Spec defines the desired identities of pods in this set. |
| status StatefulSetStatus |
+status StatefulSetStatus |
Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time. |
| template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet. | ||
| updateStrategy StatefulSetUpdateStrategy |
+updateStrategy StatefulSetUpdateStrategy |
updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. |
| APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| items StatefulSet array |
+items StatefulSet array |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| body StatefulSet |
+body StatefulSet |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 StatefulSet |
+200 StatefulSet |
OK |
| 200 StatefulSet |
+200 StatefulSet |
OK |
| body StatefulSet |
+body StatefulSet |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 StatefulSet |
+200 StatefulSet |
OK |
| 200 StatefulSet |
+200 StatefulSet |
OK |
| 200 StatefulSetList |
+200 StatefulSetList |
OK |
| 200 StatefulSetList |
+200 StatefulSetList |
OK |
| 200 StatefulSet |
+200 StatefulSet |
OK |
| 200 StatefulSet |
+200 StatefulSet |
OK |
| body StatefulSet |
+body StatefulSet |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 StatefulSet |
+200 StatefulSet |
OK |
| apps | -v1beta1 | +v1beta2 | ControllerRevision |
DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1beta2/ControllerRevision. See the release notes for more information. ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.
+ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.
| APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| items ControllerRevision array |
+items ControllerRevision array |
Items is the list of ControllerRevisions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| body ControllerRevision |
+body ControllerRevision |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 ControllerRevision |
+200 ControllerRevision |
OK |
| 200 ControllerRevision |
+200 ControllerRevision |
OK |
| body ControllerRevision |
+body ControllerRevision |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 ControllerRevision |
+200 ControllerRevision |
OK |
| 200 ControllerRevision |
+200 ControllerRevision |
OK |
| 200 ControllerRevisionList |
+200 ControllerRevisionList |
OK |
| 200 ControllerRevisionList |
+200 ControllerRevisionList |
OK |
| extensions | -v1beta1 | -DaemonSet | -
DEPRECATED - This group version of DaemonSet is deprecated by apps/v1beta2/DaemonSet. See the release notes for more information. DaemonSet represents the configuration of a daemon set.
- - -| Field | -Description | -
|---|---|
| apiVersion string |
-APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources | -
| kind string |
-Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds | -
| metadata ObjectMeta |
-Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata | -
| spec DaemonSetSpec |
-The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status | -
| status DaemonSetStatus |
-The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status | -
| Group | -Version | -Kind | -||
|---|---|---|---|---|
| extensions | -v1beta1 | +apps | +v1beta2 | DaemonSetUpdateStrategy |
DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.
| rollingUpdate RollingUpdateDaemonSet |
+rollingUpdate RollingUpdateDaemonSet |
Rolling update config params. Present only if type = "RollingUpdate". |
| type string |
-Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is OnDelete. | +Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate. |
| apps | -v1beta1 | -Deployment | -
DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets.
- - -| Field | -Description | -
|---|---|
| apiVersion string |
-APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources | -
| kind string |
-Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds | -
| metadata ObjectMeta |
-Standard object metadata. | -
| spec DeploymentSpec |
-Specification of the desired behavior of the Deployment. | -
| status DeploymentStatus |
-Most recently observed status of the Deployment. | -
| Group | -Version | -Kind | -|
|---|---|---|---|
| apps | -v1beta1 | +v1beta2 | DeploymentCondition |
DeploymentCondition describes the state of a deployment at a certain point.
Scale represents a scaling request for a resource.
| apps | -v1beta1 | +v1beta2 | StatefulSetUpdateStrategy |
StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.
| rollingUpdate RollingUpdateStatefulSetStrategy |
+rollingUpdate RollingUpdateStatefulSetStrategy |
RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. |
| type string |
-Type indicates the type of the StatefulSetUpdateStrategy. | +Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate. |
| apps | -v1beta2 | +v1beta1 | ControllerRevision |
ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.
+DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1beta2/ControllerRevision. See the release notes for more information. ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.
| APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| items ControllerRevision array |
+items ControllerRevision array |
Items is the list of ControllerRevisions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| body ControllerRevision |
+body ControllerRevision |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 ControllerRevision |
+200 ControllerRevision |
OK |
| 200 ControllerRevision |
+200 ControllerRevision |
OK |
| body ControllerRevision |
+body ControllerRevision |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 ControllerRevision |
+200 ControllerRevision |
OK |
| 200 ControllerRevision |
+200 ControllerRevision |
OK |
| 200 ControllerRevisionList |
+200 ControllerRevisionList |
OK |
| 200 ControllerRevisionList |
+200 ControllerRevisionList |
OK |
--DaemonSet Config to print the
-hostnameon each Node in the cluster every 10 seconds.
-apiVersion: extensions/v1beta1
-kind: DaemonSet
-metadata:
- # Unique key of the DaemonSet instance
- name: daemonset-example
-spec:
- template:
- metadata:
- labels:
- app: daemonset-example
- spec:
- containers:
- # This container is run once on each Node in the cluster
- - name: daemonset-example
- image: ubuntu:trusty
- command:
- - /bin/sh
- args:
- - -c
- # This script is run through `sh -c <script>`
- - >-
- while [ true ]; do
- echo "DaemonSet running on $(hostname)" ;
- sleep 10 ;
- done
-
---DaemonSet Config to print the
-hostnameon each Node in the cluster every 10 seconds.
-apiVersion: extensions/v1beta1
-kind: DaemonSet
-metadata:
- # Unique key of the DaemonSet instance
- name: daemonset-example
-spec:
- template:
- metadata:
- labels:
- app: daemonset-example
- spec:
- containers:
- # This container is run once on each Node in the cluster
- - name: daemonset-example
- image: ubuntu:trusty
- command:
- - /bin/sh
- args:
- - -c
- # This script is run through `sh -c <script>`
- - >-
- while [ true ]; do
- echo "DaemonSet running on $(hostname)" ;
- sleep 10 ;
- done
-
+| apps | -v1beta2 | +extensions | +v1beta1 | DaemonSet |
DaemonSet represents the configuration of a daemon set.
+DEPRECATED - This group version of DaemonSet is deprecated by apps/v1beta2/DaemonSet. See the release notes for more information. DaemonSet represents the configuration of a daemon set.
| Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata | ||
| spec DaemonSetSpec |
+spec DaemonSetSpec |
The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status |
| status DaemonSetStatus |
+status DaemonSetStatus |
The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status |
| An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template | ||
| updateStrategy DaemonSetUpdateStrategy |
+templateGeneration integer |
+DEPRECATED. A sequence number representing a specific generation of the template. Populated by the system. It can be set only during the creation. | +
| updateStrategy DaemonSetUpdateStrategy |
An update strategy to replace existing DaemonSet pods with new pods. |
| APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources | ||
| items DaemonSet array |
+items DaemonSet array |
A list of daemon sets. |
| body DaemonSet |
+body DaemonSet |
|||
| 200 DaemonSet |
+200 DaemonSet |
OK |
| 200 DaemonSet |
+200 DaemonSet |
OK |
| body DaemonSet |
+body DaemonSet |
|||
| 200 DaemonSet |
+200 DaemonSet |
OK |
| 200 DaemonSet |
+200 DaemonSet |
OK |
| 200 DaemonSetList |
+200 DaemonSetList |
OK |
| 200 DaemonSetList |
+200 DaemonSetList |
OK |
| 200 DaemonSet |
+200 DaemonSet |
OK |
| 200 DaemonSet |
+200 DaemonSet |
OK |
| body DaemonSet |
+body DaemonSet |
|
| 200 DaemonSet |
+200 DaemonSet |
OK |
| apps | -v1beta2 | +extensions | +v1beta1 | DaemonSetUpdateStrategy |
DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.
| rollingUpdate RollingUpdateDaemonSet |
+rollingUpdate RollingUpdateDaemonSet |
Rolling update config params. Present only if type = "RollingUpdate". |
| type string |
-Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate. | +Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is OnDelete. | +
| Group | +Version | +Kind | +
|---|---|---|
| apps | +v1beta1 | +Deployment | +
DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets.
+ + +| Field | +Description | +
|---|---|
| apiVersion string |
+APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources | +
| kind string |
+Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds | +
| metadata ObjectMeta |
+Standard object metadata. | +
| spec DeploymentSpec |
+Specification of the desired behavior of the Deployment. | +
| status DeploymentStatus |
+Most recently observed status of the Deployment. | +
| Field | +Description | +
|---|---|
| minReadySeconds integer |
+Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) | +
| paused boolean |
+Indicates that the deployment is paused. | +
| progressDeadlineSeconds integer |
+The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s. | +
| replicas integer |
+Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. | +
| revisionHistoryLimit integer |
+The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 2. | +
| rollbackTo RollbackConfig |
+DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done. | +
| selector LabelSelector |
+Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. | +
| strategy DeploymentStrategy |
+The deployment strategy to use to replace existing pods with new ones. | +
| template PodTemplateSpec |
+Template describes the pods that will be created. | +
| Field | +Description | +
|---|---|
| availableReplicas integer |
+Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. | +
| collisionCount integer |
+Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet. | +
| conditions DeploymentCondition array patch type: merge patch merge key: type |
+Represents the latest available observations of a deployment's current state. | +
| observedGeneration integer |
+The generation observed by the deployment controller. | +
| readyReplicas integer |
+Total number of ready pods targeted by this deployment. | +
| replicas integer |
+Total number of non-terminated pods targeted by this deployment (their labels match the selector). | +
| unavailableReplicas integer |
+Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created. | +
| updatedReplicas integer |
+Total number of non-terminated pods targeted by this deployment that have the desired template spec. | +
| Field | +Description | +
|---|---|
| apiVersion string |
+APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources | +
| items Deployment array |
+Items is the list of Deployments. | +
| kind string |
+Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds | +
| metadata ListMeta |
+Standard list metadata. | +
| Field | +Description | +
|---|---|
| rollingUpdate RollingUpdateDeployment |
+Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. | +
| type string |
+Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. | +
| Field | +Description | +
|---|---|
| apiVersion string |
+APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources | +
| kind string |
+Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds | +
| name string |
+Required: This must match the Name of a deployment. | +
| rollbackTo RollbackConfig |
+The config of this deployment rollback. | +
| updatedAnnotations object |
+The annotations to be updated to a deployment | +
| Field | +Description | +
|---|---|
| maxSurge | +The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. | +
| maxUnavailable | +The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. | +
See supported operations below...
++++
kubectlCommand
+$ echo 'apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+ name: deployment-example
+spec:
+ replicas: 3
+ revisionHistoryLimit: 10
+ template:
+ metadata:
+ labels:
+ app: nginx
+ spec:
+ containers:
+ - name: nginx
+ image: nginx:1.10
+ ports:
+ - containerPort: 80
+' | kubectl create -f -
+
++++
curlCommand (requireskubectl proxyto be running)
+$ kubectl proxy
+$ curl -X POST -H 'Content-Type: application/yaml' --data '
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+ name: deployment-example
+spec:
+ replicas: 3
+ revisionHistoryLimit: 10
+ template:
+ metadata:
+ labels:
+ app: nginx
+ spec:
+ containers:
+ - name: nginx
+ image: nginx:1.10
+ ports:
+ - containerPort: 80
+' http://127.0.0.1:8001/apis/apps/v1beta1/namespaces/default/deployments
+
+++Output
+
+deployment "deployment-example" created
+
+++Response Body
+
+{
+ "kind": "Deployment",
+ "apiVersion": "apps/v1beta1",
+ "metadata": {
+ "name": "deployment-example",
+ "namespace": "default",
+ "selfLink": "/apis/apps/v1beta1/namespaces/default/deployments/deployment-example",
+ "uid": "4ccca349-9cb1-11e6-9c54-42010a800148",
+ "resourceVersion": "2118306",
+ "generation": 1,
+ "creationTimestamp": "2016-10-28T01:53:19Z",
+ "labels": {
+ "app": "nginx"
+ }
+ },
+ "spec": {
+ "replicas": 3,
+ "selector": {
+ "matchLabels": {
+ "app": "nginx"
+ }
+ },
+ "template": {
+ "metadata": {
+ "creationTimestamp": null,
+ "labels": {
+ "app": "nginx"
+ }
+ },
+ "spec": {
+ "containers": [
+ {
+ "name": "nginx",
+ "image": "nginx:1.10",
+ "ports": [
+ {
+ "containerPort": 80,
+ "protocol": "TCP"
+ }
+ ],
+ "resources": {},
+ "terminationMessagePath": "/dev/termination-log",
+ "imagePullPolicy": "IfNotPresent"
+ }
+ ],
+ "restartPolicy": "Always",
+ "terminationGracePeriodSeconds": 30,
+ "dnsPolicy": "ClusterFirst",
+ "securityContext": {}
+ }
+ },
+ "strategy": {
+ "type": "RollingUpdate",
+ "rollingUpdate": {
+ "maxUnavailable": 1,
+ "maxSurge": 1
+ }
+ },
+ "revisionHistoryLimit": 10
+ },
+ "status": {}
+}
+
+create a Deployment
+POST /apis/apps/v1beta1/namespaces/{namespace}/deployments
| Parameter | +Description | +
|---|---|
| namespace | +object name and auth scope, such as for teams and projects | +
| Parameter | +Description | +
|---|---|
| pretty | +If 'true', then the output is pretty printed. | +
| Parameter | +Description | +
|---|---|
| body Deployment |
++ |
| Code | +Description | +
|---|---|
| 200 Deployment |
+OK | +
+++
kubectlCommand
+$ kubectl patch deployment deployment-example -p \
+ '{"spec":{"template":{"spec":{"containers":[{"name":"nginx","image":"nginx:1.11"}]}}}}'
+
++++
curlCommand (requireskubectl proxyto be running)
+$ kubectl proxy
+$ curl -X PATCH -H 'Content-Type: application/strategic-merge-patch+json' --data '
+{"spec":{"template":{"spec":{"containers":[{"name":"nginx","image":"nginx:1.11"}]}}}}' \
+ 'http://127.0.0.1:8001/apis/apps/v1beta1/namespaces/default/deployments/deployment-example'
+
+++Output
+
+"deployment-example" patched
+
+++Response Body
+
+{
+ "kind": "Deployment",
+ "apiVersion": "apps/v1beta1",
+ "metadata": {
+ "name": "deployment-example",
+ "namespace": "default",
+ "selfLink": "/apis/apps/v1beta1/namespaces/default/deployments/deployment-example",
+ "uid": "5dc3a8e6-b0ee-11e6-aef0-42010af00229",
+ "resourceVersion": "164489",
+ "generation": 11,
+ "creationTimestamp": "2016-11-22T20:00:50Z",
+ "labels": {
+ "app": "nginx"
+ },
+ "annotations": {
+ "deployment.kubernetes.io/revision": "5"
+ }
+ },
+ "spec": {
+ "replicas": 3,
+ "selector": {
+ "matchLabels": {
+ "app": "nginx"
+ }
+ },
+ "template": {
+ "metadata": {
+ "creationTimestamp": null,
+ "labels": {
+ "app": "nginx"
+ }
+ },
+ "spec": {
+ "containers": [
+ {
+ "name": "nginx",
+ "image": "nginx:1.11",
+ "ports": [
+ {
+ "containerPort": 80,
+ "protocol": "TCP"
+ }
+ ],
+ "resources": {},
+ "terminationMessagePath": "/dev/termination-log",
+ "imagePullPolicy": "IfNotPresent"
+ }
+ ],
+ "restartPolicy": "Always",
+ "terminationGracePeriodSeconds": 30,
+ "dnsPolicy": "ClusterFirst",
+ "securityContext": {}
+ }
+ },
+ "strategy": {
+ "type": "RollingUpdate",
+ "rollingUpdate": {
+ "maxUnavailable": 1,
+ "maxSurge": 1
+ }
+ },
+ "revisionHistoryLimit": 10
+ },
+ "status": {
+ "observedGeneration": 10,
+ "replicas": 3,
+ "updatedReplicas": 3,
+ "availableReplicas": 3
+ }
+}
+
+partially update the specified Deployment
+PATCH /apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}
| Parameter | +Description | +
|---|---|
| name | +name of the Deployment | +
| namespace | +object name and auth scope, such as for teams and projects | +
| Parameter | +Description | +
|---|---|
| pretty | +If 'true', then the output is pretty printed. | +
| Parameter | +Description | +
|---|---|
| body Patch |
++ |
| Code | +Description | +
|---|---|
| 200 Deployment |
+OK | +
+++
kubectlCommand
+$ echo 'apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+ name: deployment-example
+spec:
+ replicas: 3
+ revisionHistoryLimit: 10
+ template:
+ metadata:
+ labels:
+ app: nginx
+ spec:
+ containers:
+ - name: nginx
+ image: nginx:1.11
+ ports:
+ - containerPort: 80
+' | kubectl replace -f -
+
++++
curlCommand (requireskubectl proxyto be running)
+$ kubectl proxy
+$ curl -X PUT -H 'Content-Type: application/yaml' --data '
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+ name: deployment-example
+spec:
+ replicas: 3
+ revisionHistoryLimit: 10
+ template:
+ metadata:
+ labels:
+ app: nginx
+ spec:
+ containers:
+ - name: nginx
+ image: nginx:1.11
+ ports:
+ - containerPort: 80
+' http://127.0.0.1:8001/apis/apps/v1beta1/namespaces/default/deployments/deployment-example
+
+++Output
+
+deployment "deployment-example" replaced
+
+++Response Body
+
+{
+ "kind": "Deployment",
+ "apiVersion": "apps/v1beta1",
+ "metadata": {
+ "name": "deployment-example",
+ "namespace": "default",
+ "selfLink": "/apis/apps/v1beta1/namespaces/default/deployments/deployment-example",
+ "uid": "4ccca349-9cb1-11e6-9c54-42010a800148",
+ "resourceVersion": "2119082",
+ "generation": 5,
+ "creationTimestamp": "2016-10-28T01:53:19Z",
+ "labels": {
+ "app": "nginx"
+ }
+ },
+ "spec": {
+ "replicas": 3,
+ "selector": {
+ "matchLabels": {
+ "app": "nginx"
+ }
+ },
+ "template": {
+ "metadata": {
+ "creationTimestamp": null,
+ "labels": {
+ "app": "nginx"
+ }
+ },
+ "spec": {
+ "containers": [
+ {
+ "name": "nginx",
+ "image": "nginx:1.11",
+ "ports": [
+ {
+ "containerPort": 80,
+ "protocol": "TCP"
+ }
+ ],
+ "resources": {},
+ "terminationMessagePath": "/dev/termination-log",
+ "imagePullPolicy": "IfNotPresent"
+ }
+ ],
+ "restartPolicy": "Always",
+ "terminationGracePeriodSeconds": 30,
+ "dnsPolicy": "ClusterFirst",
+ "securityContext": {}
+ }
+ },
+ "strategy": {
+ "type": "RollingUpdate",
+ "rollingUpdate": {
+ "maxUnavailable": 1,
+ "maxSurge": 1
+ }
+ },
+ "revisionHistoryLimit": 10
+ },
+ "status": {
+ "observedGeneration": 4,
+ "replicas": 3,
+ "updatedReplicas": 3,
+ "availableReplicas": 3
+ }
+}
+
+replace the specified Deployment
+PUT /apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}
| Parameter | +Description | +
|---|---|
| name | +name of the Deployment | +
| namespace | +object name and auth scope, such as for teams and projects | +
| Parameter | +Description | +
|---|---|
| pretty | +If 'true', then the output is pretty printed. | +
| Parameter | +Description | +
|---|---|
| body Deployment |
++ |
| Code | +Description | +
|---|---|
| 200 Deployment |
+OK | +
+++
kubectlCommand
+$ kubectl delete deployment deployment-example
+
++++
curlCommand (requireskubectl proxyto be running)
+$ kubectl proxy
+$ curl -X DELETE -H 'Content-Type: application/yaml' --data '
+gracePeriodSeconds: 0
+orphanDependents: false
+' 'http://127.0.0.1:8001/apis/apps/v1beta1/namespaces/default/deployments/deployment-example'
+
+++Output
+
+deployment "deployment-example" deleted
+
+++Response Body
+
+{
+ "kind": "Status",
+ "apiVersion": "v1",
+ "metadata": {},
+ "status": "Success",
+ "code": 200
+}
+
+delete a Deployment
+DELETE /apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}
| Parameter | +Description | +
|---|---|
| name | +name of the Deployment | +
| namespace | +object name and auth scope, such as for teams and projects | +
| Parameter | +Description | +
|---|---|
| pretty | +If 'true', then the output is pretty printed. | +
| gracePeriodSeconds | +The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | +
| orphanDependents | +Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | +
| propagationPolicy | +Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. | +
| Parameter | +Description | +
|---|---|
| body DeleteOptions |
++ |
| Code | +Description | +
|---|---|
| 200 Status |
+OK | +
+++
kubectlCommand
+Coming Soon
+
++++
curlCommand (requireskubectl proxyto be running)
+Coming Soon
+
+++Output
+
+Coming Soon
+
+++Response Body
+
+Coming Soon
+
+delete collection of Deployment
+DELETE /apis/apps/v1beta1/namespaces/{namespace}/deployments
| Parameter | +Description | +
|---|---|
| namespace | +object name and auth scope, such as for teams and projects | +
| Parameter | +Description | +
|---|---|
| pretty | +If 'true', then the output is pretty printed. | +
| continue | +The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | +
| fieldSelector | +A selector to restrict the list of returned objects by their fields. Defaults to everything. | +
| includeUninitialized | +If true, partially initialized resources are included in the response. | +
| labelSelector | +A selector to restrict the list of returned objects by their labels. Defaults to everything. | +
| limit | +limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. |
+
| resourceVersion | +When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. | +
| timeoutSeconds | +Timeout for the list/watch call. | +
| watch | +Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. | +
| Code | +Description | +
|---|---|
| 200 Status |
+OK | +
See supported operations below...
++++
kubectlCommand
+$ kubectl get deployment deployment-example -o json
+
++++
curlCommand (requireskubectl proxyto be running)
+$ kubectl proxy
+$ curl -X GET http://127.0.0.1:8001/apis/apps/v1beta1/namespaces/default/deployments/deployment-example
+
+++Output
+
+{
+ "kind": "Deployment",
+ "apiVersion": "apps/v1beta1",
+ "metadata": {
+ "name": "deployment-example",
+ "namespace": "default",
+ "selfLink": "/apis/apps/v1beta1/namespaces/default/deployments/deployment-example",
+ "uid": "1b33145a-9c63-11e6-9c54-42010a800148",
+ "resourceVersion": "2064726",
+ "generation": 4,
+ "creationTimestamp": "2016-10-27T16:33:35Z",
+ "labels": {
+ "app": "nginx"
+ },
+ "annotations": {
+ "deployment.kubernetes.io/revision": "1"
+ }
+ },
+ "spec": {
+ "replicas": 3,
+ "selector": {
+ "matchLabels": {
+ "app": "nginx"
+ }
+ },
+ "template": {
+ "metadata": {
+ "creationTimestamp": null,
+ "labels": {
+ "app": "nginx"
+ }
+ },
+ "spec": {
+ "containers": [
+ {
+ "name": "nginx",
+ "image": "nginx:1.10",
+ "ports": [
+ {
+ "containerPort": 80,
+ "protocol": "TCP"
+ }
+ ],
+ "resources": {},
+ "terminationMessagePath": "/dev/termination-log",
+ "imagePullPolicy": "IfNotPresent"
+ }
+ ],
+ "restartPolicy": "Always",
+ "terminationGracePeriodSeconds": 30,
+ "dnsPolicy": "ClusterFirst",
+ "securityContext": {}
+ }
+ },
+ "strategy": {
+ "type": "RollingUpdate",
+ "rollingUpdate": {
+ "maxUnavailable": 1,
+ "maxSurge": 1
+ }
+ }
+ },
+ "status": {
+ "observedGeneration": 4,
+ "replicas": 3,
+ "updatedReplicas": 3,
+ "availableReplicas": 3
+ }
+}
+
+++Response Body
+
+{
+ "kind": "Deployment",
+ "apiVersion": "apps/v1beta1",
+ "metadata": {
+ "name": "deployment-example",
+ "namespace": "default",
+ "selfLink": "/apis/apps/v1beta1/namespaces/default/deployments/deployment-example",
+ "uid": "1b33145a-9c63-11e6-9c54-42010a800148",
+ "resourceVersion": "2064726",
+ "generation": 4,
+ "creationTimestamp": "2016-10-27T16:33:35Z",
+ "labels": {
+ "app": "nginx"
+ },
+ "annotations": {
+ "deployment.kubernetes.io/revision": "1"
+ }
+ },
+ "spec": {
+ "replicas": 3,
+ "selector": {
+ "matchLabels": {
+ "app": "nginx"
+ }
+ },
+ "template": {
+ "metadata": {
+ "creationTimestamp": null,
+ "labels": {
+ "app": "nginx"
+ }
+ },
+ "spec": {
+ "containers": [
+ {
+ "name": "nginx",
+ "image": "nginx:1.10",
+ "ports": [
+ {
+ "containerPort": 80,
+ "protocol": "TCP"
+ }
+ ],
+ "resources": {},
+ "terminationMessagePath": "/dev/termination-log",
+ "imagePullPolicy": "IfNotPresent"
+ }
+ ],
+ "restartPolicy": "Always",
+ "terminationGracePeriodSeconds": 30,
+ "dnsPolicy": "ClusterFirst",
+ "securityContext": {}
+ }
+ },
+ "strategy": {
+ "type": "RollingUpdate",
+ "rollingUpdate": {
+ "maxUnavailable": 1,
+ "maxSurge": 1
+ }
+ }
+ },
+ "status": {
+ "observedGeneration": 4,
+ "replicas": 3,
+ "updatedReplicas": 3,
+ "availableReplicas": 3
+ }
+}
+
+read the specified Deployment
+GET /apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}
| Parameter | +Description | +
|---|---|
| name | +name of the Deployment | +
| namespace | +object name and auth scope, such as for teams and projects | +
| Parameter | +Description | +
|---|---|
| pretty | +If 'true', then the output is pretty printed. | +
| exact | +Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. | +
| export | +Should this value be exported. Export strips fields that a user can not specify. | +
| Code | +Description | +
|---|---|
| 200 Deployment |
+OK | +
+++
kubectlCommand
+$ kubectl get deployment -o json
+
++++
curlCommand (requireskubectl proxyto be running)
+$ kubectl proxy
+$ curl -X GET 'http://127.0.0.1:8001/apis/apps/v1beta1/namespaces/default/deployments'
+
+++Output
+
+{
+ "kind": "List",
+ "apiVersion": "v1",
+ "metadata": {},
+ "items": [
+ {
+ "kind": "Deployment",
+ "apiVersion": "app/v1beta1",
+ "metadata": {
+ "name": "docs",
+ "namespace": "default",
+ "selfLink": "/apis/app/v1beta1/namespaces/default/deployments/docs",
+ "uid": "ef49e1d2-915e-11e6-be81-42010a80003f",
+ "resourceVersion": "1924126",
+ "generation": 21,
+ "creationTimestamp": "2016-10-13T16:06:00Z",
+ "labels": {
+ "run": "docs"
+ },
+ "annotations": {
+ "deployment.kubernetes.io/revision": "10",
+ "replicatingperfection.net/push-image": "true"
+ }
+ },
+ "spec": {
+ "replicas": 1,
+ "selector": {
+ "matchLabels": {
+ "run": "docs"
+ }
+ },
+ "template": {
+ "metadata": {
+ "creationTimestamp": null,
+ "labels": {
+ "auto-pushed-image-pwittrock/api-docs": "1477496453",
+ "run": "docs"
+ }
+ },
+ "spec": {
+ "containers": [
+ {
+ "name": "docs",
+ "image": "pwittrock/api-docs:v9",
+ "resources": {},
+ "terminationMessagePath": "/dev/termination-log",
+ "imagePullPolicy": "Always"
+ }
+ ],
+ "restartPolicy": "Always",
+ "terminationGracePeriodSeconds": 30,
+ "dnsPolicy": "ClusterFirst",
+ "securityContext": {}
+ }
+ },
+ "strategy": {
+ "type": "RollingUpdate",
+ "rollingUpdate": {
+ "maxUnavailable": 1,
+ "maxSurge": 1
+ }
+ }
+ },
+ "status": {
+ "observedGeneration": 21,
+ "replicas": 1,
+ "updatedReplicas": 1,
+ "availableReplicas": 1
+ }
+ },
+ {
+ "kind": "Deployment",
+ "apiVersion": "app/v1beta1",
+ "metadata": {
+ "name": "deployment-example",
+ "namespace": "default",
+ "selfLink": "/apis/app/v1beta1/namespaces/default/deployments/deployment-example",
+ "uid": "1b33145a-9c63-11e6-9c54-42010a800148",
+ "resourceVersion": "2064726",
+ "generation": 4,
+ "creationTimestamp": "2016-10-27T16:33:35Z",
+ "labels": {
+ "app": "nginx"
+ },
+ "annotations": {
+ "deployment.kubernetes.io/revision": "1"
+ }
+ },
+ "spec": {
+ "replicas": 3,
+ "selector": {
+ "matchLabels": {
+ "app": "nginx"
+ }
+ },
+ "template": {
+ "metadata": {
+ "creationTimestamp": null,
+ "labels": {
+ "app": "nginx"
+ }
+ },
+ "spec": {
+ "containers": [
+ {
+ "name": "nginx",
+ "image": "nginx:1.10",
+ "ports": [
+ {
+ "containerPort": 80,
+ "protocol": "TCP"
+ }
+ ],
+ "resources": {},
+ "terminationMessagePath": "/dev/termination-log",
+ "imagePullPolicy": "IfNotPresent"
+ }
+ ],
+ "restartPolicy": "Always",
+ "terminationGracePeriodSeconds": 30,
+ "dnsPolicy": "ClusterFirst",
+ "securityContext": {}
+ }
+ },
+ "strategy": {
+ "type": "RollingUpdate",
+ "rollingUpdate": {
+ "maxUnavailable": 1,
+ "maxSurge": 1
+ }
+ }
+ },
+ "status": {
+ "observedGeneration": 4,
+ "replicas": 3,
+ "updatedReplicas": 3,
+ "availableReplicas": 3
+ }
+ }
+ ]
+}
+
+++Response Body
+
+{
+ "kind": "List",
+ "apiVersion": "v1",
+ "metadata": {},
+ "items": [
+ {
+ "kind": "Deployment",
+ "apiVersion": "app/v1beta1",
+ "metadata": {
+ "name": "docs",
+ "namespace": "default",
+ "selfLink": "/apis/app/v1beta1/namespaces/default/deployments/docs",
+ "uid": "ef49e1d2-915e-11e6-be81-42010a80003f",
+ "resourceVersion": "1924126",
+ "generation": 21,
+ "creationTimestamp": "2016-10-13T16:06:00Z",
+ "labels": {
+ "run": "docs"
+ },
+ "annotations": {
+ "deployment.kubernetes.io/revision": "10",
+ "replicatingperfection.net/push-image": "true"
+ }
+ },
+ "spec": {
+ "replicas": 1,
+ "selector": {
+ "matchLabels": {
+ "run": "docs"
+ }
+ },
+ "template": {
+ "metadata": {
+ "creationTimestamp": null,
+ "labels": {
+ "auto-pushed-image-pwittrock/api-docs": "1477496453",
+ "run": "docs"
+ }
+ },
+ "spec": {
+ "containers": [
+ {
+ "name": "docs",
+ "image": "pwittrock/api-docs:v9",
+ "resources": {},
+ "terminationMessagePath": "/dev/termination-log",
+ "imagePullPolicy": "Always"
+ }
+ ],
+ "restartPolicy": "Always",
+ "terminationGracePeriodSeconds": 30,
+ "dnsPolicy": "ClusterFirst",
+ "securityContext": {}
+ }
+ },
+ "strategy": {
+ "type": "RollingUpdate",
+ "rollingUpdate": {
+ "maxUnavailable": 1,
+ "maxSurge": 1
+ }
+ }
+ },
+ "status": {
+ "observedGeneration": 21,
+ "replicas": 1,
+ "updatedReplicas": 1,
+ "availableReplicas": 1
+ }
+ },
+ {
+ "kind": "Deployment",
+ "apiVersion": "app/v1beta1",
+ "metadata": {
+ "name": "deployment-example",
+ "namespace": "default",
+ "selfLink": "/apis/app/v1beta1/namespaces/default/deployments/deployment-example",
+ "uid": "1b33145a-9c63-11e6-9c54-42010a800148",
+ "resourceVersion": "2064726",
+ "generation": 4,
+ "creationTimestamp": "2016-10-27T16:33:35Z",
+ "labels": {
+ "app": "nginx"
+ },
+ "annotations": {
+ "deployment.kubernetes.io/revision": "1"
+ }
+ },
+ "spec": {
+ "replicas": 3,
+ "selector": {
+ "matchLabels": {
+ "app": "nginx"
+ }
+ },
+ "template": {
+ "metadata": {
+ "creationTimestamp": null,
+ "labels": {
+ "app": "nginx"
+ }
+ },
+ "spec": {
+ "containers": [
+ {
+ "name": "nginx",
+ "image": "nginx:1.10",
+ "ports": [
+ {
+ "containerPort": 80,
+ "protocol": "TCP"
+ }
+ ],
+ "resources": {},
+ "terminationMessagePath": "/dev/termination-log",
+ "imagePullPolicy": "IfNotPresent"
+ }
+ ],
+ "restartPolicy": "Always",
+ "terminationGracePeriodSeconds": 30,
+ "dnsPolicy": "ClusterFirst",
+ "securityContext": {}
+ }
+ },
+ "strategy": {
+ "type": "RollingUpdate",
+ "rollingUpdate": {
+ "maxUnavailable": 1,
+ "maxSurge": 1
+ }
+ }
+ },
+ "status": {
+ "observedGeneration": 4,
+ "replicas": 3,
+ "updatedReplicas": 3,
+ "availableReplicas": 3
+ }
+ }
+ ]
+}
+
+list or watch objects of kind Deployment
+GET /apis/apps/v1beta1/namespaces/{namespace}/deployments
| Parameter | +Description | +
|---|---|
| namespace | +object name and auth scope, such as for teams and projects | +
| Parameter | +Description | +
|---|---|
| pretty | +If 'true', then the output is pretty printed. | +
| continue | +The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | +
| fieldSelector | +A selector to restrict the list of returned objects by their fields. Defaults to everything. | +
| includeUninitialized | +If true, partially initialized resources are included in the response. | +
| labelSelector | +A selector to restrict the list of returned objects by their labels. Defaults to everything. | +
| limit | +limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. |
+
| resourceVersion | +When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. | +
| timeoutSeconds | +Timeout for the list/watch call. | +
| watch | +Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. | +
| Code | +Description | +
|---|---|
| 200 DeploymentList |
+OK | +
+++
kubectlCommand
+Coming Soon
+
++++
curlCommand (requireskubectl proxyto be running)
+Coming Soon
+
+++Output
+
+Coming Soon
+
+++Response Body
+
+Coming Soon
+
+list or watch objects of kind Deployment
+GET /apis/apps/v1beta1/deployments
| Parameter | +Description | +
|---|---|
| continue | +The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | +
| fieldSelector | +A selector to restrict the list of returned objects by their fields. Defaults to everything. | +
| includeUninitialized | +If true, partially initialized resources are included in the response. | +
| labelSelector | +A selector to restrict the list of returned objects by their labels. Defaults to everything. | +
| limit | +limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. |
+
| pretty | +If 'true', then the output is pretty printed. | +
| resourceVersion | +When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. | +
| timeoutSeconds | +Timeout for the list/watch call. | +
| watch | +Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. | +
| Code | +Description | +
|---|---|
| 200 DeploymentList |
+OK | +
+++
kubectlCommand
+$ kubectl get deployment deployment-example --watch -o json
+
++++
curlCommand (requireskubectl proxyto be running)
+$ kubectl proxy
+$ curl -X GET 'http://127.0.0.1:8001/apis/apps/v1beta1/watch/namespaces/default/deployments/deployment-example'
+
+++Output
+
+{
+ "type": "ADDED",
+ "object": {
+ "kind": "Deployment",
+ "apiVersion": "apps/v1beta1",
+ "metadata": {
+ "name": "deployment-example",
+ "namespace": "default",
+ "selfLink": "/apis/apps/v1beta1/namespaces/default/deployments/deployment-example",
+ "uid": "64c12290-9cbf-11e6-9c54-42010a800148",
+ "resourceVersion": "2128095",
+ "generation": 2,
+ "creationTimestamp": "2016-10-28T03:34:12Z",
+ "labels": {
+ "app": "nginx"
+ },
+ "annotations": {
+ "deployment.kubernetes.io/revision": "3"
+ }
+ },
+ "spec": {
+ "replicas": 3,
+ "selector": {
+ "matchLabels": {
+ "app": "nginx"
+ }
+ },
+ "template": {
+ "metadata": {
+ "creationTimestamp": null,
+ "labels": {
+ "app": "nginx"
+ }
+ },
+ "spec": {
+ "containers": [
+ {
+ "name": "nginx",
+ "image": "nginx:1.10",
+ "ports": [
+ {
+ "containerPort": 80,
+ "protocol": "TCP"
+ }
+ ],
+ "resources": {
+ },
+ "terminationMessagePath": "/dev/termination-log",
+ "imagePullPolicy": "IfNotPresent"
+ }
+ ],
+ "restartPolicy": "Always",
+ "terminationGracePeriodSeconds": 30,
+ "dnsPolicy": "ClusterFirst",
+ "securityContext": {
+ }
+ }
+ },
+ "strategy": {
+ "type": "RollingUpdate",
+ "rollingUpdate": {
+ "maxUnavailable": 1,
+ "maxSurge": 1
+ }
+ }
+ },
+ "status": {
+ "observedGeneration": 2,
+ "replicas": 3,
+ "updatedReplicas": 3,
+ "availableReplicas": 3
+ }
+ }
+}
+
+++Response Body
+
+{
+ "type": "ADDED",
+ "object": {
+ "kind": "Deployment",
+ "apiVersion": "apps/v1beta1",
+ "metadata": {
+ "name": "deployment-example",
+ "namespace": "default",
+ "selfLink": "/apis/apps/v1beta1/namespaces/default/deployments/deployment-example",
+ "uid": "64c12290-9cbf-11e6-9c54-42010a800148",
+ "resourceVersion": "2128095",
+ "generation": 2,
+ "creationTimestamp": "2016-10-28T03:34:12Z",
+ "labels": {
+ "app": "nginx"
+ },
+ "annotations": {
+ "deployment.kubernetes.io/revision": "3"
+ }
+ },
+ "spec": {
+ "replicas": 3,
+ "selector": {
+ "matchLabels": {
+ "app": "nginx"
+ }
+ },
+ "template": {
+ "metadata": {
+ "creationTimestamp": null,
+ "labels": {
+ "app": "nginx"
+ }
+ },
+ "spec": {
+ "containers": [
+ {
+ "name": "nginx",
+ "image": "nginx:1.10",
+ "ports": [
+ {
+ "containerPort": 80,
+ "protocol": "TCP"
+ }
+ ],
+ "resources": {
+ },
+ "terminationMessagePath": "/dev/termination-log",
+ "imagePullPolicy": "IfNotPresent"
+ }
+ ],
+ "restartPolicy": "Always",
+ "terminationGracePeriodSeconds": 30,
+ "dnsPolicy": "ClusterFirst",
+ "securityContext": {
+ }
+ }
+ },
+ "strategy": {
+ "type": "RollingUpdate",
+ "rollingUpdate": {
+ "maxUnavailable": 1,
+ "maxSurge": 1
+ }
+ }
+ },
+ "status": {
+ "observedGeneration": 2,
+ "replicas": 3,
+ "updatedReplicas": 3,
+ "availableReplicas": 3
+ }
+ }
+}
+
+watch changes to an object of kind Deployment
+GET /apis/apps/v1beta1/watch/namespaces/{namespace}/deployments/{name}
| Parameter | +Description | +
|---|---|
| name | +name of the Deployment | +
| namespace | +object name and auth scope, such as for teams and projects | +
| Parameter | +Description | +
|---|---|
| continue | +The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | +
| fieldSelector | +A selector to restrict the list of returned objects by their fields. Defaults to everything. | +
| includeUninitialized | +If true, partially initialized resources are included in the response. | +
| labelSelector | +A selector to restrict the list of returned objects by their labels. Defaults to everything. | +
| limit | +limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. |
+
| pretty | +If 'true', then the output is pretty printed. | +
| resourceVersion | +When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. | +
| timeoutSeconds | +Timeout for the list/watch call. | +
| watch | +Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. | +
| Code | +Description | +
|---|---|
| 200 WatchEvent |
+OK | +
+++
kubectlCommand
+Coming Soon
+
++++
curlCommand (requireskubectl proxyto be running)
+Coming Soon
+
+++Output
+
+Coming Soon
+
+++Response Body
+
+Coming Soon
+
+watch individual changes to a list of Deployment
+GET /apis/apps/v1beta1/watch/namespaces/{namespace}/deployments
| Parameter | +Description | +
|---|---|
| namespace | +object name and auth scope, such as for teams and projects | +
| Parameter | +Description | +
|---|---|
| continue | +The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | +
| fieldSelector | +A selector to restrict the list of returned objects by their fields. Defaults to everything. | +
| includeUninitialized | +If true, partially initialized resources are included in the response. | +
| labelSelector | +A selector to restrict the list of returned objects by their labels. Defaults to everything. | +
| limit | +limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. |
+
| pretty | +If 'true', then the output is pretty printed. | +
| resourceVersion | +When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. | +
| timeoutSeconds | +Timeout for the list/watch call. | +
| watch | +Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. | +
| Code | +Description | +
|---|---|
| 200 WatchEvent |
+OK | +
+++
kubectlCommand
+Coming Soon
+
++++
curlCommand (requireskubectl proxyto be running)
+Coming Soon
+
+++Output
+
+Coming Soon
+
+++Response Body
+
+Coming Soon
+
+watch individual changes to a list of Deployment
+GET /apis/apps/v1beta1/watch/deployments
| Parameter | +Description | +
|---|---|
| continue | +The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | +
| fieldSelector | +A selector to restrict the list of returned objects by their fields. Defaults to everything. | +
| includeUninitialized | +If true, partially initialized resources are included in the response. | +
| labelSelector | +A selector to restrict the list of returned objects by their labels. Defaults to everything. | +
| limit | +limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. |
+
| pretty | +If 'true', then the output is pretty printed. | +
| resourceVersion | +When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. | +
| timeoutSeconds | +Timeout for the list/watch call. | +
| watch | +Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. | +
| Code | +Description | +
|---|---|
| 200 WatchEvent |
+OK | +
See supported operations below...
++++
kubectlCommand
+Coming Soon
+
++++
curlCommand (requireskubectl proxyto be running)
+Coming Soon
+
+++Output
+
+Coming Soon
+
+++Response Body
+
+Coming Soon
+
+partially update status of the specified Deployment
+PATCH /apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/status
| Parameter | +Description | +
|---|---|
| name | +name of the Deployment | +
| namespace | +object name and auth scope, such as for teams and projects | +
| Parameter | +Description | +
|---|---|
| pretty | +If 'true', then the output is pretty printed. | +
| Parameter | +Description | +
|---|---|
| body Patch |
++ |
| Code | +Description | +
|---|---|
| 200 Deployment |
+OK | +
+++
kubectlCommand
+Coming Soon
+
++++
curlCommand (requireskubectl proxyto be running)
+Coming Soon
+
+++Output
+
+Coming Soon
+
+++Response Body
+
+Coming Soon
+
+read status of the specified Deployment
+GET /apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/status
| Parameter | +Description | +
|---|---|
| name | +name of the Deployment | +
| namespace | +object name and auth scope, such as for teams and projects | +
| Parameter | +Description | +
|---|---|
| pretty | +If 'true', then the output is pretty printed. | +
| Code | +Description | +
|---|---|
| 200 Deployment |
+OK | +
+++
kubectlCommand
+Coming Soon
+
++++
curlCommand (requireskubectl proxyto be running)
+Coming Soon
+
+++Output
+
+Coming Soon
+
+++Response Body
+
+Coming Soon
+
+replace status of the specified Deployment
+PUT /apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/status
| Parameter | +Description | +
|---|---|
| name | +name of the Deployment | +
| namespace | +object name and auth scope, such as for teams and projects | +
| Parameter | +Description | +
|---|---|
| pretty | +If 'true', then the output is pretty printed. | +
| Parameter | +Description | +
|---|---|
| body Deployment |
++ |
| Code | +Description | +
|---|---|
| 200 Deployment |
+OK |
See supported operations below...
-@@ -73851,7 +76076,7 @@ spec:
kubectlCommand
@@ -74016,7 +76241,7 @@ $ curl -X PATCH -H 'Content-Type: application/strategic-Replace +
kubectlCommand
@@ -74210,7 +76435,7 @@ spec:
kubectlCommand
@@ -74324,7 +76549,7 @@ orphanDependents: false
kubectlCommand
@@ -74429,9 +76654,9 @@ orphanDependents: false
kubectlCommand
See supported operations below...
-@@ -74653,7 +76878,7 @@ $ curl -X GET http://
kubectlCommand
@@ -75039,7 +77264,7 @@ $ kubectl proxy
kubectlCommand
@@ -75129,7 +77354,7 @@ $ kubectl proxy
kubectlCommand
@@ -75385,7 +77610,7 @@ $ kubectl proxy
kubectlCommand
@@ -75490,7 +77715,7 @@ $ kubectl proxy
kubectlCommand
@@ -75580,9 +77805,9 @@ $ kubectl proxy
kubectlCommand
See supported operations below...
-@@ -75674,7 +77899,7 @@ $ kubectl proxy
kubectlCommand
@@ -75751,7 +77976,7 @@ $ kubectl proxy
kubectlCommand
@@ -75844,55 +78069,7 @@ $ kubectl proxy
kubectlCommand
--Deployment Config to run 3 nginx instances (max rollback set to 10 revisions).
-
-apiVersion: apps/v1beta1
-kind: Deployment
-metadata:
- # Unique key of the Deployment instance
- name: deployment-example
-spec:
- # 3 Pods should exist at all times.
- replicas: 3
- template:
- metadata:
- labels:
- # Apply this label to pods and default
- # the Deployment label selector to this value
- app: nginx
- spec:
- containers:
- - name: nginx
- # Run this image
- image: nginx:1.10
-
---Deployment Config to run 3 nginx instances (max rollback set to 10 revisions).
-
-apiVersion: apps/v1beta1
-kind: Deployment
-metadata:
- # Unique key of the Deployment instance
- name: deployment-example
-spec:
- # 3 Pods should exist at all times.
- replicas: 3
- template:
- metadata:
- labels:
- # Apply this label to pods and default
- # the Deployment label selector to this value
- app: nginx
- spec:
- containers:
- - name: nginx
- # Run this image
- image: nginx:1.10
-
+| apps | -v1beta2 | -Deployment | -
Deployment enables declarative updates for Pods and ReplicaSets.
- - -| Field | -Description | -
|---|---|
| apiVersion string |
-APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources | -
| kind string |
-Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds | -
| metadata ObjectMeta |
-Standard object metadata. | -
| spec DeploymentSpec |
-Specification of the desired behavior of the Deployment. | -
| status DeploymentStatus |
-Most recently observed status of the Deployment. | -
| Field | -Description | -
|---|---|
| minReadySeconds integer |
-Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) | -
| paused boolean |
-Indicates that the deployment is paused. | -
| progressDeadlineSeconds integer |
-The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s. | -
| replicas integer |
-Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. | -
| revisionHistoryLimit integer |
-The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. | -
| selector LabelSelector |
-Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. | -
| strategy DeploymentStrategy |
-The deployment strategy to use to replace existing pods with new ones. | -
| template PodTemplateSpec |
-Template describes the pods that will be created. | -
| Field | -Description | -
|---|---|
| availableReplicas integer |
-Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. | -
| collisionCount integer |
-Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet. | -
| conditions DeploymentCondition array patch type: merge patch merge key: type |
-Represents the latest available observations of a deployment's current state. | -
| observedGeneration integer |
-The generation observed by the deployment controller. | -
| readyReplicas integer |
-Total number of ready pods targeted by this deployment. | -
| replicas integer |
-Total number of non-terminated pods targeted by this deployment (their labels match the selector). | -
| unavailableReplicas integer |
-Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created. | -
| updatedReplicas integer |
-Total number of non-terminated pods targeted by this deployment that have the desired template spec. | -
| Field | -Description | -
|---|---|
| apiVersion string |
-APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources | -
| items Deployment array |
-Items is the list of Deployments. | -
| kind string |
-Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds | -
| metadata ListMeta |
-Standard list metadata. | -
| Field | -Description | -
|---|---|
| rollingUpdate RollingUpdateDeployment |
-Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. | -
| type string |
-Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. | -
| Field | -Description | -
|---|---|
| maxSurge | -The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. | -
| maxUnavailable | -The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. | -
See supported operations below...
----
kubectlCommand
-$ echo 'apiVersion: apps/v1beta1
-kind: Deployment
-metadata:
- name: deployment-example
-spec:
- replicas: 3
- revisionHistoryLimit: 10
- template:
- metadata:
- labels:
- app: nginx
- spec:
- containers:
- - name: nginx
- image: nginx:1.10
- ports:
- - containerPort: 80
-' | kubectl create -f -
-
----
curlCommand (requireskubectl proxyto be running)
-$ kubectl proxy
-$ curl -X POST -H 'Content-Type: application/yaml' --data '
-apiVersion: apps/v1beta1
-kind: Deployment
-metadata:
- name: deployment-example
-spec:
- replicas: 3
- revisionHistoryLimit: 10
- template:
- metadata:
- labels:
- app: nginx
- spec:
- containers:
- - name: nginx
- image: nginx:1.10
- ports:
- - containerPort: 80
-' http://127.0.0.1:8001/apis/apps/v1beta2/namespaces/default/deployments
-
---Output
-
-deployment "deployment-example" created
-
---Response Body
-
-{
- "kind": "Deployment",
- "apiVersion": "apps/v1beta1",
- "metadata": {
- "name": "deployment-example",
- "namespace": "default",
- "selfLink": "/apis/apps/v1beta1/namespaces/default/deployments/deployment-example",
- "uid": "4ccca349-9cb1-11e6-9c54-42010a800148",
- "resourceVersion": "2118306",
- "generation": 1,
- "creationTimestamp": "2016-10-28T01:53:19Z",
- "labels": {
- "app": "nginx"
- }
- },
- "spec": {
- "replicas": 3,
- "selector": {
- "matchLabels": {
- "app": "nginx"
- }
- },
- "template": {
- "metadata": {
- "creationTimestamp": null,
- "labels": {
- "app": "nginx"
- }
- },
- "spec": {
- "containers": [
- {
- "name": "nginx",
- "image": "nginx:1.10",
- "ports": [
- {
- "containerPort": 80,
- "protocol": "TCP"
- }
- ],
- "resources": {},
- "terminationMessagePath": "/dev/termination-log",
- "imagePullPolicy": "IfNotPresent"
- }
- ],
- "restartPolicy": "Always",
- "terminationGracePeriodSeconds": 30,
- "dnsPolicy": "ClusterFirst",
- "securityContext": {}
- }
- },
- "strategy": {
- "type": "RollingUpdate",
- "rollingUpdate": {
- "maxUnavailable": 1,
- "maxSurge": 1
- }
- },
- "revisionHistoryLimit": 10
- },
- "status": {}
-}
-
-create a Deployment
-POST /apis/apps/v1beta2/namespaces/{namespace}/deployments
| Parameter | -Description | -
|---|---|
| namespace | -object name and auth scope, such as for teams and projects | -
| Parameter | -Description | -
|---|---|
| pretty | -If 'true', then the output is pretty printed. | -
| Parameter | -Description | -
|---|---|
| body Deployment |
-- |
| Code | -Description | -
|---|---|
| 200 Deployment |
-OK | -
---
kubectlCommand
-$ kubectl patch deployment deployment-example -p \
- '{"spec":{"template":{"spec":{"containers":[{"name":"nginx","image":"nginx:1.11"}]}}}}'
-
----
curlCommand (requireskubectl proxyto be running)
-$ kubectl proxy
-$ curl -X PATCH -H 'Content-Type: application/strategic-merge-patch+json' --data '
-{"spec":{"template":{"spec":{"containers":[{"name":"nginx","image":"nginx:1.11"}]}}}}' \
- 'http://127.0.0.1:8001/apis/apps/v1beta2/namespaces/default/deployments/deployment-example'
-
---Output
-
-"deployment-example" patched
-
---Response Body
-
-{
- "kind": "Deployment",
- "apiVersion": "apps/v1beta1",
- "metadata": {
- "name": "deployment-example",
- "namespace": "default",
- "selfLink": "/apis/apps/v1beta1/namespaces/default/deployments/deployment-example",
- "uid": "5dc3a8e6-b0ee-11e6-aef0-42010af00229",
- "resourceVersion": "164489",
- "generation": 11,
- "creationTimestamp": "2016-11-22T20:00:50Z",
- "labels": {
- "app": "nginx"
- },
- "annotations": {
- "deployment.kubernetes.io/revision": "5"
- }
- },
- "spec": {
- "replicas": 3,
- "selector": {
- "matchLabels": {
- "app": "nginx"
- }
- },
- "template": {
- "metadata": {
- "creationTimestamp": null,
- "labels": {
- "app": "nginx"
- }
- },
- "spec": {
- "containers": [
- {
- "name": "nginx",
- "image": "nginx:1.11",
- "ports": [
- {
- "containerPort": 80,
- "protocol": "TCP"
- }
- ],
- "resources": {},
- "terminationMessagePath": "/dev/termination-log",
- "imagePullPolicy": "IfNotPresent"
- }
- ],
- "restartPolicy": "Always",
- "terminationGracePeriodSeconds": 30,
- "dnsPolicy": "ClusterFirst",
- "securityContext": {}
- }
- },
- "strategy": {
- "type": "RollingUpdate",
- "rollingUpdate": {
- "maxUnavailable": 1,
- "maxSurge": 1
- }
- },
- "revisionHistoryLimit": 10
- },
- "status": {
- "observedGeneration": 10,
- "replicas": 3,
- "updatedReplicas": 3,
- "availableReplicas": 3
- }
-}
-
-partially update the specified Deployment
-PATCH /apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}
| Parameter | -Description | -
|---|---|
| name | -name of the Deployment | -
| namespace | -object name and auth scope, such as for teams and projects | -
| Parameter | -Description | -
|---|---|
| pretty | -If 'true', then the output is pretty printed. | -
| Parameter | -Description | -
|---|---|
| body Patch |
-- |
| Code | -Description | -
|---|---|
| 200 Deployment |
-OK | -
---
kubectlCommand
-$ echo 'apiVersion: apps/v1beta1
-kind: Deployment
-metadata:
- name: deployment-example
-spec:
- replicas: 3
- revisionHistoryLimit: 10
- template:
- metadata:
- labels:
- app: nginx
- spec:
- containers:
- - name: nginx
- image: nginx:1.11
- ports:
- - containerPort: 80
-' | kubectl replace -f -
-
----
curlCommand (requireskubectl proxyto be running)
-$ kubectl proxy
-$ curl -X PUT -H 'Content-Type: application/yaml' --data '
-apiVersion: apps/v1beta1
-kind: Deployment
-metadata:
- name: deployment-example
-spec:
- replicas: 3
- revisionHistoryLimit: 10
- template:
- metadata:
- labels:
- app: nginx
- spec:
- containers:
- - name: nginx
- image: nginx:1.11
- ports:
- - containerPort: 80
-' http://127.0.0.1:8001/apis/apps/v1beta2/namespaces/default/deployments/deployment-example
-
---Output
-
-deployment "deployment-example" replaced
-
---Response Body
-
-{
- "kind": "Deployment",
- "apiVersion": "apps/v1beta1",
- "metadata": {
- "name": "deployment-example",
- "namespace": "default",
- "selfLink": "/apis/apps/v1beta1/namespaces/default/deployments/deployment-example",
- "uid": "4ccca349-9cb1-11e6-9c54-42010a800148",
- "resourceVersion": "2119082",
- "generation": 5,
- "creationTimestamp": "2016-10-28T01:53:19Z",
- "labels": {
- "app": "nginx"
- }
- },
- "spec": {
- "replicas": 3,
- "selector": {
- "matchLabels": {
- "app": "nginx"
- }
- },
- "template": {
- "metadata": {
- "creationTimestamp": null,
- "labels": {
- "app": "nginx"
- }
- },
- "spec": {
- "containers": [
- {
- "name": "nginx",
- "image": "nginx:1.11",
- "ports": [
- {
- "containerPort": 80,
- "protocol": "TCP"
- }
- ],
- "resources": {},
- "terminationMessagePath": "/dev/termination-log",
- "imagePullPolicy": "IfNotPresent"
- }
- ],
- "restartPolicy": "Always",
- "terminationGracePeriodSeconds": 30,
- "dnsPolicy": "ClusterFirst",
- "securityContext": {}
- }
- },
- "strategy": {
- "type": "RollingUpdate",
- "rollingUpdate": {
- "maxUnavailable": 1,
- "maxSurge": 1
- }
- },
- "revisionHistoryLimit": 10
- },
- "status": {
- "observedGeneration": 4,
- "replicas": 3,
- "updatedReplicas": 3,
- "availableReplicas": 3
- }
-}
-
-replace the specified Deployment
-PUT /apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}
| Parameter | -Description | -
|---|---|
| name | -name of the Deployment | -
| namespace | -object name and auth scope, such as for teams and projects | -
| Parameter | -Description | -
|---|---|
| pretty | -If 'true', then the output is pretty printed. | -
| Parameter | -Description | -
|---|---|
| body Deployment |
-- |
| Code | -Description | -
|---|---|
| 200 Deployment |
-OK | -
---
kubectlCommand
-$ kubectl delete deployment deployment-example
-
----
curlCommand (requireskubectl proxyto be running)
-$ kubectl proxy
-$ curl -X DELETE -H 'Content-Type: application/yaml' --data '
-gracePeriodSeconds: 0
-orphanDependents: false
-' 'http://127.0.0.1:8001/apis/apps/v1beta2/namespaces/default/deployments/deployment-example'
-
---Output
-
-deployment "deployment-example" deleted
-
---Response Body
-
-{
- "kind": "Status",
- "apiVersion": "v1",
- "metadata": {},
- "status": "Success",
- "code": 200
-}
-
-delete a Deployment
-DELETE /apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}
| Parameter | -Description | -
|---|---|
| name | -name of the Deployment | -
| namespace | -object name and auth scope, such as for teams and projects | -
| Parameter | -Description | -
|---|---|
| pretty | -If 'true', then the output is pretty printed. | -
| gracePeriodSeconds | -The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | -
| orphanDependents | -Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | -
| propagationPolicy | -Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. | -
| Parameter | -Description | -
|---|---|
| body DeleteOptions |
-- |
| Code | -Description | -
|---|---|
| 200 Status |
-OK | -
---
kubectlCommand
-Coming Soon
-
----
curlCommand (requireskubectl proxyto be running)
-Coming Soon
-
---Output
-
-Coming Soon
-
---Response Body
-
-Coming Soon
-
-delete collection of Deployment
-DELETE /apis/apps/v1beta2/namespaces/{namespace}/deployments
| Parameter | -Description | -
|---|---|
| namespace | -object name and auth scope, such as for teams and projects | -
| Parameter | -Description | -
|---|---|
| pretty | -If 'true', then the output is pretty printed. | -
| continue | -The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | -
| fieldSelector | -A selector to restrict the list of returned objects by their fields. Defaults to everything. | -
| includeUninitialized | -If true, partially initialized resources are included in the response. | -
| labelSelector | -A selector to restrict the list of returned objects by their labels. Defaults to everything. | -
| limit | -limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. |
-
| resourceVersion | -When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. | -
| timeoutSeconds | -Timeout for the list/watch call. | -
| watch | -Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. | -
| Code | -Description | -
|---|---|
| 200 Status |
-OK | -
See supported operations below...
----
kubectlCommand
-$ kubectl get deployment deployment-example -o json
-
----
curlCommand (requireskubectl proxyto be running)
-$ kubectl proxy
-$ curl -X GET http://127.0.0.1:8001/apis/apps/v1beta2/namespaces/default/deployments/deployment-example
-
---Output
-
-{
- "kind": "Deployment",
- "apiVersion": "apps/v1beta1",
- "metadata": {
- "name": "deployment-example",
- "namespace": "default",
- "selfLink": "/apis/apps/v1beta1/namespaces/default/deployments/deployment-example",
- "uid": "1b33145a-9c63-11e6-9c54-42010a800148",
- "resourceVersion": "2064726",
- "generation": 4,
- "creationTimestamp": "2016-10-27T16:33:35Z",
- "labels": {
- "app": "nginx"
- },
- "annotations": {
- "deployment.kubernetes.io/revision": "1"
- }
- },
- "spec": {
- "replicas": 3,
- "selector": {
- "matchLabels": {
- "app": "nginx"
- }
- },
- "template": {
- "metadata": {
- "creationTimestamp": null,
- "labels": {
- "app": "nginx"
- }
- },
- "spec": {
- "containers": [
- {
- "name": "nginx",
- "image": "nginx:1.10",
- "ports": [
- {
- "containerPort": 80,
- "protocol": "TCP"
- }
- ],
- "resources": {},
- "terminationMessagePath": "/dev/termination-log",
- "imagePullPolicy": "IfNotPresent"
- }
- ],
- "restartPolicy": "Always",
- "terminationGracePeriodSeconds": 30,
- "dnsPolicy": "ClusterFirst",
- "securityContext": {}
- }
- },
- "strategy": {
- "type": "RollingUpdate",
- "rollingUpdate": {
- "maxUnavailable": 1,
- "maxSurge": 1
- }
- }
- },
- "status": {
- "observedGeneration": 4,
- "replicas": 3,
- "updatedReplicas": 3,
- "availableReplicas": 3
- }
-}
-
---Response Body
-
-{
- "kind": "Deployment",
- "apiVersion": "apps/v1beta1",
- "metadata": {
- "name": "deployment-example",
- "namespace": "default",
- "selfLink": "/apis/apps/v1beta1/namespaces/default/deployments/deployment-example",
- "uid": "1b33145a-9c63-11e6-9c54-42010a800148",
- "resourceVersion": "2064726",
- "generation": 4,
- "creationTimestamp": "2016-10-27T16:33:35Z",
- "labels": {
- "app": "nginx"
- },
- "annotations": {
- "deployment.kubernetes.io/revision": "1"
- }
- },
- "spec": {
- "replicas": 3,
- "selector": {
- "matchLabels": {
- "app": "nginx"
- }
- },
- "template": {
- "metadata": {
- "creationTimestamp": null,
- "labels": {
- "app": "nginx"
- }
- },
- "spec": {
- "containers": [
- {
- "name": "nginx",
- "image": "nginx:1.10",
- "ports": [
- {
- "containerPort": 80,
- "protocol": "TCP"
- }
- ],
- "resources": {},
- "terminationMessagePath": "/dev/termination-log",
- "imagePullPolicy": "IfNotPresent"
- }
- ],
- "restartPolicy": "Always",
- "terminationGracePeriodSeconds": 30,
- "dnsPolicy": "ClusterFirst",
- "securityContext": {}
- }
- },
- "strategy": {
- "type": "RollingUpdate",
- "rollingUpdate": {
- "maxUnavailable": 1,
- "maxSurge": 1
- }
- }
- },
- "status": {
- "observedGeneration": 4,
- "replicas": 3,
- "updatedReplicas": 3,
- "availableReplicas": 3
- }
-}
-
-read the specified Deployment
-GET /apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}
| Parameter | -Description | -
|---|---|
| name | -name of the Deployment | -
| namespace | -object name and auth scope, such as for teams and projects | -
| Parameter | -Description | -
|---|---|
| pretty | -If 'true', then the output is pretty printed. | -
| exact | -Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. | -
| export | -Should this value be exported. Export strips fields that a user can not specify. | -
| Code | -Description | -
|---|---|
| 200 Deployment |
-OK | -
---
kubectlCommand
-$ kubectl get deployment -o json
-
----
curlCommand (requireskubectl proxyto be running)
-$ kubectl proxy
-$ curl -X GET 'http://127.0.0.1:8001/apis/apps/v1beta2/namespaces/default/deployments'
-
---Output
-
-{
- "kind": "List",
- "apiVersion": "v1",
- "metadata": {},
- "items": [
- {
- "kind": "Deployment",
- "apiVersion": "app/v1beta1",
- "metadata": {
- "name": "docs",
- "namespace": "default",
- "selfLink": "/apis/app/v1beta1/namespaces/default/deployments/docs",
- "uid": "ef49e1d2-915e-11e6-be81-42010a80003f",
- "resourceVersion": "1924126",
- "generation": 21,
- "creationTimestamp": "2016-10-13T16:06:00Z",
- "labels": {
- "run": "docs"
- },
- "annotations": {
- "deployment.kubernetes.io/revision": "10",
- "replicatingperfection.net/push-image": "true"
- }
- },
- "spec": {
- "replicas": 1,
- "selector": {
- "matchLabels": {
- "run": "docs"
- }
- },
- "template": {
- "metadata": {
- "creationTimestamp": null,
- "labels": {
- "auto-pushed-image-pwittrock/api-docs": "1477496453",
- "run": "docs"
- }
- },
- "spec": {
- "containers": [
- {
- "name": "docs",
- "image": "pwittrock/api-docs:v9",
- "resources": {},
- "terminationMessagePath": "/dev/termination-log",
- "imagePullPolicy": "Always"
- }
- ],
- "restartPolicy": "Always",
- "terminationGracePeriodSeconds": 30,
- "dnsPolicy": "ClusterFirst",
- "securityContext": {}
- }
- },
- "strategy": {
- "type": "RollingUpdate",
- "rollingUpdate": {
- "maxUnavailable": 1,
- "maxSurge": 1
- }
- }
- },
- "status": {
- "observedGeneration": 21,
- "replicas": 1,
- "updatedReplicas": 1,
- "availableReplicas": 1
- }
- },
- {
- "kind": "Deployment",
- "apiVersion": "app/v1beta1",
- "metadata": {
- "name": "deployment-example",
- "namespace": "default",
- "selfLink": "/apis/app/v1beta1/namespaces/default/deployments/deployment-example",
- "uid": "1b33145a-9c63-11e6-9c54-42010a800148",
- "resourceVersion": "2064726",
- "generation": 4,
- "creationTimestamp": "2016-10-27T16:33:35Z",
- "labels": {
- "app": "nginx"
- },
- "annotations": {
- "deployment.kubernetes.io/revision": "1"
- }
- },
- "spec": {
- "replicas": 3,
- "selector": {
- "matchLabels": {
- "app": "nginx"
- }
- },
- "template": {
- "metadata": {
- "creationTimestamp": null,
- "labels": {
- "app": "nginx"
- }
- },
- "spec": {
- "containers": [
- {
- "name": "nginx",
- "image": "nginx:1.10",
- "ports": [
- {
- "containerPort": 80,
- "protocol": "TCP"
- }
- ],
- "resources": {},
- "terminationMessagePath": "/dev/termination-log",
- "imagePullPolicy": "IfNotPresent"
- }
- ],
- "restartPolicy": "Always",
- "terminationGracePeriodSeconds": 30,
- "dnsPolicy": "ClusterFirst",
- "securityContext": {}
- }
- },
- "strategy": {
- "type": "RollingUpdate",
- "rollingUpdate": {
- "maxUnavailable": 1,
- "maxSurge": 1
- }
- }
- },
- "status": {
- "observedGeneration": 4,
- "replicas": 3,
- "updatedReplicas": 3,
- "availableReplicas": 3
- }
- }
- ]
-}
-
---Response Body
-
-{
- "kind": "List",
- "apiVersion": "v1",
- "metadata": {},
- "items": [
- {
- "kind": "Deployment",
- "apiVersion": "app/v1beta1",
- "metadata": {
- "name": "docs",
- "namespace": "default",
- "selfLink": "/apis/app/v1beta1/namespaces/default/deployments/docs",
- "uid": "ef49e1d2-915e-11e6-be81-42010a80003f",
- "resourceVersion": "1924126",
- "generation": 21,
- "creationTimestamp": "2016-10-13T16:06:00Z",
- "labels": {
- "run": "docs"
- },
- "annotations": {
- "deployment.kubernetes.io/revision": "10",
- "replicatingperfection.net/push-image": "true"
- }
- },
- "spec": {
- "replicas": 1,
- "selector": {
- "matchLabels": {
- "run": "docs"
- }
- },
- "template": {
- "metadata": {
- "creationTimestamp": null,
- "labels": {
- "auto-pushed-image-pwittrock/api-docs": "1477496453",
- "run": "docs"
- }
- },
- "spec": {
- "containers": [
- {
- "name": "docs",
- "image": "pwittrock/api-docs:v9",
- "resources": {},
- "terminationMessagePath": "/dev/termination-log",
- "imagePullPolicy": "Always"
- }
- ],
- "restartPolicy": "Always",
- "terminationGracePeriodSeconds": 30,
- "dnsPolicy": "ClusterFirst",
- "securityContext": {}
- }
- },
- "strategy": {
- "type": "RollingUpdate",
- "rollingUpdate": {
- "maxUnavailable": 1,
- "maxSurge": 1
- }
- }
- },
- "status": {
- "observedGeneration": 21,
- "replicas": 1,
- "updatedReplicas": 1,
- "availableReplicas": 1
- }
- },
- {
- "kind": "Deployment",
- "apiVersion": "app/v1beta1",
- "metadata": {
- "name": "deployment-example",
- "namespace": "default",
- "selfLink": "/apis/app/v1beta1/namespaces/default/deployments/deployment-example",
- "uid": "1b33145a-9c63-11e6-9c54-42010a800148",
- "resourceVersion": "2064726",
- "generation": 4,
- "creationTimestamp": "2016-10-27T16:33:35Z",
- "labels": {
- "app": "nginx"
- },
- "annotations": {
- "deployment.kubernetes.io/revision": "1"
- }
- },
- "spec": {
- "replicas": 3,
- "selector": {
- "matchLabels": {
- "app": "nginx"
- }
- },
- "template": {
- "metadata": {
- "creationTimestamp": null,
- "labels": {
- "app": "nginx"
- }
- },
- "spec": {
- "containers": [
- {
- "name": "nginx",
- "image": "nginx:1.10",
- "ports": [
- {
- "containerPort": 80,
- "protocol": "TCP"
- }
- ],
- "resources": {},
- "terminationMessagePath": "/dev/termination-log",
- "imagePullPolicy": "IfNotPresent"
- }
- ],
- "restartPolicy": "Always",
- "terminationGracePeriodSeconds": 30,
- "dnsPolicy": "ClusterFirst",
- "securityContext": {}
- }
- },
- "strategy": {
- "type": "RollingUpdate",
- "rollingUpdate": {
- "maxUnavailable": 1,
- "maxSurge": 1
- }
- }
- },
- "status": {
- "observedGeneration": 4,
- "replicas": 3,
- "updatedReplicas": 3,
- "availableReplicas": 3
- }
- }
- ]
-}
-
-list or watch objects of kind Deployment
-GET /apis/apps/v1beta2/namespaces/{namespace}/deployments
| Parameter | -Description | -
|---|---|
| namespace | -object name and auth scope, such as for teams and projects | -
| Parameter | -Description | -
|---|---|
| pretty | -If 'true', then the output is pretty printed. | -
| continue | -The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | -
| fieldSelector | -A selector to restrict the list of returned objects by their fields. Defaults to everything. | -
| includeUninitialized | -If true, partially initialized resources are included in the response. | -
| labelSelector | -A selector to restrict the list of returned objects by their labels. Defaults to everything. | -
| limit | -limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. |
-
| resourceVersion | -When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. | -
| timeoutSeconds | -Timeout for the list/watch call. | -
| watch | -Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. | -
| Code | -Description | -
|---|---|
| 200 DeploymentList |
-OK | -
---
kubectlCommand
-Coming Soon
-
----
curlCommand (requireskubectl proxyto be running)
-Coming Soon
-
---Output
-
-Coming Soon
-
---Response Body
-
-Coming Soon
-
-list or watch objects of kind Deployment
-GET /apis/apps/v1beta2/deployments
| Parameter | -Description | -
|---|---|
| continue | -The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | -
| fieldSelector | -A selector to restrict the list of returned objects by their fields. Defaults to everything. | -
| includeUninitialized | -If true, partially initialized resources are included in the response. | -
| labelSelector | -A selector to restrict the list of returned objects by their labels. Defaults to everything. | -
| limit | -limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. |
-
| pretty | -If 'true', then the output is pretty printed. | -
| resourceVersion | -When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. | -
| timeoutSeconds | -Timeout for the list/watch call. | -
| watch | -Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. | -
| Code | -Description | -
|---|---|
| 200 DeploymentList |
-OK | -
---
kubectlCommand
-$ kubectl get deployment deployment-example --watch -o json
-
----
curlCommand (requireskubectl proxyto be running)
-$ kubectl proxy
-$ curl -X GET 'http://127.0.0.1:8001/apis/apps/v1beta2/watch/namespaces/default/deployments/deployment-example'
-
---Output
-
-{
- "type": "ADDED",
- "object": {
- "kind": "Deployment",
- "apiVersion": "apps/v1beta1",
- "metadata": {
- "name": "deployment-example",
- "namespace": "default",
- "selfLink": "/apis/apps/v1beta1/namespaces/default/deployments/deployment-example",
- "uid": "64c12290-9cbf-11e6-9c54-42010a800148",
- "resourceVersion": "2128095",
- "generation": 2,
- "creationTimestamp": "2016-10-28T03:34:12Z",
- "labels": {
- "app": "nginx"
- },
- "annotations": {
- "deployment.kubernetes.io/revision": "3"
- }
- },
- "spec": {
- "replicas": 3,
- "selector": {
- "matchLabels": {
- "app": "nginx"
- }
- },
- "template": {
- "metadata": {
- "creationTimestamp": null,
- "labels": {
- "app": "nginx"
- }
- },
- "spec": {
- "containers": [
- {
- "name": "nginx",
- "image": "nginx:1.10",
- "ports": [
- {
- "containerPort": 80,
- "protocol": "TCP"
- }
- ],
- "resources": {
- },
- "terminationMessagePath": "/dev/termination-log",
- "imagePullPolicy": "IfNotPresent"
- }
- ],
- "restartPolicy": "Always",
- "terminationGracePeriodSeconds": 30,
- "dnsPolicy": "ClusterFirst",
- "securityContext": {
- }
- }
- },
- "strategy": {
- "type": "RollingUpdate",
- "rollingUpdate": {
- "maxUnavailable": 1,
- "maxSurge": 1
- }
- }
- },
- "status": {
- "observedGeneration": 2,
- "replicas": 3,
- "updatedReplicas": 3,
- "availableReplicas": 3
- }
- }
-}
-
---Response Body
-
-{
- "type": "ADDED",
- "object": {
- "kind": "Deployment",
- "apiVersion": "apps/v1beta1",
- "metadata": {
- "name": "deployment-example",
- "namespace": "default",
- "selfLink": "/apis/apps/v1beta1/namespaces/default/deployments/deployment-example",
- "uid": "64c12290-9cbf-11e6-9c54-42010a800148",
- "resourceVersion": "2128095",
- "generation": 2,
- "creationTimestamp": "2016-10-28T03:34:12Z",
- "labels": {
- "app": "nginx"
- },
- "annotations": {
- "deployment.kubernetes.io/revision": "3"
- }
- },
- "spec": {
- "replicas": 3,
- "selector": {
- "matchLabels": {
- "app": "nginx"
- }
- },
- "template": {
- "metadata": {
- "creationTimestamp": null,
- "labels": {
- "app": "nginx"
- }
- },
- "spec": {
- "containers": [
- {
- "name": "nginx",
- "image": "nginx:1.10",
- "ports": [
- {
- "containerPort": 80,
- "protocol": "TCP"
- }
- ],
- "resources": {
- },
- "terminationMessagePath": "/dev/termination-log",
- "imagePullPolicy": "IfNotPresent"
- }
- ],
- "restartPolicy": "Always",
- "terminationGracePeriodSeconds": 30,
- "dnsPolicy": "ClusterFirst",
- "securityContext": {
- }
- }
- },
- "strategy": {
- "type": "RollingUpdate",
- "rollingUpdate": {
- "maxUnavailable": 1,
- "maxSurge": 1
- }
- }
- },
- "status": {
- "observedGeneration": 2,
- "replicas": 3,
- "updatedReplicas": 3,
- "availableReplicas": 3
- }
- }
-}
-
-watch changes to an object of kind Deployment
-GET /apis/apps/v1beta2/watch/namespaces/{namespace}/deployments/{name}
| Parameter | -Description | -
|---|---|
| name | -name of the Deployment | -
| namespace | -object name and auth scope, such as for teams and projects | -
| Parameter | -Description | -
|---|---|
| continue | -The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | -
| fieldSelector | -A selector to restrict the list of returned objects by their fields. Defaults to everything. | -
| includeUninitialized | -If true, partially initialized resources are included in the response. | -
| labelSelector | -A selector to restrict the list of returned objects by their labels. Defaults to everything. | -
| limit | -limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. |
-
| pretty | -If 'true', then the output is pretty printed. | -
| resourceVersion | -When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. | -
| timeoutSeconds | -Timeout for the list/watch call. | -
| watch | -Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. | -
| Code | -Description | -
|---|---|
| 200 WatchEvent |
-OK | -
---
kubectlCommand
-Coming Soon
-
----
curlCommand (requireskubectl proxyto be running)
-Coming Soon
-
---Output
-
-Coming Soon
-
---Response Body
-
-Coming Soon
-
-watch individual changes to a list of Deployment
-GET /apis/apps/v1beta2/watch/namespaces/{namespace}/deployments
| Parameter | -Description | -
|---|---|
| namespace | -object name and auth scope, such as for teams and projects | -
| Parameter | -Description | -
|---|---|
| continue | -The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | -
| fieldSelector | -A selector to restrict the list of returned objects by their fields. Defaults to everything. | -
| includeUninitialized | -If true, partially initialized resources are included in the response. | -
| labelSelector | -A selector to restrict the list of returned objects by their labels. Defaults to everything. | -
| limit | -limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. |
-
| pretty | -If 'true', then the output is pretty printed. | -
| resourceVersion | -When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. | -
| timeoutSeconds | -Timeout for the list/watch call. | -
| watch | -Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. | -
| Code | -Description | -
|---|---|
| 200 WatchEvent |
-OK | -
---
kubectlCommand
-Coming Soon
-
----
curlCommand (requireskubectl proxyto be running)
-Coming Soon
-
---Output
-
-Coming Soon
-
---Response Body
-
-Coming Soon
-
-watch individual changes to a list of Deployment
-GET /apis/apps/v1beta2/watch/deployments
| Parameter | -Description | -
|---|---|
| continue | -The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | -
| fieldSelector | -A selector to restrict the list of returned objects by their fields. Defaults to everything. | -
| includeUninitialized | -If true, partially initialized resources are included in the response. | -
| labelSelector | -A selector to restrict the list of returned objects by their labels. Defaults to everything. | -
| limit | -limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. |
-
| pretty | -If 'true', then the output is pretty printed. | -
| resourceVersion | -When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. | -
| timeoutSeconds | -Timeout for the list/watch call. | -
| watch | -Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. | -
| Code | -Description | -
|---|---|
| 200 WatchEvent |
-OK | -
See supported operations below...
----
kubectlCommand
-Coming Soon
-
----
curlCommand (requireskubectl proxyto be running)
-Coming Soon
-
---Output
-
-Coming Soon
-
---Response Body
-
-Coming Soon
-
-partially update status of the specified Deployment
-PATCH /apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/status
| Parameter | -Description | -
|---|---|
| name | -name of the Deployment | -
| namespace | -object name and auth scope, such as for teams and projects | -
| Parameter | -Description | -
|---|---|
| pretty | -If 'true', then the output is pretty printed. | -
| Parameter | -Description | -
|---|---|
| body Patch |
-- |
| Code | -Description | -
|---|---|
| 200 Deployment |
-OK | -
---
kubectlCommand
-Coming Soon
-
----
curlCommand (requireskubectl proxyto be running)
-Coming Soon
-
---Output
-
-Coming Soon
-
---Response Body
-
-Coming Soon
-
-read status of the specified Deployment
-GET /apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/status
| Parameter | -Description | -
|---|---|
| name | -name of the Deployment | -
| namespace | -object name and auth scope, such as for teams and projects | -
| Parameter | -Description | -
|---|---|
| pretty | -If 'true', then the output is pretty printed. | -
| Code | -Description | -
|---|---|
| 200 Deployment |
-OK | -
---
kubectlCommand
-Coming Soon
-
----
curlCommand (requireskubectl proxyto be running)
-Coming Soon
-
---Output
-
-Coming Soon
-
---Response Body
-
-Coming Soon
-
-replace status of the specified Deployment
-PUT /apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/status
| Parameter | -Description | -
|---|---|
| name | -name of the Deployment | -
| namespace | -object name and auth scope, such as for teams and projects | -
| Parameter | -Description | -
|---|---|
| pretty | -If 'true', then the output is pretty printed. | -
| Parameter | -Description | -
|---|---|
| body Deployment |
-- |
| Code | -Description | -
|---|---|
| 200 Deployment |
-OK | -
| Group | -Version | -Kind | -|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| extensions | v1beta1 | DeploymentCondition |
| apps | -v1beta2 | +extensions | +v1beta1 | DeploymentCondition |
DeploymentCondition describes the state of a deployment at a certain point.
@@ -78397,7 +78157,7 @@ Appears In: Appears In:--ReplicaSet Config to run 3 nginx instances.
-
-apiVersion: extensions/v1beta1
-kind: ReplicaSet
-metadata:
- # Unique key of the ReplicaSet instance
- name: replicaset-example
-spec:
- # 3 Pods should exist at all times.
- replicas: 3
- template:
- metadata:
- labels:
- app: nginx
- spec:
- containers:
- # Run the nginx image
- - name: nginx
- image: nginx:1.10
-
---ReplicaSet Config to run 3 nginx instances.
-
-apiVersion: extensions/v1beta1
-kind: ReplicaSet
-metadata:
- # Unique key of the ReplicaSet instance
- name: replicaset-example
-spec:
- # 3 Pods should exist at all times.
- replicas: 3
- template:
- metadata:
- labels:
- app: nginx
- spec:
- containers:
- # Run the nginx image
- - name: nginx
- image: nginx:1.10
-
+| apps | -v1beta2 | +extensions | +v1beta1 | ReplicaSet |
ReplicaSet represents the configuration of a ReplicaSet.
+DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1beta2/ReplicaSet. See the release notes for more information. ReplicaSet represents the configuration of a ReplicaSet.
| If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata | ||
| spec ReplicaSetSpec |
+spec ReplicaSetSpec |
Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status |
| status ReplicaSetStatus |
+status ReplicaSetStatus |
Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status |
| The number of available replicas (ready for at least minReadySeconds) for this replica set. | ||
| conditions ReplicaSetCondition array patch type: merge patch merge key: type |
+conditions ReplicaSetCondition array patch type: merge patch merge key: type |
Represents the latest available observations of a replica set's current state. |
| APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| items ReplicaSet array |
+items ReplicaSet array |
List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| body ReplicaSet |
+body ReplicaSet |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 ReplicaSet |
+200 ReplicaSet |
OK |
| 200 ReplicaSet |
+200 ReplicaSet |
OK |
| body ReplicaSet |
+body ReplicaSet |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 ReplicaSet |
+200 ReplicaSet |
OK |
| 200 ReplicaSet |
+200 ReplicaSet |
OK |
| 200 ReplicaSetList |
+200 ReplicaSetList |
OK |
| 200 ReplicaSetList |
+200 ReplicaSetList |
OK |
| 200 ReplicaSet |
+200 ReplicaSet |
OK |
| 200 ReplicaSet |
+200 ReplicaSet |
OK |
| body ReplicaSet |
+body ReplicaSet |
|
| 200 ReplicaSet |
+200 ReplicaSet |
OK |
| apps | -v1beta2 | +extensions | +v1beta1 | ReplicaSetCondition |
ReplicaSetCondition describes the state of a replica set at a certain point.
@@ -83374,7 +83087,7 @@ Appears In: Appears In:| apps | -v1beta2 | +v1beta1 | RollingUpdateStatefulSetStrategy |
RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
@@ -88281,7 +87994,7 @@ Appears In: Appears In:| partition integer |
-Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0. | +Partition indicates the ordinal at which the StatefulSet should be partitioned. | +
| Group | +Version | +Kind | +
|---|---|---|
| apps | +v1beta2 | +Scale | +
Scale represents a scaling request for a resource.
+| Field | +Description | +
|---|---|
| apiVersion string |
+APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources | +
| kind string |
+Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds | +
| metadata ObjectMeta |
+Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. | +
| spec ScaleSpec |
+defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. | +
| status ScaleStatus |
+current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only. | +
| Field | +Description | +
|---|---|
| replicas integer |
+desired number of instances for the scaled object. | +
| Field | +Description | +
|---|---|
| replicas integer |
+actual number of observed instances of the scaled object. | +
| selector object |
+label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors | +
| targetSelector string |
+label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors |
| Field | -Description | -
|---|---|
| replicas integer |
-actual number of observed instances of the scaled object. | -
| selector object |
-label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors | -
| targetSelector string |
-label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors | -
| Group | -Version | -Kind | -
|---|---|---|
| apps | -v1beta2 | -Scale | -
Scale represents a scaling request for a resource.
-| Field | -Description | -
|---|---|
| apiVersion string |
-APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources | -
| kind string |
-Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds | -
| metadata ObjectMeta |
-Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. | -
| spec ScaleSpec |
-defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. | -
| status ScaleStatus |
-current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only. | -
| Field | -Description | -
|---|---|
| replicas integer |
-desired number of instances for the scaled object. | -
| apps | -v1beta2 | +v1beta1 | StatefulSet |
StatefulSet represents a set of pods with consistent identities. Identities are defined as:
+DEPRECATED - This group version of StatefulSet is deprecated by apps/v1beta2/StatefulSet. See the release notes for more information. StatefulSet represents a set of pods with consistent identities. Identities are defined as:
| spec StatefulSetSpec |
+spec StatefulSetSpec |
Spec defines the desired identities of pods in this set. |
| status StatefulSetStatus |
+status StatefulSetStatus |
Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time. |
| template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet. | ||
| updateStrategy StatefulSetUpdateStrategy |
+updateStrategy StatefulSetUpdateStrategy |
updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. |
| APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| items StatefulSet array |
+items StatefulSet array |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| body StatefulSet |
+body StatefulSet |
|||
| 200 StatefulSet |
+200 StatefulSet |
OK |
| 200 StatefulSet |
+200 StatefulSet |
OK |
| body StatefulSet |
+body StatefulSet |
|||
| 200 StatefulSet |
+200 StatefulSet |
OK |
| 200 StatefulSet |
+200 StatefulSet |
OK |
| 200 StatefulSetList |
+200 StatefulSetList |
OK |
| 200 StatefulSetList |
+200 StatefulSetList |
OK |
| 200 StatefulSet |
+200 StatefulSet |
OK |
| 200 StatefulSet |
+200 StatefulSet |
OK |
| body StatefulSet |
+body StatefulSet |
|
| 200 StatefulSet |
+200 StatefulSet |
OK |
| apps | -v1beta2 | +v1beta1 | StatefulSetUpdateStrategy |
StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.
@@ -90508,7 +90221,7 @@ Appears In: Appears In:| rollingUpdate RollingUpdateStatefulSetStrategy |
+rollingUpdate RollingUpdateStatefulSetStrategy |
RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. |
| type string |
-Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate. | +Type indicates the type of the StatefulSetUpdateStrategy. |
Create and run a particular image, possibly replicated.
Creates a deployment or job to manage the created container(s).
$ run NAME --image=image [--env="key=value"] [--port=port] [--replicas=replicas] [--dry-run=bool] [--overrides=inline-json] [--command] -- [COMMAND] [args...]
$ run-container
| 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]. | ||||
| user | -- | [] | -Usernames to bind to the role | -|
| validate | true | @@ -2339,12 +2333,6 @@ viewing your workloads in a Kubernetes cluster.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]. | ||
| user | -- | [] | -Usernames to bind to the role | -|
| validate | true | @@ -5672,12 +5660,6 @@ viewing your workloads in a Kubernetes cluster.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]. | ||
| user | -- | [] | -Usernames to bind to the role | -
$ config SUBCOMMAND
| Name | -Shorthand | -Default | -Usage | -
|---|---|---|---|
| kubeconfig | -- | - | use a particular kubeconfig file | -
@@ -7649,29 +7612,11 @@ source $HOME/.bash_profile- -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 -
Specifying a name that already exists will merge new fields on top of existing values for those fields.
$ set-context NAME [--cluster=cluster_nickname] [--user=user_nickname] [--namespace=namespace]
| Name | -Shorthand | -Default | -Usage | -
|---|---|---|---|
| cluster | -- | - | cluster for the context entry in kubeconfig | -
| namespace | -- | - | namespace for the context entry in kubeconfig | -
| user | -- | - | user for the context entry in kubeconfig | -
@@ -7783,41 +7697,11 @@ source $HOME/.bash_profile'key=value' arguments for the auth provider - -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 -- username -- - username for the user entry in kubeconfig -
$ plugin NAME
--Start a single instance of nginx.
-
kubectl run nginx --image=nginx
-
---Start a single instance of hazelcast and let the container expose port 5701 .
-
kubectl run hazelcast --image=hazelcast --port=5701
-
---Start a single instance of hazelcast and set environment variables "DNS_DOMAIN=cluster" and "POD_NAMESPACE=default" in the container.
-
kubectl run hazelcast --image=hazelcast --env="DNS_DOMAIN=cluster" --env="POD_NAMESPACE=default"
-
---Start a single instance of hazelcast and set labels "app=hazelcast" and "env=prod" in the container.
-
kubectl run hazelcast --image=nginx --labels="app=hazelcast,env=prod"
-
---Start a replicated instance of nginx.
-
kubectl run nginx --image=nginx --replicas=5
-
---Dry run. Print the corresponding API objects without creating them.
-
kubectl run nginx --image=nginx --dry-run
-
---Start a single instance of nginx, but overload the spec of the deployment with a partial set of values parsed from JSON.
-
kubectl run nginx --image=nginx --overrides='{ "apiVersion": "v1", "spec": { ... } }'
-
---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>
-
---Start the nginx container using a different command and custom arguments.
-
kubectl run nginx --image=nginx --command -- <cmd> <arg1> ... <argN>
-
---Start the perl container to compute π to 2000 places and print it out.
-
kubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'print bpi(2000)'
-
---Start the cron job to compute π to 2000 places and print it out every 5 minutes.
-
kubectl run pi --schedule="0/5 * * * ?" --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'print bpi(2000)'
-
-Create and run a particular image, possibly replicated.
-Creates a deployment or job to manage the created container(s).
-$ run-container
| Name | -Shorthand | -Default | -Usage | -
|---|---|---|---|
| allow-missing-template-keys | -- | true | -If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. | -
| 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. With '--restart=Never' the exit code of the container process is returned. | -
| 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, see http://kubernetes.io/docs/user-guide/kubectl-conventions/#generators for a list. | -
| hostport | -- | -1 | -The host port mapping for the container port. To demonstrate a single-machine container. | -
| image | -- | - | The image for the container to run. | -
| image-pull-policy | -- | - | The image pull policy for the container. If left empty, this value will not be specified by the client and defaulted by the server | -
| include-extended-apis | -- | true | -If true, include definitions of new APIs via calls to the API server. [default true] | -
| labels | -l | -- | Comma separated labels to apply to the pod(s). Will override previous values. | -
| 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'. Note that server side components may assign limits depending on the server configuration, such as limit ranges. | -
| no-headers | -- | false | -When using the default or custom-column output format, don't print headers (default print headers). | -
| output | -o | -- | Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath]. | -
| output-version | -- | - | DEPRECATED: To use a specific API version, fully-qualify the resource, version, and group (for example: 'jobs.v1.batch/myjob'). | -
| 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. | -
| pod-running-timeout | -- | 1m0s | -The length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one pod is running | -
| port | -- | - | The port that this container exposes. If --expose is true, this is also the port used by the service that is created. | -
| quiet | -- | false | -If true, suppress prompt messages. | -
| record | -- | false | -Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists. | -
| replicas | -r | -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'. 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, if set to 'OnFailure' a job is created, if set to 'Never', a regular pod is created. For the latter two --replicas must be 1. Default 'Always', for CronJobs Never. |
-
| 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. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future. | -
| schedule | -- | - | A schedule in the Cron format the job should be run with. | -
| service-generator | -- | service/v2 | -The name of the generator to use for creating a service. Only used if --expose is true | -
| service-overrides | -- | - | An inline JSON override for the generated service object. If this is non-empty, it is used to override the generated object. Requires that the object supply a valid apiVersion field. Only used if --expose is true. | -
| serviceaccount | -- | - | Service account to set in the pod spec | -
| show-all | -a | -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. | -
| stdin | -i | -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 | -t | -false | -Allocated a TTY for each container in the pod. | -