I have deployment.yaml & service.yaml files to deploy application in kubernetes(minikube).
To do a manual deployment i can use kubectl apply -f <file.yaml>
to create resources but i am looking for a way to automate deployment using scripts. so i can trigger a script and all the needed yaml can be triggered and pods created accordingly.
Any suggestion or guidance will be helpful.
CodePudding user response:
You can use a script to call kubectl for simple scenarious. For more complex setups have a look at Argo cd https://argoproj.github.io/
CodePudding user response:
There are many ways to automate your task. Any scripting language would be alright; such as Bash
, Ansible
, etc. If you are looking for sophisticated deployment tools, you can have a look at the common Kubernetes CI/CD tools
Kubernetes automation doesn't end with the CI/CD. When you have multiple applications with each of them has specific environment variables, security credentials, specific network and security requirements etc., then you will also need tools for organizing Kubernetes configuration, such as Helm
and Kustomize
.