FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

angular/.deploy/helm at develop · newdev213/angular · GitHub

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

README.md

Helm

One time Helm setup and configuration

Install Helm CLI

brew install kubernetes-helm

Install Tiller

first time only: setup tiller in default kube-system namespace or your private namespace

# Install tiller into default `kube-system` namespace
helm init
# Install tiller into your private namespace (below showing `kube-system` namespace, but it could be any of your namespaces)
helm init --tiller-namespace=kube-system --service-account=default --tiller-image=gcr.io/kubernetes-helm/tiller:v2.13.0

# Upgrade tiller to latest version
export TILLER_TAG=v2.13.0
helm init --upgrade --tiller-namespace=kube-system --service-account=default --tiller-image=gcr.io/kubernetes-helm/tiller:$TILLER_TAG

# Verify the installation
helm version --tiller-namespace=kube-system
helm ls -a --tiller-namespace=kube-system --debug

# Uninstall tiller from your namespace
helm reset --tiller-namespace=kube-system

# if needed
helm init --client-only --tiller-namespace=kube-system
helm repo update --tiller-namespace=kube-system

Install Charts

# example chart instalation
# --dry-run --debug flags help you to see before you really deploy
helm install --name=nginx-ingress --namespace=default --tiller-namespace=kube-system  ./charts-master/incubator/nginx-ingress
helm install --name=traefik       --namespace=default --tiller-namespace=kube-system  -f  traefik-values.yaml stable/traefik

Using Helm without Tiller

  1. Fetching the chart templates
  2. Rendering the template with configurable values
  3. Applying the result to the cluster
# Fetching the chart templates
helm fetch  \
  --untar \
  --untardir charts/stable \
stable/traefik

# Rendering the template with configurable values
cp charts/stable/traefik/values.yaml \
  values/traefik-values.yaml

# copied traefik.yaml can now be adjusted as needed

# To render the manifests from the template source with the potentially edited values file:
mkdir -p manual/stable

helm template \
  --values values-prod.yaml  \
  --name traefik \
  --tiller-namespace kube-system \
  --namespace default \
  --output-dir manual/stable  \
    charts/stable/traefik

# Applying the result to the cluster
kubectl apply --recursive --filename manual/stable/traefik

Managing Helm Chart Secrets with helm-secrets

Install dependencies for helm-secrets plugin

brew install gnu-getopt
# brew install gnupg
brew install gpg1
ln -s /usr/local/bin/gpg1 /usr/local/bin/gpg

Create your GPG key:

gpg --gen-key

Create your GPG key with YubiKey:

only works when using latest gpg2

gpg --expert --full-gen-key
# note key ID, in this case is 1234ABC
"gpg: key 1234ABC marked as ultimately trusted"

To export your public key:

gpg --export --armor <my_eamil> > mypubkey.asc

To backup your private key:

gpg --export -secret-key --armor <1234ABC>

To import another person’s public key:

gpg --import theirpubkey.asc

To list the public keys in your keyring:

gpg --list-keys

To list private keys in your keyring:

gpg --list-secret-keys

To find out the fingerprint of your key

gpg --fingerprint

Install helm-secrets plugin

helm plugin install https://github.com/futuresimple/helm-secrets

# test
helm secrets help

With the helm wrapper you can easily run helm secrets install/upgrade/rollback with secrets files included as -f option from you values dir tree.

Follow infractions Kubernetes Deployments with Helm - Secrets

secrets file should be named with secrets[.*].yaml pattern

Additional Commands

helm secrets enc secrets.yaml
helm secrets view secrets.yaml
helm secrets edit secrets.yaml
helm secrets dec secrets.yaml
helm secrets clean <your_chart_directory>

Reference

  1. What You Yaml is What You Get
  2. helm-nomagic
  3. Helm from the trenches
  4. How To Use GPG on the Command Line
  5. Using Your YubiKey with OpenPGP
  6. Kubernetes Deployments with Helm - Secrets

Back | FazBrowse Home | New Git URL