init-container for container deploy action
# 🌱|help-and-getting-started
w
Is there a way to configure an init-container for the container deploy action? If not is there a way to decompose was container does and turn that into k8s yamls
f
Hi @wonderful-table-85939 , the container deploy action does not have an init-container field. However as you have already stated you can use the k8s deploy action. To get the k8s yaml from your container deploy action, you can use kubectl on the deployed resource e.g. if it is a Deployment you can run:
Copy code
kubectl get deploy <my-deployment-name> -o yaml
A container deploy action also deploys services and even ingresses depending on your configuration, so you can identify the resources created by it and fetch them with kubectl as in the above command. To get an overview of all the resources in the namespace run:
Copy code
kubectl get all
Garden will if not specified differently name all the resources with the container deploy action name. Hope that helps!
w
It would be cool to have something like garden export deploy. when a use case grows out of the container use case
6 Views