Kubernetes 110: Helm Package Manager


Helm Package Manager

Tasks:
1- Install Helm 3.
2- Add Helm Chart repository.
3- Install Nginx Ingress Controller on Helm Chart
4- Install DokuWiki  on Helm Chart.
5- Uninstall DokuWiki.

Step 1: Install Helm 3:


ahmed@K8S:~$ curl -L https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash




Step 2: Add Helm Chart repository

ahmed@K8S:~$ helm repo add stable https://kubernetes-charts.storage.googleapis.com/

"stable" has been added to your repositories

ahmed@K8S:~$ helm search repo stable


Step 3: Install Nginx-Ingress-Controller on Helm Chart
ahmed@K8S:~$ helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈ Happy Helming!⎈ 


ahmed@K8S:~$ helm show chart stable/nginx-ingress
apiVersion: v1
appVersion: 0.30.0
description: An nginx Ingress controller that uses ConfigMap to store the nginx configuration.
home: https://github.com/kubernetes/ingress-nginx
icon: https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Nginx_logo.svg/500px-Nginx_logo.svg.png
keywords:
- ingress
- nginx
kubeVersion: '>=1.10.0-0'
maintainers:
- name: ChiefAlexander
- email: Trevor.G.Wood@gmail.com
  name: taharah
name: nginx-ingress
sources:
- https://github.com/kubernetes/ingress-nginx
version: 1.36.3


ahmed@K8S:~$ helm install nginx-ingress stable/nginx-ingress
NAME: nginx-ingress
LAST DEPLOYED: Fri May  1 11:41:13 2020
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
The nginx-ingress controller has been installed.
It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status by running 'kubectl --namespace default get services -o wide -w nginx-ingress-controller'

An example Ingress that makes use of the controller:

  apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    annotations:
      kubernetes.io/ingress.class: nginx
    name: example
    namespace: foo
  spec:
    rules:
      - host: www.example.com
        http:
          paths:
            - backend:
                serviceName: exampleService
                servicePort: 80
              path: /
    # This section is only required if TLS is to be enabled for the Ingress
    tls:
        - hosts:
            - www.example.com
          secretName: example-tls

If TLS is enabled for the Ingress, a Secret containing the certificate and key must also be provided:

  apiVersion: v1
  kind: Secret
  metadata:
    name: example-tls
    namespace: foo
  data:
    tls.crt: <base64 encoded cert>
    tls.key: <base64 encoded key>
  type: kubernetes.io/tls

ahmed@K8S:~$ helm ls
NAME          NAMESPACE REVISION UPDATED                                 STATUS   CHART                APP VERSION
nginx-ingress default   1        2020-05-01 11:41:13.058762379 +0200 EET deployed nginx-ingress-1.36.3 0.30.0 


Step 4: Install DokuWiki  on Helm Chart.

ahmed@K8S:~$ helm install dokuwiki stable/dokuwiki
WARNING: This chart is deprecated
NAME: dokuwiki
LAST DEPLOYED: Fri May  1 16:21:52 2020
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None


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

1. Get the DokuWiki URL by running:

** Please ensure an external IP is associated to the dokuwiki service before proceeding **
** Watch the status using: kubectl get svc --namespace default -w dokuwiki **

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

2. Login with the following credentials

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












Step 5: Uninstall DokuWiki.



================================================================
Good Luck https://www.linkedin.com/in/ahmedms/

Comments

Popular posts from this blog

Kubernetes 104: Create a 2-node k3s cluster with k3sup

Cisco Nexus: Configuration VXLAN.

How to configure OSPF on Palo Alto Networks Firewall?