How to Install K8up

Helm

The most convenient way to install K8up is using helm.

  1. Add the appuio repository:

    helm repo add appuio https://charts.appuio.ch
    helm repo update
  2. Install K8up:

    kubectl create namespace k8up-operator
    helm install k8up appuio/k8up --namespace k8up-operator

Kustomize

The following installs Kustomize in the k8up-system namespace with default values.

kubectl apply -k config/default

If you wish to customize manifests, you need to create a new directory with kustomization.yaml. The following example sets another namespace and adds the RBAC auth proxy for the metrics (if you want to restrict the metrics from public access).

resources:
- github.com/k8up-io/k8up/config/default?ref=master
- github.com/k8up-io/k8up/config/auth-proxy?ref=master

namespace: my-custom-namespace

patchesJson6902:
- target:
    group: apps
    version: v1
    kind: Deployment
    name: operator
  patch: |-
    - op: add
      path: "/spec/template/spec/containers/-"
      value:
        name: kube-rbac-proxy
        image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0
        args:
        - "--secure-listen-address=0.0.0.0:8443"
        - "--upstream=http://127.0.0.1:8080/"
        - "--logtostderr=true"
        - "--v=10"
        ports:
        - containerPort: 8443
          name: https

Then you can build with Kustomize:

kustomize build my-custom-k8up-dir | kubectl apply -f -
The Kustomize version included in kubectl -k is often several versions behind Kustomize itself. It may not support advanced features such as directly referencing a Git repository with path and ref to import manifests.

Samples

Some K8up examples are located at config/samples/ in the K8up repository:

kubectl apply -k config/samples/

Please be aware that these manifests are intended for dev and as examples.