GithubHelp home page GithubHelp logo

marianogg9 / helmfiling Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 9 KB

Playing around with Helmfile

Home Page: https://blog.mariano.cloud/helm-declaration-environments-helmfile

helm helmfile kubernetes yaml

helmfiling's Introduction

Helmfile(ing)

Running an example Helmfile release deploying httpbin app in Minikube.

Please have a look at the blog article I wrote for a better overview.

Schema

.
├── README.md
├── charts
│   └── httpbin
│       ├── Chart.yaml
│       └── templates
│           ├── deployment.yaml
│           ├── service.yaml
│           └── serviceaccount.yaml
├── default-values.yaml
├── environments.yaml
├── example-environment-values.yaml
├── helmfile.yaml
└── values.yaml.gotmpl
  • charts/ contains a minimal httpbin Helm chart definition and all the resources' templates.
  • default-values.yaml is the default environment set of values.
  • environments.taml defines both default and example environments with their respective values files.
  • example-environment-values.yaml is the example environment set of values.
  • helmfile.yaml is where all releases are defined.
  • values.yaml.gotmpl uses GO templating to reference different values. This template will be used as a centralised definition to be used by different environments.

Installation

I am using a Mac, so every installation is pointing to using that OS; all the below have their options when it comes to different platforms.

  • As a first prerequisite, Minikube.

    brew install minikube
  • Kubectl.

    curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl"
  • Then Helmfile

    brew install helmfile

Deploying

Start Minikube cluster.

minikube start

Clone this repository.

git clone https://github.com/marianogg9/helmfiling.git
cd helmfiling

Run Helmfile in dry-run mode (to see what will be deployed).

helmfile -e example diff

Then deploy resources.

helmfile -e example apply

To check deployment status.

helmfile status

And many more CLI commands to explore.

Updating

To modify a value, release, template or resource, just update its definition and visualize future changes.

helmfile -e example diff

And then deploy.

helmfile -e example apply

Cleaning up

Once finished, let's clean all up by deleting Helmfile releases (all resources defined in a release will be deleted).

helmfile -e example destroy

Keep in mind the above destroy command will not ask for a confirmation.

Then delete Minikube cluster.

minikube delete --all

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.