<p>I am setting up kubernetes for an application with 8 microservices,activemq,postgres,redis and mongodb.</p>
<p>After the entire configuration of pods and deployment ,is there any way to create a single master deployment yaml file which will create the entire set of services,replcas etc for the entire application.</p>
<p>Note:I will be using multiple deployment yaml files,statefulsets etc for all above mentioned services.</p>

Sarath S
<p>You can use this script:</p>
<pre><code>NAMESPACE=&quot;your_namespace&quot;
RESOURCES=&quot;configmap secret daemonset deployment service hpa&quot;

for resource in ${RESOURCES};do
  rsrcs=$(kubectl -n ${NAMESPACE} get -o json ${resource}|jq '.items[].metadata.name'|sed &quot;s/\&quot;//g&quot;)
  for r in ${rsrcs};do
    dir=&quot;${NAMESPACE}/${resource}&quot;
    mkdir -p &quot;${dir}&quot;
    kubectl -n ${NAMESPACE} get -o yaml ${resource} ${r} &gt; &quot;${dir}/${r}.yaml&quot;
  done
done
</code></pre>
<p>Remember to specify what resources you want exported in the script.</p>
<p><a href="https://gist.github.com/negz/c3ee465b48306593f16c523a22015bec" rel="nofollow noreferrer">More info here </a></p>
