Reputation: 100
Let's suppose there's a system that is supposed to work on a Kubernetes cluster. There is a development environment setup up and running.
Then, it requires to be deployed to another cluster that is brand-new and empty. The system consists of several deployments, a bunch of services, and ingresses. There are some volumes and PVCs. They all are installed using kubectl or Helm, and manually configured using secrets.
What if we need a sort of installation tool to set everything up an existing cluster? What if we might need to update some microservices afterward?
Is there any Kubernetes management tool that could help to deploy the whole app or to update some microservices? I can imagine creating a bat-file to run helm install several times for each microservice used but probably there's a better solution for that.
EDIT: I should have been more clear on that, but assuming there are several customers to use an app, and the app needs to be deployed to different clusters on their side. The microservices forming the app could be a bunch of Helm charts. I would like to have a tool that could save a client from running console commands as much as possible while installing the solution to their cluster. Ideally, it should also allow us to update some microservices selectively. This is not about CI/CD which is pretty much for development, but about deploying and upgrading app components into different clusters of customers.
Upvotes: 0
Views: 146
Reputation: 152
I've used terraform
for this, which allows me to specify the state of my deployments declaratively. (Another declarative tool would be https://github.com/fluxcd/flux, but I've no experience at all with it.)
terraform
's official k8s provider doesn't work with kubectl apply
( https://github.com/hashicorp/terraform-provider-kubernetes/issues/141), so for things that were usually applied via kubectl apply
, I just create a wrapper helm chart for it.
Upvotes: 1
Reputation: 153
Assuming your organization is developing services in microservices architecture and is deploying in a kubernetes cluster, you must use some CD tool (continuous delivery tool) to add new microservices services, or even update a service. In my point o view if you are using kubectl to update production or homologation (even development) workloads, you are doing it wrong, because in a microservice archicture tha number of moving parts can scale like we never seen before, and this act can put you in a microservice management hell.
The use of this kind of tool (CD tool) can facilitate the migration of cluster or promotion of services between enviroments.
E se precisarmos de um tipo de ferramenta de instalação para configurar tudo em um cluster existente?
Take a look in Terraform (https://www.terraform.io/) and Ansible (https://www.ansible.com/), this last one (ansible), had a lots of plugins and support shell scripts and or bat-file executions that allows you to code scripts and organizational needs.
What if we might need to update some microservices afterward?
Take a look in tools like Jenkins (https://www.jenkins.io), DroneIO (https://drone.io)... Some organizations use Python scripts, or Go and so on this kind of aprouch is near to you propoused scenario using bat-file, I, personally, do not like this approch, I think the best solution is to pick a tool from CNCF Landscape (https://landscape.cncf.io/zoom=150) in Continuous Integration & Delivery group, these are tools test and used in the market.
Upvotes: 2