In the upstream Kubernetes project, a new first-class object type called
deployments was added in version 1.2. This object type (referred to here as
Kubernetes deployments for distinction) serves as a descendant of the
deployment configuration object type.
Like deployment configurations, Kubernetes deployments describe the desired
state of a particular component of an application as a pod template. Kubernetes
deployments create replica sets (an iteration of
replication controllers), which orchestrate pod lifecycles.
For example, this definition of a Kubernetes deployment creates a replica set to
bring up one hello-openshift pod:
Example Kubernetes Deployment Definition hello-openshift-deployment.yaml
- name: hello-openshift
- containerPort: 80
After saving the definition to a local file, you could then use it to create a
$ oc create -f hello-openshift-deployment.yaml
You can use the CLI to inspect and operate on Kubernetes deployments and replica
sets like other object types, as described in
describe. For the object type, use
deploy for Kubernetes deployments and
rs for replica
See the Kubernetes documentation for more details about
kubectl in CLI usage examples.