We've covered the differences between declarative and imperative approaches earlier in Chapter 9, Continuous Integration/Continuous Deployment. Kubernetes takes the declarative approach. Instead of giving instructions regarding the steps that need to be taken, you provide the resources that describe your cluster's desired state. It is up to the control plane to allocate internal resources so that they fulfill your needs.
It is possible to add the resources using the command line directly. This can be quick for testing, but you want to have a trail of the resources you created most of the time. Thus, most people work with manifest files, which provide a coded description of the resources required. Manifests are typically YAML files, but it is also possible to use JSON.
Here's an example YAML manifest with a single Pod:
apiVersion: v1 kind: Pod metadata: name: simple-server labels: app: dominican-front spec: containers: -...