Install Order in K8s

1/17/2019

I have a set of yaml files which are of different Kinds like

1 PVC

1 PV (The above PVC claims this PV)

1 Service

1 StatefulSet Object (The above Service is for this Stateful Set

1 Config Map (The above Stateful set uses this config map

Does the Install order of these objects matter to bring up an application using these?

-- KD157
kubernetes

1 Answer

1/17/2019

If you do kubectl apply -f dir on a directory containing all of those files then it should work, at least if you have the latest version as there have been bugs raised and addressed in this area.

However, there are some dependencies which aren't hard dependencies and for which there is discussion. For this reason some are choosing to order the resources themselves or use a deployment tool like helm which deploys resources in a certain order.

-- Ryan Dawson
Source: StackOverflow