Minos Pong
Minos Pong

Reputation: 335

What scripting language should be used to deploy Kubernetes?

I have to deploy a Kubernetes cluster, and I currently use bash to set up the security key, the environment prop, create pods etc with kuberctl. But I am wondering if bash is a good choice to used when the deployment steps getting big. E.g. ~50 deployment and services.

Is that a better choice than bash on deploying system under kubernetes? Any good example of automatic deployment under Kubernetes?

Upvotes: 1

Views: 2355

Answers (2)

AR1
AR1

Reputation: 5003

In order to install/manage resources in kubernetes the advised solution is to use Helm Package Manager.

Helm is a tool for managing Kubernetes charts. Charts are packages of pre-configured Kubernetes resources.

So most configurations would belong to applications and tools charts.

Then you can use a third party tool (anSible, puppet, chef) in order to help with the automation. In general I prefer to use Ansible as it relies mainly on ssh commands and it's easier to manage compared to Chef and Puppet whose scripts get really messy real quick. I prefer composition over orchestration.

Upvotes: 1

Javier Salmeron
Javier Salmeron

Reputation: 8835

I advise you to check ksonnet/kubecfg. It is designed for declaratively managing Kubernetes deployments https://github.com/ksonnet/kubecfg

Taken from their website:

The idea is to describe as much as possible about your configuration as files in version control (eg: git).

Changes to the configuration follow a regular review, approve, merge, etc code change workflow (github pull-requests, phabricator diffs, etc). At any point, the config in version control captures the entire desired-state, so the system can be easily recreated in a QA cluster or to recover from disaster.

Upvotes: 0

Related Questions