// Module included in the following assemblies:
//
// * microshift/running_applications/microshift-applications.adoc

:_mod-docs-content-type: PROCEDURE
[id="microshift-applying-manifests-example_{context}"]
= Using manifests example

[role="_abstract"]
You can automatically deploy a BusyBox container on {microshift-short} by using `kustomize` manifests in the `/etc/microshift/manifests` directory.

.Procedure
. Create the BusyBox manifest files by running the following commands:
+
.. Define the directory location:
+
[source,terminal]
----
$ MANIFEST_DIR=/etc/microshift/manifests
----
+
.. Make the directory:
+
[source,terminal]
----
$ sudo mkdir -p ${MANIFEST_DIR}
----
+
.. Place the YAML file in the directory:
+
[source,text]
----
sudo tee ${MANIFEST_DIR}/busybox.yaml &>/dev/null <<EOF
apiVersion: v1
kind: Namespace
metadata:
  name: busybox
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: busybox
  namespace: busybox-deployment
spec:
  selector:
    matchLabels:
      app: busybox
  template:
    metadata:
      labels:
        app: busybox
    spec:
      containers:
      - name: busybox
        image: BUSYBOX_IMAGE
        command: [ "/bin/sh", "-c", "while true ; do date; sleep 3600; done;" ]
EOF
----

. Next, create the `kustomize` manifest files by running the following commands:
+
.. Place the YAML file in the directory:
+
[source,text]
----
sudo tee ${MANIFEST_DIR}/kustomization.yaml &>/dev/null <<EOF
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: busybox
resources:
  - busybox.yaml
images:
  - name: BUSYBOX_IMAGE
    newName: busybox:1.35
EOF
----

. Restart {microshift-short} to apply the manifests by running the following command:
+
[source,terminal]
----
$ sudo systemctl restart microshift
----
+
. Apply the manifests and start the `busybox` pod by running the following command:
+
[source,terminal]
----
$ oc get pods -n busybox
----
