Resource types
Resource type | Abbreviated alias |
---|---|
all |
|
certificatesigningrequests |
csr |
clusterrolebindings |
|
clusterroles |
|
componentstatuses |
cs |
configmaps |
cm |
controllerrevisions |
|
cronjobs |
|
customresourcedefinition |
crd |
daemonsets |
ds |
deployments |
deploy |
endpoints |
ep |
events |
ev |
horizontalpodautoscalers |
hpa |
ingresses |
ing |
jobs |
|
limitranges |
limits |
namespaces |
ns |
networkpolicies |
netpol |
nodes |
no |
persistentvolumeclaims |
pvc |
persistentvolumes |
pv |
poddisruptionbudgets |
pdb |
podpreset |
|
pods |
po |
podsecuritypolicies |
psp |
podtemplates |
|
replicasets |
rs |
replicationcontrollers |
rc |
resourcequotas |
quota |
rolebindings |
|
roles |
|
secrets |
|
serviceaccount |
sa |
services |
svc |
statefulsets |
sts |
storageclasses |
sc |
https://kubernetes.io/docs/reference/kubectl/cheatsheet/
kubectl explain deployment
kubectl explain deployment.metadata
kubectl explain deployment.spec
kubectl explain deployment.spec.selector
kubectl explain deployment.spec.template
kubectl explain deployment.spec.template.metadata
kubectl explain deployment.spec.template.spec
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
https://kubernetes.io/docs/tutorials/kubernetes-basics/cluster-interactive/
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
kubectl explain deployment
DESCRIPTION:
Deployment enables declarative updates for Pods and ReplicaSets.
FIELDS:
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 <Object>
Standard object metadata
spec <Object>
Specification of the desired behavior of the Deployment
status <Object>
Most recently observed status of the Deployment.
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
kubectl explain deployment.metadata
RESOURCE: metadata <Object
DESCRIPTION:
Standard object metadata.
ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
FIELDS:
clusterName <string>
The name of the cluster which the object belongs to. This is used to
distinguish resources with same name and namespace in different clusters.
This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.
finalizers <[]string>
Must be empty before the object is deleted from the registry. Each entry is
an identifier for the responsible component that will remove the entry from
the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.
initializers <Object>
An initializer is a controller which enforces some system invariant at
object creation time. This field is a list of initializers that have notyet
acted on this object. If nil or empty, this object has been completely
initialized. Otherwise, the object is considered uninitialized and ishidden
(in list/watch and get calls) from clients that haven’t explicitly asked to
observe uninitialized objects. When an object is created, the system will
populate this list with the current set of initializers. Only privileged
users may set or modify this list. Once it is empty, it may not be modified
further by any user.
selfLink <string>
SelfLink is a URL representing this object. Populated by the system.
Read-only.
generation <integer>
A sequence number representing a specific generation of the desired state.
Populated by the system. Read-only.
name <string>
Name must be unique within a namespace. Is required when creating
resources, although some resources may allow a client to request the
generation of an appropriate name automatically. Name is primarily intended
for creation idempotence and configuration definition. Cannot be updated.
More info: http://kubernetes.io/docs/user-guide/identifiers#names
namespace <string>
Namespace defines the space within each name must be unique. An empty
namespace is equivalent to the “default” namespace, but “default” is the
canonical representation. Not all objects are required to be scoped to a
namespace – the value of this field for those objects will be empty. Must
be a DNS_LABEL. Cannot be updated. More info:
http://kubernetes.io/docs/user-guide/namespaces
ownerReferences <[]Object>
List of objects depended by this object. If ALL objects in the list have
been deleted, this object will be garbage collected. If this object is
managed by a controller, then an entry in this list will point to this
controller, with the controller field set to true. There cannot be more thanone managing controller.
uid <string>
UID is the unique in time and space value for this object. It is typically
generated by the server on successful creation of a resource and is not
allowed to change on PUT operations. Populated by the system. Read-only.
More info: http://kubernetes.io/docs/user-guide/identifiers#uids
annotations <object>
Annotations is an unstructured key value map stored with a resource that
may be set by external tools to store and retrieve arbitrary metadata. They
are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations
creationTimestamp <string>
CreationTimestamp is a timestamp representing the server time when this
object was created. It is not guaranteed to be set in happens-before order
across separate operations. Clients may not set this value. It is
represented in RFC3339 form and is in UTC. Populated by the system.
Read-only. Null for lists. More info:
https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
generateName <string>
GenerateName is an optional prefix, used by the server, to generate a
unique name ONLY IF the Name field has not been provided. If this field is
used, the name returned to the client will be different than the name
passed. This value will also be combined with a unique suffix. The provided
value has the same validation rules as the Name field, and may be truncated
by the length of the suffix required to make the value unique on theserver.
If this field is specified and the generated name exists, the server will
NOT return a 409 – instead, it will either return 201 Created or 500 with
Reason ServerTimeout indicating a unique name could not be found in thetime
allotted, and the client should retry (optionally after the time indicated
in the Retry-After header). Applied only if Name is not specified. More
info:
https://git.k8s.io/community/contributors/devel/api- conventions.md#idempotency
resourceVersion <string>
An opaque value that represents the internal version of this object that
can be used by clients to determine when objects have changed. May be used
for optimistic concurrency, change detection, and the watch operation on a
resource or set of resources. Clients must treat these values as opaque and
passed unmodified back to the server. They may only be valid for a
particular resource or set of resources. Populated by the system.
Read-only. Value must be treated as opaque by clients and . More info:
https://git.k8s.io/community/contributors/devel/
api-conventions.md#concurrency-control-and-consistency/
deletionGracePeriodSeconds <integer>
Number of seconds allowed for this object to gracefully terminate before it
will be removed from the system. Only set when deletionTimestamp is also
set. May only be shortened. Read-only.
deletionTimestamp <string>
DeletionTimestamp is RFC 3339 date and time at which this resource will be
deleted. This field is set by the server when a graceful deletion is
requested by the user, and is not directly settable by a client. The
resource is expected to be deleted (no longer visible from resource lists,
and not reachable by name) after the time in this field. Once set, this
value may not be unset or be set further into the future, although it maybe
shortened or the resource may be deleted prior to this time. For example, a
user may request that a pod is deleted in 30 seconds. The Kubelet willreact
by sending a graceful termination signal to the containers in the pod.After
that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL)
to the container and after cleanup, remove the pod from the API. In the
presence of network partitions, this object may still exist after this
timestamp, until an administrator or automated process can determine the
resource is fully terminated. If not set, graceful deletion of the object
has not been requested. Populated by the system when a graceful deletionis
requested. Read-only. More info:
https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
labels <object>
Map of string keys and values that can be used to organize and categorize
(scope and select) objects. May match selectors of replication controllers
and services. More info: http://kubernetes.io/docs/user-guide/labels
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
kubectl explain deployment.spec
RESOURCE: spec <Object>
DESCRIPTION:
Specification of the desired behavior of the Deployment
DeploymentSpec is the specification of the desired behavior of the Deployment.
FIELDS:
paused <boolean>
Indicates that the deployment is paused and will not be processed by the
deployment controller.
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. Once autoRollback isimplemented,
the deployment controller will automatically rollback failed deployments.
Note that progress will not be estimated during the time a deployment is
paused. This is not set by default.
rollbackTo <Object>
The config this deployment is rolling back to. Will be cleared after
rollback is done.
selector <Object>
Label selector for pods. Existing ReplicaSets whose pods are selected by
this will be the ones affected by this deployment.
strategy <Object>
The deployment strategy to use to replace existing pods with new ones.
template <Object> -required-
Template describes the pods that will be created.
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)
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.
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
kubectl explain deployment.spec.selector
RESOURCE: selector <Object
DESCRIPTION:
Label selector for pods. Existing ReplicaSets whose pods are selected by
this will be the ones affected by this deployment.
A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
FIELDS:
matchExpressions <[]Object>
matchExpressions is a list of label selector requirements. The requirements
are ANDed.
matchLabels <object>
matchLabels is a map of {key,value} pairs. A single {key,value} in the
matchLabels map is equivalent to an element of matchExpressions, whose key
field is “key”, the operator is “In”, and the values array contains only
“value”. The requirements are ANDed.
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
kubectl explain deployment.spec.template
RESOURCE: template <Object>
DESCRIPTION:
Template describes the pods that will be created.
PodTemplateSpec describes the data a pod should have when created from a template
FIELDS:
metadata <Object>
Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
spec <Object>
Specification of the desired behavior of the pod. More info: https://
git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status/
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
kubectl explain deployment.spec.template.metadata
RESOURCE: metadata <Object>
DESCRIPTION:
Standard object’s metadata. More info:
https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
FIELDS:
namespace <string>
Namespace defines the space within each name must be unique. An empty
namespace is equivalent to the “default” namespace, but “default” is the
canonical representation. Not all objects are required to be scoped to a
namespace – the value of this field for those objects will be empty. Must
be a DNS_LABEL. Cannot be updated. More info:
http://kubernetes.io/docs/user-guide/namespaces
finalizers <[]string>
Must be empty before the object is deleted from the registry. Each entry is
an identifier for the responsible component that will remove the entry from
the list. If the deletionTimestamp of the object is non-nil, entries in this
list can only be removed.
generateName <string>
GenerateName is an optional prefix, used by the server, to generate a
unique name ONLY IF the Name field has not been provided. If this field is
used, the name returned to the client will be different than the name
passed. This value will also be combined with a unique suffix. The provided
value has the same validation rules as the Name field, and may be truncated
by the length of the suffix required to make the value unique on the server.
If this field is specified and the generated name exists, the server will
NOT return a 409 – instead, it will either return 201 Created or 500 with
Reason ServerTimeout indicating a unique name could not be found in the time
allotted, and the client should retry (optionally after the time indicated
in the Retry-After header). Applied only if Name is not specified. More
info:
https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency
ownerReferences <[]Object>
List of objects depended by this object. If ALL objects in the list have
been deleted, this object will be garbage collected. If this object is
managed by a controller, then an entry in this list will point to this
controller, with the controller field set to true. There cannot be more than
one managing controller.
creationTimestamp <string>
CreationTimestamp is a timestamp representing the server time when this
object was created. It is not guaranteed to be set in happens-before order
across separate operations. Clients may not set this value. It is
represented in RFC3339 form and is in UTC. Populated by the system.
Read-only. Null for lists. More info:
https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
deletionGracePeriodSeconds <integer>
Number of seconds allowed for this object to gracefully terminate before it
will be removed from the system. Only set when deletionTimestamp is also
set. May only be shortened. Read-only.
selfLink <string>
SelfLink is a URL representing this object. Populated by the system.
Read-only.
clusterName <string>
The name of the cluster which the object belongs to. This is used to
distinguish resources with same name and namespace in different clusters.
This field is not set anywhere right now and apiserver is going to ignore it
if set in create or update request.
name <string>
Name must be unique within a namespace. Is required when creating
resources, although some resources may allow a client to request the
generation of an appropriate name automatically. Name is primarily intended
for creation idempotence and configuration definition. Cannot be updated.
More info: http://kubernetes.io/docs/user-guide/identifiers#names
generation <integer>
A sequence number representing a specific generation of the desired state.
Populated by the system. Read-only.
initializers <Object>
An initializer is a controller which enforces some system invariant at
object creation time. This field is a list of initializers that have not yet
acted on this object. If nil or empty, this object has been completely
initialized. Otherwise, the object is considered uninitialized and is hidden
(in list/watch and get calls) from clients that haven’t explicitly asked to
observe uninitialized objects. When an object is created, the system will
populate this list with the current set of initializers. Only privileged
users may set or modify this list. Once it is empty, it may not be modified
further by any user.
labels <object>
Map of string keys and values that can be used to organize and categorize
(scope and select) objects. May match selectors of replication controllers
and services. More info: http://kubernetes.io/docs/user-guide/labels
resourceVersion <string>
An opaque value that represents the internal version of this object that
can be used by clients to determine when objects have changed. May be used
for optimistic concurrency, change detection, and the watch operation on a
resource or set of resources. Clients must treat these values as opaque and
passed unmodified back to the server. They may only be valid for a
particular resource or set of resources. Populated by the system.
Read-only. Value must be treated as opaque by clients and . More info:
https://git.k8s.io/community/contributors/devel/
api-conventions.md#concurrency-control-and-consistency/
uid <string>
UID is the unique in time and space value for this object. It is typically
generated by the server on successful creation of a resource and is not
allowed to change on PUT operations. Populated by the system. Read-only.
More info: http://kubernetes.io/docs/user-guide/identifiers#uids
annotations <object>
Annotations is an unstructured key value map stored with a resource that
may be set by external tools to store and retrieve arbitrary metadata. They
are not queryable and should be preserved when modifying objects. More info:
http://kubernetes.io/docs/user-guide/annotations
deletionTimestamp <string>
DeletionTimestamp is RFC 3339 date and time at which this resource will be
deleted. This field is set by the server when a graceful deletion is
requested by the user, and is not directly settable by a client. The
resource is expected to be deleted (no longer visible from resource lists,
and not reachable by name) after the time in this field. Once set, this
value may not be unset or be set further into the future, although it may be
shortened or the resource may be deleted prior to this time. For example, a
user may request that a pod is deleted in 30 seconds. The Kubelet will react
by sending a graceful termination signal to the containers in the pod. After
that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL)
to the container and after cleanup, remove the pod from the API. In the
presence of network partitions, this object may still exist after this
timestamp, until an administrator or automated process can determine the
resource is fully terminated. If not set, graceful deletion of the object
has not been requested. Populated by the system when a graceful deletion is
requested. Read-only. More info:
https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
kubectl explain deployment.spec.template.spec
RESOURCE: spec <Object>
DESCRIPTION:
Specification of the desired behavior of the pod. More info:
https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status/
PodSpec is a description of a pod.
FIELDS:
automountServiceAccountToken <boolean>
AutomountServiceAccountToken indicates whether a service account token
should be automatically mounted.
dnsPolicy <string>
Set DNS policy for containers within the pod. One of
‘ClusterFirstWithHostNet’, ‘ClusterFirst’ or ‘Default’. Defaults to
“ClusterFirst”. To have DNS options set along with hostNetwork, you have to
specify DNS policy explicitly to ‘ClusterFirstWithHostNet’.
hostIPC <boolean>
Use the host’s ipc namespace. Optional: Default to false.
serviceAccount <string>
DeprecatedServiceAccount is a depreciated alias for ServiceAccountName.
Deprecated: Use serviceAccountName instead.
securityContext <Object>
SecurityContext holds pod-level security attributes and common container
settings. Optional: Defaults to empty. See type description for default
values of each field.
tolerations <[]Object>
If specified, the pod’s tolerations.
affinity <Object>
If specified, the pod’s scheduling constraints
hostAliases <[]Object>
HostAliases is an optional list of hosts and IPs that will be injected into
the pod’s hosts file if specified. This is only valid for non-hostNetwork
pods.
hostname <string>
Specifies the hostname of the Pod If not specified, the pod’s hostname will
be set to a system-defined value.
initContainers <[]Object>
List of initialization containers belonging to the pod. Init containers are
executed in order prior to containers being started. If any init container
fails, the pod is considered to have failed and is handled according to its
restartPolicy. The name for an init container or normal container must be
unique among all containers. Init containers may not have Lifecycle actions,
Readiness probes, or Liveness probes. The resourceRequirements of an init
container are taken into account during scheduling by finding the highest
request/limit for each resource type, and then using the max of of that
value or the sum of the normal containers. Limits are applied to init
containers in a similar fashion. Init containers cannot currently be added
or removed. Cannot be updated. More info:
https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
restartPolicy <string>
Restart policy for all containers within the pod. One of Always, OnFailure,
Never. Default to Always. More info:
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
schedulerName <string>
If specified, the pod will be dispatched by specified scheduler. If not
specified, the pod will be dispatched by default scheduler.
subdomain <string>
If specified, the fully qualified Pod hostname will be
“<hostname>.<subdomain>.<pod namespace>.svc.<cluster domain>”. If not
specified, the pod will not have a domainname at all.
containers <[]Object> -required-
List of containers belonging to the pod. Containers cannot currently be
added or removed. There must be at least one container in a Pod. Cannot be
updated.
hostNetwork <boolean>
Host networking requested for this pod. Use the host’s network namespace.
If this option is set, the ports that will be used must be specified.
Default to false.
hostPID <boolean>
Use the host’s pid namespace. Optional: Default to false.
nodeName <string>
NodeName is a request to schedule this pod onto a specific node. If it is
non-empty, the scheduler simply schedules this pod onto that node, assuming
that it fits resource requirements.
nodeSelector <object>
NodeSelector is a selector which must be true for the pod to fit on a node.
Selector which must match a node’s labels for the pod to be scheduled on
that node. More info:
https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
serviceAccountName <string>
ServiceAccountName is the name of the ServiceAccount to use to run this
pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/
configure-service-account//
activeDeadlineSeconds <integer>
Optional duration in seconds the pod may be active on the node relative to
StartTime before the system will actively try to mark it failed and kill
associated containers. Value must be a positive integer.
imagePullSecrets <[]Object>
ImagePullSecrets is an optional list of references to secrets in the same
namespace to use for pulling any of the images used by this PodSpec. If
specified, these secrets will be passed to individual puller implementations
for them to use. For example, in the case of docker, only DockerConfig type
secrets are honored. More info: https://kubernetes.io/docs/concepts/
containers/images#specifying-imagepullsecrets-on-a-pod/
terminationGracePeriodSeconds <integer>
Optional duration in seconds the pod needs to terminate gracefully. May be
decreased in delete request. Value must be non-negative integer. The value
zero indicates delete immediately. If this value is nil, the default grace
period will be used instead. The grace period is the duration in seconds
after the processes running in the pod are sent a termination signal and the
time when the processes are forcibly halted with a kill signal. Set this
value longer than the expected cleanup time for your process. Defaults to 30
seconds.
volumes <[]Object>
List of volumes that can be mounted by containers belonging to the pod.
More info: https://kubernetes.io/docs/concepts/storage/volumes
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
kubectl explain deployment.spec.template.spec.containers
RESOURCE: containers <[]Object>
DESCRIPTION:
List of containers belonging to the pod. Containers cannot currently be
added or removed. There must be at least one container in a Pod. Cannot be
updated.
A single application container that you want to run within a pod.
FIELDS:
ports <[]Object>
List of ports to expose from the container. Exposing a port here gives the
system additional information about the network connections a container
uses, but is primarily informational. Not specifying a port here DOES NOT
prevent that port from being exposed. Any port which is listening on the
default “0.0.0.0” address inside a container will be accessible from the
network. Cannot be updated.
readinessProbe <Object>
Periodic probe of container service readiness. Container will be removed
from service endpoints if the probe fails. Cannot be updated. More info:
https://kubernetes.io/docs/concepts/workloads/pods/
pod-lifecycle#container-probes/
resources <Object>
Compute Resources required by this container. Cannot be updated. More info:
https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
securityContext <Object>
Security options the pod should run with. More info:
https://kubernetes.io/docs/concepts/policy/security-context/ More info:
https://git.k8s.io/community/contributors/design-proposals/security_context.md
terminationMessagePath <string>
Optional: Path at which the file to which the container’s termination
message will be written is mounted into the container’s filesystem. Message
written is intended to be brief final status, such as an assertion failure
message. Will be truncated by the node if greater than 4096 bytes. The total
message length across all containers will be limited to 12kb. Defaults to
/dev/termination-log. Cannot be updated.
envFrom <[]Object>
List of sources to populate environment variables in the container. The
keys defined within a source must be a C_IDENTIFIER. All invalid keys will
be reported as an event when the container is starting. When a key exists in
multiple sources, the value associated with the last source will take
precedence. Values defined by an Env with a duplicate key will take
precedence. Cannot be updated.
imagePullPolicy <string>
Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always
if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated.
More info:
https://kubernetes.io/docs/concepts/containers/images#updating-images
lifecycle <Object>
Actions that the management system should take in response to container
lifecycle events. Cannot be updated.
volumeMounts <[]Object>
Pod volumes to mount into the container’s filesystem. Cannot be updated.
name <string> -required-
Name of the container specified as a DNS_LABEL. Each container in a pod
must have a unique name (DNS_LABEL). Cannot be updated.
stdin <boolean>
Whether this container should allocate a buffer for stdin in the container
runtime. If this is not set, reads from stdin in the container will always
result in EOF. Default is false.
workingDir <string>
Container’s working directory. If not specified, the container runtime’s
default will be used, which might be configured in the container image.
Cannot be updated.
args <[]string>
Arguments to the entrypoint. The docker image’s CMD is used if this is not
provided. Variable references $(VAR_NAME) are expanded using the container’s
environment. If a variable cannot be resolved, the reference in the input
string will be unchanged. The $(VAR_NAME) syntax can be escaped with a
double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
regardless of whether the variable exists or not. Cannot be updated. More
info: https://kubernetes.io/docs/tasks/inject-data-application/
define-command-argument-container/#running-a-command-in-a-shell/
env <[]Object>
List of environment variables to set in the container. Cannot be updated.
livenessProbe <Object>
Periodic probe of container liveness. Container will be restarted if the
probe fails. Cannot be updated. More info: https://kubernetes.io/docs/
concepts/workloads/pods/pod-lifecycle#container-probes/
image <string> -required-
Docker image name. More info:
https://kubernetes.io/docs/concepts/containers/images
tty <boolean>
Whether this container should allocate a TTY for itself, also requires
‘stdin’ to be true. Default is false.
command <[]string>
Entrypoint array. Not executed within a shell. The docker image’s
ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME)
are expanded using the container’s environment. If a variable cannot be
resolved, the reference in the input string will be unchanged. The
$(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME).
Escaped references will never be expanded, regardless of whether the
variable exists or not. Cannot be updated. More info: https://kubernetes.io/
docs/tasks/inject-data-application/define-command-argument-container/
#running-a-command-in-a-shell/
stdinOnce <boolean>
Whether the container runtime should close the stdin channel after it has
been opened by a single attach. When stdin is true the stdin stream will
remain open across multiple attach sessions. If stdinOnce is set to true,
stdin is opened on container start, is empty until the first client attaches
to stdin, and then remains open and accepts data until the client
disconnects, at which time stdin is closed and remains closed until the
container is restarted. If this flag is false, a container processes that
reads from stdin will never receive an EOF. Default is false
terminationMessagePolicy <string>
Indicate how the termination message should be populated. File will use the
contents of terminationMessagePath to populate the container status message
on both success and failure. FallbackToLogsOnError will use the last chunk
of container log output if the termination message file is empty and the
container exited with an error. The log output is limited to 2048 bytes or
80 lines, whichever is smaller. Defaults to File. Cannot be updated.
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
kubectl explain deployment.spec.template.spec.containers.env
RESOURCE: env <[]Object>
DESCRIPTION:
List of environment variables to set in the container. Cannot be updated.
EnvVar represents an environment variable present in a Container.
FIELDS:
name <string> -required-
Name of the environment variable. Must be a C_IDENTIFIER.
value <string>
Variable references $(VAR_NAME) are expanded using the previous defined
environment variables in the container and any service environment
variables. If a variable cannot be resolved, the reference in the input
string will be unchanged. The $(VAR_NAME) syntax can be escaped with a
double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
regardless of whether the variable exists or not. Defaults to “”.
valueFrom <Object>
Source for the environment variable’s value. Cannot be used if value is not
Empty.
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
kubectl explain deployment.spec.template.spec.containers.volumeMounts
RESOURCE: volumeMounts <[]Object>
DESCRIPTION:
Pod volumes to mount into the container’s filesystem. Cannot be updated.
VolumeMount describes a mounting of a Volume within a container.
FIELDS:
name <string> -required-
This must match the Name of a Volume.
readOnly <boolean>
Mounted read-only if true, read-write otherwise (false or unspecified).
Defaults to false.
subPath <string>
Path within the volume from which the container’s volume should be mounted.
Defaults to “” (volume’s root).
mountPath <string> -required-
Path within the container at which the volume should be mounted. Must not
contain ‘:’.
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
kubectl explain deployment.spec.template.spec.volumes
RESOURCE: volumes <[]Object>
DESCRIPTION:
List of volumes that can be mounted by containers belonging to the pod.
More info: https://kubernetes.io/docs/concepts/storage/volumes
Volume represents a named volume in a pod that may be accessed by any container in the pod.
FIELDS:
vsphereVolume <Object>
VsphereVolume represents a vSphere volume attached and mounted on kubelets
host machine
flocker <Object>
Flocker represents a Flocker volume attached to a kubelet’s host machine.
This depends on the Flocker control service being running
quobyte <Object>
Quobyte represents a Quobyte mount on the host that shares a pod’s lifetime
photonPersistentDisk <Object>
PhotonPersistentDisk represents a PhotonController persistent disk attached
and mounted on kubelets host machine
portworxVolume <Object>
PortworxVolume represents a portworx volume attached and mounted on
kubelets host machine
configMap <Object>
ConfigMap represents a configMap that should populate this volume
emptyDir <Object>
EmptyDir represents a temporary directory that shares a pod’s lifetime.
More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
storageos <Object>
StorageOS represents a StorageOS volume attached and mounted on Kubernetes
nodes.
awsElasticBlockStore <Object>
AWSElasticBlockStore represents an AWS Disk resource that is attached to a
kubelet’s host machine and then exposed to the pod. More info:
https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
fc <Object>
FC represents a Fibre Channel resource that is attached to a kubelet’s host
machine and then exposed to the pod.
gcePersistentDisk <Object>
GCEPersistentDisk represents a GCE Disk resource that is attached to a
kubelet’s host machine and then exposed to the pod. More info:
https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
projected <Object>
Items for all in one resources secrets, configmaps, and downward API
azureFile <Object>
AzureFile represents an Azure File Service mount on the host and bind mount
to the pod.
flexVolume <Object>
FlexVolume represents a generic volume resource that is
provisioned/attached using an exec based plugin. This is an alpha feature
and may change in future.
iscsi <Object>
ISCSI represents an ISCSI Disk resource that is attached to a kubelet’s
host machine and then exposed to the pod. More info:
https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md
persistentVolumeClaim <Object>
PersistentVolumeClaimVolumeSource represents a reference to a
PersistentVolumeClaim in the same namespace. More info: https://
kubernetes.io/docs/concepts/storage/
persistent-volumes#persistentvolumeclaims/
secret <Object>
Secret represents a secret that should populate this volume. More info:
https://kubernetes.io/docs/concepts/storage/volumes#secret
cinder <Object>
Cinder represents a cinder volume attached and mounted on kubelets host
machine More info:
https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
gitRepo <Object>
GitRepo represents a git repository at a particular revision.
hostPath <Object>
HostPath represents a pre-existing file or directory on the host machine
that is directly exposed to the container. This is generally used for system
agents or other privileged things that are allowed to see the host machine.
Most containers will NOT need this. More info:
https://kubernetes.io/docs/concepts/storage/volumes#hostpath
downwardAPI <Object>
DownwardAPI represents downward API about the pod that should populate this
volum
glusterfs <Object>
Glusterfs represents a Glusterfs mount on the host that shares a pod’s
lifetime. More info:
https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md
azureDisk <Object>
AzureDisk represents an Azure Data Disk mount on the host and bind mount to
the pod.
cephfs <Object>
CephFS represents a Ceph FS mount on the host that shares a pod’s lifetime
rbd <Object>
RBD represents a Rados Block Device mount on the host that shares a pod’s
lifetime. More info:
https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md
scaleIO <Object>
ScaleIO represents a ScaleIO persistent volume attached and mounted on
Kubernetes nodes.
name <string> -required-
Volume’s name. Must be a DNS_LABEL and unique within the pod. More info:
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
nfs <Object>
NFS represents an NFS mount on the host that shares a pod’s lifetime More
info: https://kubernetes.io/docs/concepts/storage/volumes#nfs