Debian 12 bookworm
Sponsored Link

MicroK8s : Enable Helm32023/06/22

 
Enable Helm3 add-on to deploy apllications from Helm Charts.
[1] Enable built-in Helm3 add-on on 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:"52c2c02c75248ea9e5752f8dc92acad94bc7ee73", GitTreeState:"clean", GoVersion:"go1.20.4"}
[2] Basic Usage of Helm3.
# search charts by words in Helm Hub

root@dlp:~#
microk8s helm3 search hub wordpress

URL                                                     CHART VERSION   APP VERSION             DESCRIPTION                     
https://artifacthub.io/packages/helm/kube-wordp...      0.1.0           1.1                     this is my wordpress package    
https://artifacthub.io/packages/helm/bitnami-ak...      15.2.13         6.1.0                   WordPress is the world's most popular blogging ...
https://artifacthub.io/packages/helm/shubham-wo...      0.1.0           1.16.0                  A Helm chart for Kubernetes     
.....
.....

# 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                                 14.2.5          2.6.1           Apache Airflow is a tool to express and execute...
bitnami/apache                                  9.6.3           2.4.57          Apache HTTP Server is an open-source HTTP serve...
bitnami/apisix                                  2.0.0           3.3.0           Apache APISIX is high-performance, real-time AP...
bitnami/appsmith                                0.3.7           1.9.21          Appsmith is an open source platform for buildin...
bitnami/argo-cd                                 4.7.12          2.7.5           Argo CD is a continuous delivery tool for Kuber...
bitnami/argo-workflows                          5.3.5           3.4.8           Argo Workflows is meant to orchestrate Kubernet...
.....
.....

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

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

annotations:
  category: CMS
  licenses: Apache-2.0
apiVersion: v2
appVersion: 6.2.2
dependencies:
- condition: memcached.enabled
  name: memcached
  repository: oci://registry-1.docker.io/bitnamicharts
  version: 6.x.x
- condition: mariadb.enabled
  name: mariadb
  repository: oci://registry-1.docker.io/bitnamicharts
  version: 12.x.x
- name: common
  repository: oci://registry-1.docker.io/bitnamicharts
  tags:
  - bitnami-common
  version: 2.x.x
description: WordPress is the world's most popular blogging and content management
  platform. Powerful yet simple, everyone from students to global corporations use
  it to build beautiful, functional websites.
home: https://bitnami.com
icon: https://bitnami.com/assets/stacks/wordpress/img/wordpress-stack-220x234.png
keywords:
- application
- blog
- cms
- http
- php
- web
- wordpress
maintainers:
- name: VMware, Inc.
  url: https://github.com/bitnami/charts
name: wordpress
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/wordpress
version: 16.1.18

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

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

NAME: wordpress
LAST DEPLOYED: Thu Jun 22 00:04:06 2023
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
CHART NAME: wordpress
CHART VERSION: 16.1.18
APP VERSION: 6.2.2

** Please be patient while the chart is being deployed **

Your WordPress site can be accessed through the following DNS name from within your cluster:

    wordpress.default.svc.cluster.local (port 80)

To access your WordPress site from outside the cluster follow the steps below:

1. Get the WordPress URL by running these commands:

  NOTE: It may take a few minutes for the LoadBalancer IP to be available.
        Watch the status with: 'kubectl get svc --namespace default -w wordpress'

   export SERVICE_IP=$(kubectl get svc --namespace default wordpress --template "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}")
   echo "WordPress URL: http://$SERVICE_IP/"
   echo "WordPress Admin URL: http://$SERVICE_IP/admin"

2. Open a browser and access WordPress using the obtained URL.

3. Login with the following credentials below to see your blog:

  echo Username: user
  echo Password: $(kubectl get secret --namespace default wordpress -o jsonpath="{.data.wordpress-password}" | base64 -d)

# display deployed applications

root@dlp:~#
microk8s helm3 list

NAME            NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                  APP VERSION
wordpress       default         1               2023-06-22 00:04:06.410829446 -0500 CDT deployed        wordpress-16.1.18      6.2.2

root@dlp:~#
microk8s kubectl get pods

NAME                         READY   STATUS    RESTARTS   AGE
wordpress-mariadb-0          0/1     Running   0          55s
wordpress-559b788c6b-5b86g   0/1     Running   0          55s

# display status of a deployed apprication

root@dlp:~#
microk8s helm3 status wordpress

NAME: wordpress
LAST DEPLOYED: Thu Jun 22 00:04:06 2023
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
CHART NAME: wordpress
CHART VERSION: 16.1.18
APP VERSION: 6.2.2
.....
.....

root@dlp:~#
microk8s kubectl get svc

NAME                TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
kubernetes          ClusterIP      10.152.183.1     <none>        443/TCP                      94m
wordpress-mariadb   ClusterIP      10.152.183.104   <none>        3306/TCP                     6m30s
wordpress           LoadBalancer   10.152.183.243   <pending>     80:32032/TCP,443:30844/TCP   6m30s

# uninstall a deployed application

root@dlp:~#
microk8s helm3 uninstall wordpress

release "wordpress" uninstalled
Matched Content