Imperative programming gives a system direct commands for the operation it should perform. In Kubernetes, it offers a quick way to deploy an application without first writing a YAML or JSON manifest. section 3.3 section 3.3.1
The command kubectl create deployment creates a Deployment object with a chosen name and container image. Kubernetes stores that object in its API as the desired state, then works to make the running cluster match it. section 3.3.1
An imperative Kubernetes deployment typically involves these steps:
- Choose the application name and container image. section 3.3.1
- Run kubectl create deployment with those values. section 3.3.1
- Inspect the Deployment or its Pods to see whether the application is ready. section 3.3.1
- Use events and status information to follow scheduling, image pulling, container creation, and startup. section 3.3.1
Create a deployment
Run kubectl create deployment kiada --image=luksa/kiada:0.1. The command creates a Deployment named kiada and tells Kubernetes to run the specified image. Check progress with kubectl get deployments. section 3.3.1
$ kubectl create deployment kiada --image=luksa/kiada:0.1 deployment.apps/kiada created
The command output confirms that Kubernetes accepted the imperative request and created the Deployment object. section 3.3.1













