How to: uninstall a Helm Chart from Embedded Cluster Configuration and the Cluster (EC 1.x.x)

If you need to install Helm charts before your application and as part of the Embedded Cluster itself, you can do this with Helm extensions.

However, after changes to your application, there may be cases where you want to permanently remove a chart from both the configuration and the currently running cluster. This requires two actions:

Important: After version 2.x of embedded cluster the below no longer applies. EC will reconcile with the config resource and reconcile the Helm extensions, thus removing them if deleted from the configuration.

Important: In version 1.x, due to how Helm extensions works, removing a chart from the current configuration prevents it from being automatically reinstalled in the next release. However, it does not automatically uninstall it from the existing cluster. You must explicitly uninstall it using the Helm CLI.

Example Scenario (1.x)

Suppose you have the following Embedded Cluster configuration:

apiVersion: embeddedcluster.replicated.com/v1beta1
kind: Config
spec:
  version: 1.19.0+k8s-1.30
  roles:
    controller:
      name: management
      labels:
        management: "true"
    custom:
    - name: app
      labels:
       app: "true"
  extensions:
    helm:
      repositories:
        - name: ingress-nginx
          url: https://kubernetes.github.io/ingress-nginx
        - name: prometheus-community
          url: https://prometheus-community.github.io/helm-charts
      charts:
        - name: prometheus-stack
          chartname: prometheus-community/prometheus
          version: "27.15.0"
          namespace: test
        - name: ingress-nginx-test
          chartname: ingress-nginx/ingress-nginx
          namespace: test
          version: "4.8.3"

You now want to remove prometheus-stack from both the config and the running cluster.

Steps to Remove the Chart

  1. Update Your Embedded Cluster Configuration
apiVersion: embeddedcluster.replicated.com/v1beta1
kind: Config
spec:
  version: 1.19.0+k8s-1.30
  roles:
    controller:
      name: management
      labels:
        management: "true"
    custom:
    - name: app
      labels:
       app: "true"
  extensions:
    helm:
      repositories:
        - name: ingress-nginx
          url: https://kubernetes.github.io/ingress-nginx
      charts:
        - name: ingress-nginx-test
          chartname: ingress-nginx/ingress-nginx
          namespace: test
          version: "4.8.3"
  1. Promoted the release to the specific channel

  2. SSH to your current instance where the Embedded Cluster was installed

  3. Perform an Embedded Cluster Update
    Follow the Embedded Cluster update documentation to apply the updated config.

  4. Run sudo ./app-slug shell

  5. Install the Helm CLI (If Not Already Installed)
    Refer to the Helm installation guide.

  6. Run helm list -A to check prometheus-stack chart status

  7. Run helm uninstall prometheus-stack -n test to remove the chart completely