Ubuntu 24.04
Sponsored Link

MicroK8s : Enable Helm32024/06/14

 

Enable Helm3 add-on to deploy applications from Helm Charts.

[1] Helm3 is enabled by default, but if it is not enabled, enable the Helm3 add-on on your primary node.
root@dlp:~#
microk8s enable helm3

Infer repository core for addon helm3
Addon core/helm3 is already enabled

root@dlp:~#
microk8s helm3 version

version.BuildInfo{Version:"v3.9.1+unreleased", GitCommit:"7b27f35dd67826049e5466a5dcb6ec86d8308856", GitTreeState:"clean", GoVersion:"go1.21.9"}
[2] Basic Usage of Helm3.
# search charts by words in Helm Hub

root@dlp:~#
microk8s helm3 search hub haproxy

URL                                                     CHART VERSION   APP VERSION             DESCRIPTION                     
https://artifacthub.io/packages/helm/haproxytec...      1.22.0          2.9.6                   A Helm chart for HAProxy on Kubernetes
https://artifacthub.io/packages/helm/bitnami/ha...      2.0.3           3.0.1                   HAProxy is a TCP proxy and a HTTP reverse proxy...
https://artifacthub.io/packages/helm/riftbit/ha...      0.2.9           2.4.4                   HAProxy is a TCP proxy and a HTTP reverse proxy...
.....
.....

# add repository

root@dlp:~#
microk8s helm3 repo add bitnami https://charts.bitnami.com/bitnami

"bitnami" has been added to your repositories

# display added repositories

root@dlp:~#
microk8s helm3 repo list

NAME    URL
bitnami https://charts.bitnami.com/bitnami

# search charts by words in repository

root@dlp:~#
microk8s helm3 search repo bitnami

NAME                                            CHART VERSION   APP VERSION     DESCRIPTION                                     
bitnami/airflow                                 18.3.2          2.9.2           Apache Airflow is a tool to express and execute...
bitnami/apache                                  11.2.3          2.4.59          Apache HTTP Server is an open-source HTTP serve...
bitnami/apisix                                  3.2.2           3.9.1           Apache APISIX is high-performance, real-time AP...
bitnami/appsmith                                3.3.6           1.27.0          Appsmith is an open source platform for buildin...
bitnami/argo-cd                                 6.4.6           2.11.3          Argo CD is a continuous delivery tool for Kuber...
.....
.....

# display description of a chart
# helm show [all|chart|readme|values] [chart name]

root@dlp:~#
microk8s helm3 show chart bitnami/haproxy

annotations:
  category: Infrastructure
  images: |
    - name: haproxy
      image: docker.io/bitnami/haproxy:3.0.1-debian-12-r1
  licenses: Apache-2.0
apiVersion: v2
appVersion: 3.0.1
dependencies:
- name: common
  repository: oci://registry-1.docker.io/bitnamicharts
  tags:
  - bitnami-common
  version: 2.x.x
description: HAProxy is a TCP proxy and a HTTP reverse proxy. It supports SSL termination
  and offloading, TCP and HTTP normalization, traffic regulation, caching and protection
  against DDoS attacks.
home: https://bitnami.com
icon: https://bitnami.com/assets/stacks/haproxy/img/haproxy-stack-220x234.png
keywords:
- haproxy
- proxy
- infrastructure
maintainers:
- name: Broadcom, Inc. All Rights Reserved.
  url: https://github.com/bitnami/charts
name: haproxy
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/haproxy
version: 2.0.3

# deploy application by specified chart
# helm install [any name] [chart name]

root@dlp:~#
microk8s helm3 install haproxy bitnami/haproxy

NAME: haproxy
LAST DEPLOYED: Fri Jun 14 03:26:42 2024
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
CHART NAME: haproxy
CHART VERSION: 2.0.3
APP VERSION: 3.0.1

** Please be patient while the chart is being deployed **
1. HAproxy has been started. You can find out the port numbers being used by HAProxy by running:

    $ kubectl describe svc haproxy --namespace default
2. Get HAProxy's load balancer IP/hostname:

    NOTE: It may take a few minutes for this to become available.

    You can watch the status by running:

        $ kubectl get svc haproxy --namespace default -w

    Once 'EXTERNAL-IP' is no longer '<pending>':

        $ kubectl describe svc haproxy --namespace default | grep Ingress | awk '{print $3}'

3. Configure DNS records corresponding to Kubernetes ingress resources to point to the load balancer IP/hostname found in step 3

WARNING: There are "resources" sections in the chart not set. Using "resourcesPreset" is not recommended for production. For production installations, please set the following values according to your workload needs:
  - resources
+info https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/

# display deployed applications

root@dlp:~#
microk8s helm3 list

NAME    NAMESPACE       REVISION        UPDATED                                 STATUS          CHART           APP VERSION
haproxy default         1               2024-06-14 03:26:42.061041105 +0000 UTC deployed        haproxy-2.0.3   3.0.1

root@dlp:~#
microk8s kubectl get pods

NAME                       READY   STATUS    RESTARTS   AGE
haproxy-5cc84df6fc-mwcj6   1/1     Running   0          76s

# display status of a deployed application

root@dlp:~#
microk8s helm3 status haproxy

NAME: haproxy
LAST DEPLOYED: Fri Jun 14 03:26:42 2024
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
CHART NAME: haproxy
CHART VERSION: 2.0.3
APP VERSION: 3.0.1
.....
.....

root@dlp:~#
microk8s kubectl get svc

NAME         TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)        AGE
haproxy      LoadBalancer   10.152.183.222   <pending>     80:31903/TCP   114s
kubernetes   ClusterIP      10.152.183.1     <none>        443/TCP        158m

# uninstall a deployed application

root@dlp:~#
microk8s helm3 uninstall haproxy

release "haproxy" uninstalled
Matched Content