I am installing the SQL Server cluster in Kubernetes setup using the below document.
I am able to install the cluster successfully. But I need to customize the deployment by specifying the custom docker image, add additional containers.
May I know how to get the deployment YAML file & Dockerfile for all the images in the running containers?
I have tried "kubectl edit", but not able to edit required details.
Kubernetes Cheat Sheet is a good source for kubectl commands.
Let's say your deployments are created in develop namespace. Below command will help you to get a yaml out of your deployment, --export flag will remove the cluster specific information.
kubectl get deploy <your-deployment-name> --namespace=develop -o yaml --export > your-deployment.yamlBelow command will help you to get a json out of your deployment.
kubectl get deploy <your-deployment-name> --namespace=develop -o json --export > your-deployment.yamlFor Kubernetes YAML files you can use:
kubectl get <pod,svc,all,etc> <name> --export=true -o yaml or
kubectl get <pod,svc,all,etc> <name> -o yamlFor Docker Dockerfiles there is whole post on stackoverflow which explain how to create a dockerfile from an image.
the easiest way of doing that is using something like:
kubectl get deployment -n %yournamespace% -o yaml > export.yaml