K3s: Loading Helm manifests without namespace or default fails

Created on 8 Mar 2019  路  1Comment  路  Source: k3s-io/k3s

From rancher/k3s/issues/151

As for helm charts, I tried:

apiVersion: k3s.cattle.io/v1
kind: HelmChart
metadata:
  name: redis
spec:
  chart: stable/redis

which doesn't work for me. I don't get any error output about it either. This doesn't either:

apiVersion: k3s.cattle.io/v1
kind: HelmChart
metadata:
  name: redis
  namespace: default
spec:
  chart: stable/redis

Only specifiying kube-system seems to work:

apiVersion: k3s.cattle.io/v1
kind: HelmChart
metadata:
  name: redis
  namespace: kube-system
spec:
  chart: stable/redis

Editing this chart to say default results in it creating job.batch/helm-delete-redis to delete redis from cluster.

help wanted kindocumentation

Most helpful comment

@dpen2000 it's just not clear from the docs, but the namespace in metadata section is the namespace for the HelmChart CRD resource, so it's probably best to leave kube-system there. The actual namespace where all helm chart resources will reside is set with targetNamespace:

apiVersion: k3s.cattle.io/v1                                                                                                                                                
kind: HelmChart                                                                                                                                                             
metadata:
  name: rook-operator
  namespace: kube-system
spec:
  chart: rook-ceph
  repo: https://charts.rook.io/stable
  targetNamespace: rook-ceph-system
  valuesContent: |-
    agent:
      flexVolumeDirPath: "/var/lib/kubelet/volume-plugins"

>All comments

@dpen2000 it's just not clear from the docs, but the namespace in metadata section is the namespace for the HelmChart CRD resource, so it's probably best to leave kube-system there. The actual namespace where all helm chart resources will reside is set with targetNamespace:

apiVersion: k3s.cattle.io/v1                                                                                                                                                
kind: HelmChart                                                                                                                                                             
metadata:
  name: rook-operator
  namespace: kube-system
spec:
  chart: rook-ceph
  repo: https://charts.rook.io/stable
  targetNamespace: rook-ceph-system
  valuesContent: |-
    agent:
      flexVolumeDirPath: "/var/lib/kubelet/volume-plugins"
Was this page helpful?
0 / 5 - 0 ratings

Related issues

VictorRobellini picture VictorRobellini  路  3Comments

weber-software picture weber-software  路  3Comments

seanmalloy picture seanmalloy  路  3Comments

Moep90 picture Moep90  路  3Comments

ubergeek801 picture ubergeek801  路  3Comments