<p>Are the resources in a kubernetes YAML manifest created in sequence?</p>
<p>Say I have a manifest file like so</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: app-config
  namespace: default
data:
  prop.value: 1
----
apiVersion: v1
kind: Pod
metadata:
  name: test-pod
spec:
  containers:
    - name: test-container
      image: registry.k8s.io/busybox
      command: [ &quot;/bin/sh&quot;, &quot;-c&quot;, &quot;env&quot; ]
      env:
        - name: PROP_VALUE
          valueFrom:
            configMapKeyRef:
              name: app-config
              key: prop.value
  restartPolicy: Never
</code></pre>
<p>Will ConfigMap be created before Deployment, so Deployment can use the correct ConfigMap value?</p>

Anugerah Erlaut
<p>Yes: <a href="https://kubernetes.io/docs/concepts/cluster-administration/manage-deployment/" rel="noreferrer">Manage Deployment</a></p>
<blockquote>
<p>The resources will be created in the order they appear in the file.</p>
</blockquote>
<p>But this should not matter too much in kubernetes. If the Deployment is created first, it will spawn the pods once the ConfigMap is ready.</p>
