Ceci est une ancienne révision du document !
Table des matières
Version - 2024.01
Dernière mise-à-jour : 2024/03/15 07:15
DOF309 - Gestion de Paquets pour Kubernetes avec Helm
Contenu du Module
- DOF309 - Gestion de Paquets pour Kubernetes avec Helm
- Contenu du Module
- Présentation de Helm
- LAB #1 - Travailler avec Helm
- 1.1 - Installation de Helm
- 1.2 - La Commande helm search hub
- 1.3 - Rechercher dans le Helm Hub
- 1.4 - Ajouter et supprimer un Dépôt
- 1.5 - La Commande helm search repo
- 1.6 - La Commande helm show
- 1.7 - Installation d'un Chart
- 1.8 - La Commande helm get
- 1.9 - Utilisation des NOTES
- 1.10 - La Commande helm upgrade
- 1.11 - La Commande helm history
- 1.12 - La Commande helm rollback
- 1.13 - La Commande helm uninstall
- LAB #2 - Supervision de Kubernetes avec le Stack EFK
- 2.1 - Présentation du Stack EFK
- 2.2 - Installation du Chart elasticsearch
- 2.3 - Installation du Chart fluentd-elasticsearch
- 2.4 - Installation du Chart kibana
- 2.5 - Génération de Traces dans Kubernetes
- 2.6 - Visualisation des Données avec Kibana
Ressources
Lab #1
Lab #2
Présentation de Helm
Helm est un gestionnaire de paquets pour Kubernetes. Helm 3.x est compatible avec les versions n-3 de Kubernetes où n est la version de Kubernetes contre laquelle la version de Helm a été compilée, tandis que le gestionnaire Helm 2.x n'est compatible qu'avec les versions n-1 de Kubernetes où n est la version de Kubernetes contre laquelle la version de Helm a été compilée :
Version Helm | Compatibilité Kubernetes |
---|---|
3.9.x | 1.24.x - 1.21.x |
3.8.x | 1.23.x - 1.20.x |
3.7.x | 1.22.x - 1.19.x |
3.6.x | 1.21.x - 1.18.x |
3.5.x | 1.20.x - 1.17.x |
3.4.x | 1.19.x - 1.16.x |
3.3.x | 1.18.x - 1.15.x |
3.2.x | 1.18.x - 1.15.x |
3.1.x | 1.17.x - 1.14.x |
3.0.x | 1.16.x - 1.13.x |
2.16.x | 1.16.x - 1.15.x |
2.15.x | 1.15.x - 1.14.x |
2.14.x | 1.14.x - 1.13.x |
2.13.x | 1.13.x - 1.12.x |
LAB #1 - Travailler avec Helm
Placez-vous dans votre Gateway. Commencez par vérifier le status de Minikube :
trainee@gateway:~$ minikube status minikube type: Control Plane host: Running kubelet: Running apiserver: Running kubeconfig: Configured
1.1 - Installation de Helm
Installez helm-v3.9.1 :
trainee@gateway:~$ su - Password: root@gateway:~# curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1700 100 1700 0 0 39534 0 --:--:-- --:--:-- --:--:-- 39534 root@gateway:~# apt-get install apt-transport-https --yes ... root@gateway:~# echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list deb [arch=amd64 signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main root@gateway:~# apt-get update ... root@gateway:~# apt-get install helm ...
Vérifiez ensuite votre travail :
root@gateway:~# which helm /usr/sbin/helm root@gateway:~# helm version version.BuildInfo{Version:"v3.9.1", GitCommit:"a7c043acb5ff905c261cfdc923a35776ba5e66e4", GitTreeState:"clean", GoVersion:"go1.17.5"}
Pour permettre l'auto-complétion de la ligne de commande avec la commande helm, similaire à celle sous bash, exécutez la commande suivante en tant que trainee :
root@gateway:~# exit logout trainee@gateway:~$ trainee@gateway:~$ source <(helm completion bash)
Pour visualiser les variables d'environnement de la commande helm, exécutez la commande helm env :
trainee@gateway:~$ helm env HELM_BIN="helm" HELM_CACHE_HOME="/home/trainee/.cache/helm" HELM_CONFIG_HOME="/home/trainee/.config/helm" HELM_DATA_HOME="/home/trainee/.local/share/helm" HELM_DEBUG="false" HELM_KUBEAPISERVER="" HELM_KUBEASGROUPS="" HELM_KUBEASUSER="" HELM_KUBECAFILE="" HELM_KUBECONTEXT="" HELM_KUBETOKEN="" HELM_MAX_HISTORY="10" HELM_NAMESPACE="default" HELM_PLUGINS="/home/trainee/.local/share/helm/plugins" HELM_REGISTRY_CONFIG="/home/trainee/.config/helm/registry/config.json" HELM_REPOSITORY_CACHE="/home/trainee/.cache/helm/repository" HELM_REPOSITORY_CONFIG="/home/trainee/.config/helm/repositories.yaml"
Important : Notez que la valeur de la variable $HELM_NAMESPACE est default. Pour modifier le Namespace utilisé lors de l'utilisation de la commande helm, vous pouvez soit modifier la valeur de cette variable, soit utiliser l'option –namespace ou -n lors de chaque exécution le la commande.
Pour visualiser l'environnement de la commande kubectl exécutez la commande kubectl config view :
trainee@gateway:~$ kubectl config view apiVersion: v1 clusters: - cluster: certificate-authority-data: DATA+OMITTED server: https://192.168.42.99:8443 name: 192-168-42-99:8443 - cluster: certificate-authority: /home/trainee/.minikube/ca.crt extensions: - extension: last-update: Tue, 12 Jul 2022 17:05:18 CEST provider: minikube.sigs.k8s.io version: v1.26.0 name: cluster_info server: https://192.168.59.100:8443 name: minikube contexts: - context: cluster: minikube extensions: - extension: last-update: Tue, 12 Jul 2022 17:05:18 CEST provider: minikube.sigs.k8s.io version: v1.26.0 name: context_info namespace: default user: minikube name: minikube - context: cluster: 192-168-42-99:8443 namespace: myproject user: developer/192-168-42-99:8443 name: minishift - context: cluster: 192-168-42-99:8443 namespace: myproject user: developer/192-168-42-99:8443 name: myproject/192-168-42-99:8443/developer - context: cluster: 192-168-42-99:8443 namespace: myproject user: system:admin/192-168-42-99:8443 name: myproject/192-168-42-99:8443/system:admin current-context: minikube kind: Config preferences: {} users: - name: developer/192-168-42-99:8443 user: token: REDACTED - name: minikube user: client-certificate: /home/trainee/.minikube/profiles/minikube/client.crt client-key: /home/trainee/.minikube/profiles/minikube/client.key - name: system:admin/192-168-42-99:8443 user: client-certificate-data: REDACTED client-key-data: REDACTED
1.2 - La Commande helm search hub
Un grand nombre de Charts Helm sont regroupés sur le site The Artifact Hub. Il est possible de lister le contenu du Hub en ligne de commande :
trainee@gateway:~$ helm search hub | more URL CHART VERSION APP VERSION DESCRIPTION https://artifacthub.io/packages/helm/gabibbo97/... 0.1.0 fedora-32 389 Directory Server https://artifacthub.io/packages/helm/four-allpo... 18.3.5 3.10.8 A Helm chart for 4ALLPORTAL version 3.9.0 and up https://artifacthub.io/packages/helm/aad-pod-id... 4.1.11 1.8.10 Deploy components for aad-pod-identity https://artifacthub.io/packages/helm/smo-helm-c... 6.0.0 ONAP Application Authorization Framework https://artifacthub.io/packages/helm/smo-helm-c... 6.0.0 ONAP Active and Available Inventory https://artifacthub.io/packages/helm/statcan/aa... 0.1.2 1.0 A Helm chart for AAW Financial Data Reconciliation https://artifacthub.io/packages/helm/arhatdev/a... 0.1.0 latest Network Manager Living at Edge https://artifacthub.io/packages/helm/cassandra-... 0.1.1 1.16.0 A Helm chart for running Cassandra on Kuberente... https://artifacthub.io/packages/helm/opencord/a... 0.1.2 latest A Helm chart for SEBA's Abstract OLT layer https://artifacthub.io/packages/helm/opencord/a... 0.1.2 A Helm chart to install Accelleran common to ru... https://artifacthub.io/packages/helm/opencord/a... 0.1.8 A Helm chart to install Accelleran CU on CBRS band https://artifacthub.io/packages/helm/opencord/a... 0.1.2 A Helm chart to install Accelleran CU https://artifacthub.io/packages/helm/restorecom... 0.1.8 0.2.3 A Helm chart for restorecommerce access-control... https://artifacthub.io/packages/helm/ckotzbauer... 0.9.0 0.9.0 Kubernetes-Operator to simplify RBAC configurat... --More--
Recherchez ensuite tout Chart contenant la chaîne mysql :
trainee@gateway:~$ helm search hub mysql URL CHART VERSION APP VERSION DESCRIPTION https://artifacthub.io/packages/helm/ygqygq2/mysql 4.5.3 5.7.26 Chart to create a Highly available MySQL cluster https://artifacthub.io/packages/helm/stakater/m... 1.0.6 mysql chart that runs on kubernetes https://artifacthub.io/packages/helm/bitnami-ak... 9.2.0 8.0.29 MySQL is a fast, reliable, scalable, and easy t... https://artifacthub.io/packages/helm/saber/mysql 8.8.21 8.0.27 Chart to create a Highly available MySQL cluster https://artifacthub.io/packages/helm/cloudnativ... 5.0.1 8.0.16 Chart to create a Highly available MySQL cluster https://artifacthub.io/packages/helm/bitnami/mysql 9.2.0 8.0.29 MySQL is a fast, reliable, scalable, and easy t... https://artifacthub.io/packages/helm/choerodon/... 8.5.1 8.5.1 Chart to create a Highly available MySQL cluster https://artifacthub.io/packages/helm/homeenterp... 0.3.0 8.0.29 MySQL Database Server https://artifacthub.io/packages/helm/t3n/mysql 1.0.0 5.7.32 Fast, reliable, scalable, and easy to use open-... https://artifacthub.io/packages/helm/devopspilo... 1.0.0 1.0.0 Helm chart for running mysql database https://artifacthub.io/packages/helm/wso2/mysql 1.6.9 5.7.30 Fast, reliable, scalable, and easy to use open-... https://artifacthub.io/packages/helm/kubesphere... 1.6.8 5.7.31 Fast, reliable, scalable, and easy to use open-... https://artifacthub.io/packages/helm/groundhog2... 0.1.0 8.0.29-oracle A Helm chart for MySQL on Kubernetes https://artifacthub.io/packages/helm/someblackm... 1.7.1 5.7.33 Fast, reliable, scalable, and easy to use open-... https://artifacthub.io/packages/helm/kubegemsap... 4.5.2 5.7.26 Chart to create a Highly available MySQL cluster https://artifacthub.io/packages/helm/anvibo/mysql 0.1.0 1.16.0 A Helm chart for Kubernetes https://artifacthub.io/packages/helm/mysql-oper... 2.0.4 8.0.29 MySQL InnoDB Cluster Helm Chart for deploying M... https://artifacthub.io/packages/helm/mysql-oper... 2.0.4 8.0.29-2.0.4 MySQL Operator Helm Chart for deploying MySQL I... https://artifacthub.io/packages/helm/softonic/m... 2.2.2 0.3.0 Take mysql backups from any mysql instance to A... https://artifacthub.io/packages/helm/kfirfer/my... 0.0.3 8.0.20 A Helm chart for MySQL Cluster https://artifacthub.io/packages/helm/wordpress-... 1.0.0 1.1 This is a package for configuring wordpress and... https://artifacthub.io/packages/helm/kanister/k... 0.32.0 5.7.14 MySQL w/ Kanister support based on stable/mysql https://artifacthub.io/packages/helm/bitpoke/my... 0.6.2 v0.6.2 A Helm chart for easy deployment of a MySQL clu... https://artifacthub.io/packages/helm/presslabs/... 0.3.1 1.0 A Helm chart for easy deployment of a MySQL clu... https://artifacthub.io/packages/helm/veilis-hel... 0.6.2999 v0.6.2999 A Helm chart for easy deployment of a MySQL clu... https://artifacthub.io/packages/helm/veilis-hel... 0.6.2999 v0.6.2999 A helm chart for Veilis Operator for MySQL https://artifacthub.io/packages/helm/presslabs/... 0.5.0-rc.3 v0.5.0-rc.3 A Helm chart for mysql operator https://artifacthub.io/packages/helm/bitpoke/my... 0.6.2 v0.6.2 A helm chart for Bitpoke Operator for MySQL https://artifacthub.io/packages/helm/stakater/m... 1.0.6 mysql-storage chart that runs on kubernetes https://artifacthub.io/packages/helm/truecharts... 2.0.17 8.0.29 MySQL Workbench is a unified visual tool for da... https://artifacthub.io/packages/helm/kubesphere... 1.0.1 5.7.33 High Availability MySQL Cluster, Open Source. https://artifacthub.io/packages/helm/appscode/s... 8.0.21 8.0.21 stash-mysql - MySQL database plugin for Stash b... https://artifacthub.io/packages/helm/wordpressm... 1.0.0 This is the Helm Chart that creates the Wordpre... https://artifacthub.io/packages/helm/wso2/mysql-am 4.1.0-1 5.7 A Helm chart for MySQL based deployment of WSO2... https://artifacthub.io/packages/helm/choerodon/... 0.1.1 0.1.1 mysql Ver 15.1 Distrib 10.1.32-MariaDB, for Lin... https://artifacthub.io/packages/helm/kubesphere... 0.5.6 v0.11.0 A Helm chart for prometheus mysql exporter with... https://artifacthub.io/packages/helm/wso2is-pat... 5.11.0-2 5.7 A Helm chart for MySQL based deployment of WSO2... https://artifacthub.io/packages/helm/wso2/mysql-is 5.11.0-5 5.7 A Helm chart for MySQL based deployment of WSO2... https://artifacthub.io/packages/helm/wso2/mysql-ob 1.5.0-1 5.7 A Helm chart for MySQL based deployment of WSO2... https://artifacthub.io/packages/helm/banzaiclou... 0.1.0 0.2.0 A Helm chart for deploying the Oracle MySQL Ope... https://artifacthub.io/packages/helm/grdscloud/... 0.1.0 1.0.0 A MySQL Database Operator Helm chart for Kubern... https://artifacthub.io/packages/helm/openshift/... 0.1.0 0.1.0 A Helm chart for MySQL Service Endpoint Definit... https://artifacthub.io/packages/helm/ygqygq2/my... 1.0.0 5.7.24 A Helm chart servicemonitor for mysql exporter https://artifacthub.io/packages/helm/cloudnativ... 0.3.2 v0.11.0 A Helm chart for prometheus mysql exporter with... https://artifacthub.io/packages/helm/prometheus... 1.8.1 v0.14.0 A Helm chart for prometheus mysql exporter with... https://artifacthub.io/packages/helm/wener/prom... 1.8.1 v0.14.0 A Helm chart for prometheus mysql exporter with... https://artifacthub.io/packages/helm/braedon/pr... 0.2.0 Run queries on Mysql and export the results as ... https://artifacthub.io/packages/helm/wenerme/pr... 1.8.1 v0.14.0 A Helm chart for prometheus mysql exporter with... https://artifacthub.io/packages/helm/banzaiclou... 0.2.4 v0.11.0 A Helm chart for prometheus mysql exporter with... https://artifacthub.io/packages/helm/kubegemsap... 1.7.0 v0.12.1 A Helm chart for prometheus mysql exporter with... https://artifacthub.io/packages/helm/prometheus... 1.0.1 v0.12.1 A Helm chart for prometheus mysql exporter with... https://artifacthub.io/packages/helm/bytebuilde... 2021.3.11 v2021.03.11 Stash MySQL Addon Community https://artifacthub.io/packages/helm/fermosit/z... 0.1.0 5.4.0-latest Zabbix monitoring server https://artifacthub.io/packages/helm/appscode/k... 2022.5.11 v0.5.0 Kubeform Provider Azurerm Mysql Custom Resource... https://artifacthub.io/packages/helm/appscode/k... 2022.5.11 v0.5.0 Kubeform Provider Oci Mysql Custom Resource Def... https://artifacthub.io/packages/helm/t3n/mysql-... 2.0.0 https://artifacthub.io/packages/helm/kfirfer/my... 0.1.4 10.5.8 A Helm chart for Kubernetes https://artifacthub.io/packages/helm/wso2/mysql-ei 6.6.0-3 5.7 A Helm chart for WSO2 Enterprise Integrator Dat... https://artifacthub.io/packages/helm/sikalabs/w... 0.1.0 https://artifacthub.io/packages/helm/choerodon/... 0.1.0 1.0 A Helm chart for Kubernetes https://artifacthub.io/packages/helm/azure-samp... 0.1.0 A Helm chart for Kubernetes https://artifacthub.io/packages/helm/phppgadmin... 0.1.0 A Helm chart for Kubernetes https://artifacthub.io/packages/helm/mysql-ndb-... 0.2.0 8.0.29-0.2.0 A Helm chart for deploying the Oracle MySQL NDB... https://artifacthub.io/packages/helm/sonu-wordp... 1.0.0 2 This is my custom chart to deploy wordpress and... https://artifacthub.io/packages/helm/bitnami-ak... 10.1.10 5.2.0 phpMyAdmin is a free software tool written in P... https://artifacthub.io/packages/helm/bitnami/ph... 10.2.0 5.2.0 phpMyAdmin is a free software tool written in P... https://artifacthub.io/packages/helm/paradeum-t... 0.1.8 4.8.1 Adminer is a full-featured database management ... https://artifacthub.io/packages/helm/startechni... 0.1.3 4.8.1 Adminer is a full-featured database management ... https://artifacthub.io/packages/helm/cetic/adminer 0.1.7 4.8.1 Adminer is a full-featured database management ... https://artifacthub.io/packages/helm/inspur/dble 0.0.2 2.19.09 DBLE is a high scalability middle-ware for MySQ... https://artifacthub.io/packages/helm/wordpress-... 1.0.0 2 This is my custom chart to deploy wordpress and... https://artifacthub.io/packages/helm/cloudnativ... 2.4.0 2.4.0 A Helm chart to help backup MySQL databases usi... https://artifacthub.io/packages/helm/kokuwa/mys... 5.1.0 v3.0.16 A Helm chart to help backup MySQL databases usi... https://artifacthub.io/packages/helm/kfirfer/my... 2.7.0 2.4.1 A Helm chart to help backup MySQL databases usi... https://artifacthub.io/packages/helm/cloudnativ... 0.5.1 5.7.13 MySQL cluster with a single master and zero or ... https://artifacthub.io/packages/helm/presslabs/... 0.1.7 3.0.14 A Helm chart for github's mysql orchestrator https://artifacthub.io/packages/helm/cloudnativ... 1.0.0 5.7.17 free, fully compatible, enhanced, open source d... https://artifacthub.io/packages/helm/cloudnativ... 1.0.0 5.7.19 free, fully compatible, enhanced, open source d... https://artifacthub.io/packages/helm/kfirfer/pe... 1.5.4 8.0.27-18.1 free, fully compatible, enhanced, open source d... https://artifacthub.io/packages/helm/someblackm... 6.5.2 5.0.2 phpMyAdmin is an mysql administration frontend https://artifacthub.io/packages/helm/kubesphere... 1.0.0 5.7.33 XenonDB is a High-Availability MySQL cluster, o... https://artifacthub.io/packages/helm/truecharts... 0.0.11 latest Adminer (formerly phpMinAdmin) is a full-featur... https://artifacthub.io/packages/helm/evolves/ba... 0.6.1 0.6.1 Backup is an open-source backup tools written i... https://artifacthub.io/packages/helm/schmitzis/... 0.1.1 21.12 Wiki application made by Bookstack and MySQL https://artifacthub.io/packages/helm/t3n/clouds... 2.0.0 1.16 Google Cloud SQL Proxy https://artifacthub.io/packages/helm/presslabs/... 0.5.0 v0.5.0 A Helm chart for db operator https://artifacthub.io/packages/helm/edgelesssy... 0.3.0 v0.3.0 EdgelessDB is a MySQL-compatible database for c... https://artifacthub.io/packages/helm/startechni... 0.1.8 3.2.0 FreeRADIUS is a modular, high performance free ... https://artifacthub.io/packages/helm/rimusz/gcl... 0.22.8 1.30.1 Google Cloud SQL Proxy https://artifacthub.io/packages/helm/getindata/... 0.20.5 1.16 Google Cloud SQL Proxy https://artifacthub.io/packages/helm/datarepo/g... 0.19.7 1.17 Google Cloud SQL Proxy https://artifacthub.io/packages/helm/ibm-charts... 1.1.0 Galera Cluster is a multi-master solution for M... https://artifacthub.io/packages/helm/ibm-charts... 1.1.2 MariaDB is developed as open source software an... https://artifacthub.io/packages/helm/cloudposse... 0.1.4 A Helm chart for Linux, Apache, MySQL, PHP (aka... https://artifacthub.io/packages/helm/truecharts... 3.0.35 10.8.3 Fast, reliable, scalable, and easy to use open-... https://artifacthub.io/packages/helm/riftbit/ma... 9.6.0 10.5.12 Fast, reliable, scalable, and easy to use open-... https://artifacthub.io/packages/helm/bitnami-ak... 11.0.14 10.6.8 MariaDB is an open source, community-developed ... https://artifacthub.io/packages/helm/bitnami/ma... 11.1.0 10.6.8 MariaDB is an open source, community-developed ... https://artifacthub.io/packages/helm/camptocamp... 1.0.0 Fast, reliable, scalable, and easy to use open-... https://artifacthub.io/packages/helm/cloudnativ... 6.1.0 10.3.15 Fast, reliable, scalable, and easy to use open-... https://artifacthub.io/packages/helm/riftbit/ma... 5.13.5 10.5.12 MariaDB Galera is a multi-master database clust... https://artifacthub.io/packages/helm/bitnami/ma... 7.3.6 10.6.8 MariaDB Galera is a multi-primary database clus... https://artifacthub.io/packages/helm/smo-helm-c... 6.0.0 Chart for MariaDB Galera cluster https://artifacthub.io/packages/helm/appuio/mar... 1.2.4 10.5.12 MariaDB Galera is a multi-master database clust... https://artifacthub.io/packages/helm/bitnami-ak... 7.3.6 10.6.8 MariaDB Galera is a multi-primary database clus... https://artifacthub.io/packages/helm/moco/moco 0.2.3 0.12.1 MySQL operator on Kubernetes using GTID-based s... https://artifacthub.io/packages/helm/viveksahu2... 1.0.0 2 This is my custom chart to deploy wordpress and... https://artifacthub.io/packages/helm/truecharts... 3.0.23 0.92.3 Turns any MySQL, PostgreSQL, SQL Server, SQLite... https://artifacthub.io/packages/helm/kfirfer/pr... 0.0.2 2.0.15 Chart for ProxySQL https://artifacthub.io/packages/helm/banzaiclou... 0.0.2 A TiDB Helm chart for Kubernetes https://artifacthub.io/packages/helm/webapp-db-... 0.1.0 1.0 Java frontend with a MySQL backend https://artifacthub.io/packages/helm/wordpressm... 0.1.0 1.1
Important : Notez que la chaîne recherchée peut se retrouver dans l'URL aussi bien que dans la description.
Recherchez maintenant le Chart WordPress. Par défaut, les colonnes plus large que 50 caractères sont tronquées :
trainee@gateway:~$ helm 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.0.10 6.0.1 WordPress is the world's most popular blogging ... https://artifacthub.io/packages/helm/bitnami/wo... 15.0.11 6.0.1 WordPress is the world's most popular blogging ... https://artifacthub.io/packages/helm/sikalabs/w... 0.2.0 Simple Wordpress https://artifacthub.io/packages/helm/groundhog2... 0.6.2 6.0.1-apache A Helm chart for Wordpress on Kubernetes https://artifacthub.io/packages/helm/riftbit/wo... 12.1.16 5.8.1 Web publishing platform for building blogs and ... https://artifacthub.io/packages/helm/camptocamp... 0.6.10 4.8.1 Web publishing platform for building blogs and ... https://artifacthub.io/packages/helm/mcouliba/w... 0.1.0 1.16.0 A Helm chart for Kubernetes https://artifacthub.io/packages/helm/homeenterp... 0.5.0 5.9.3-php8.1-apache Blog server https://artifacthub.io/packages/helm/wordpress-... 1.0.0 1.1 This is a package for configuring wordpress and... https://artifacthub.io/packages/helm/securecode... 3.12.1 4.0 Insecure & Outdated Wordpress Instance: Never e... https://artifacthub.io/packages/helm/bitnami/wo... 2.0.11 6.0.1 WordPress for Intel is the most popular bloggin... https://artifacthub.io/packages/helm/wordpressm... 1.0.0 This is the Helm Chart that creates the Wordpre... https://artifacthub.io/packages/helm/veilis-hel... 0.12.1999 v0.12.1999 Veilis WordPress Operator Helm Chart https://artifacthub.io/packages/helm/bitpoke/wo... 0.12.1 v0.12.1 Bitpoke WordPress Operator Helm Chart https://artifacthub.io/packages/helm/veilis-hel... 0.12.3999 v0.12.3999 Helm chart for deploying a WordPress site on Ve... https://artifacthub.io/packages/helm/bitpoke/wo... 0.12.3 v0.12.3 Helm chart for deploying a WordPress site on Bi... https://artifacthub.io/packages/helm/riotkit-or... 2.1.0-alpha4 v2.1-alpha4 Lightweight Wordpress installation with additio... https://artifacthub.io/packages/helm/presslabs/... 0.11.0-alpha.3 0.11.0-alpha.3 Presslabs WordPress Operator Helm Chart https://artifacthub.io/packages/helm/presslabs/... 1.0.0-test.1 v1.0.0-test.1 A Helm chart for deploying a WordPress site on ... https://artifacthub.io/packages/helm/phntom/bin... 0.0.4 0.0.3 www.binaryvision.co.il static wordpress https://artifacthub.io/packages/helm/gh-shessel... 2.1.4 5.9.3 Web publishing platform for building blogs and ... https://artifacthub.io/packages/helm/sikalabs/w... 0.1.0 https://artifacthub.io/packages/helm/gh-shessel... 3.0.16 6.0.0 Web publishing platform for building blogs and ... https://artifacthub.io/packages/helm/bitpoke/bi... 1.8.8 1.8.8 The Bitpoke App for WordPress provides a versat... https://artifacthub.io/packages/helm/sonu-wordp... 1.0.0 2 This is my custom chart to deploy wordpress and... https://artifacthub.io/packages/helm/veilis-hel... 1.8.8999 1.8.8999 The Veilis App for WordPress provides a versati... https://artifacthub.io/packages/helm/uvaise-wor... 0.2.0 1.1.0 Wordpress for Kubernetes https://artifacthub.io/packages/helm/wordpress/... 0.2.0 1.1.0 Wordpress for Kubernetes https://artifacthub.io/packages/helm/wordpress-... 1.0.0 2 This is my custom chart to deploy wordpress and... https://artifacthub.io/packages/helm/veilis-hel... 0.12.3999 v0.12.3999 Your Open-Source, Cloud-Native WordPress Infras... https://artifacthub.io/packages/helm/bitpoke/stack 0.12.3 v0.12.3 Your Open-Source, Cloud-Native WordPress Infras... https://artifacthub.io/packages/helm/securecode... 3.12.1 v3.8.22 A Helm chart for the WordPress security scanner... https://artifacthub.io/packages/helm/wordpresss... 1.1.0 5.8.2 Web publishing platform for building blogs and ... https://artifacthub.io/packages/helm/viveksahu2... 1.0.0 2 This is my custom chart to deploy wordpress and... https://artifacthub.io/packages/helm/presslabs/... 0.11.0-rc.2 v0.11.0-rc.2 Open-Source WordPress Infrastructure on Kubernetes https://artifacthub.io/packages/helm/presslabs/... 1.6.2 v1.6.2 Open-Source WordPress Infrastructure on Kubernetes https://artifacthub.io/packages/helm/six/wordress 0.2.0 1.1.0 Wordpress for Kubernetes https://artifacthub.io/packages/helm/jinchi-cha... 0.2.0 1.1.0 Wordpress for Kubernetes https://artifacthub.io/packages/helm/wordpressm... 0.1.0 1.1 https://artifacthub.io/packages/helm/presslabs/... 1.3.2 v1.3.2 Presslabs WordPress Operator Helm Chart
Pour visualiser l'ensemble de chaque ligne, utilisez l'option –max-col-width=0 :
trainee@gateway:~$ helm search hub wordpress --max-col-width=0 URL CHART VERSION APP VERSION DESCRIPTION https://artifacthub.io/packages/helm/kube-wordpress/wordpress 0.1.0 1.1 this is my wordpress package https://artifacthub.io/packages/helm/bitnami-aks/wordpress 15.0.10 6.0.1 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. https://artifacthub.io/packages/helm/bitnami/wordpress 15.0.11 6.0.1 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. https://artifacthub.io/packages/helm/sikalabs/wordpress 0.2.0 Simple Wordpress https://artifacthub.io/packages/helm/groundhog2k/wordpress 0.6.2 6.0.1-apache A Helm chart for Wordpress on Kubernetes https://artifacthub.io/packages/helm/riftbit/wordpress 12.1.16 5.8.1 Web publishing platform for building blogs and websites. https://artifacthub.io/packages/helm/camptocamp3/wordpress 0.6.10 4.8.1 Web publishing platform for building blogs and websites. https://artifacthub.io/packages/helm/mcouliba/wordpress 0.1.0 1.16.0 A Helm chart for Kubernetes https://artifacthub.io/packages/helm/homeenterpriseinc/wordpress 0.5.0 5.9.3-php8.1-apache Blog server https://artifacthub.io/packages/helm/wordpress-mysql-1/wordpress-mysql 1.0.0 1.1 This is a package for configuring wordpress and mysql on kubertes automatically https://artifacthub.io/packages/helm/securecodebox/old-wordpress 3.12.1 4.0 Insecure & Outdated Wordpress Instance: Never expose it to the internet! https://artifacthub.io/packages/helm/bitnami/wordpress-intel 2.0.11 6.0.1 WordPress for Intel is the most popular blogging application combined with cryptography acceleration for 3rd gen Xeon Scalable Processors (Ice Lake) to get a breakthrough performance improvement. https://artifacthub.io/packages/helm/wordpressmysql/wordpress-mysql 1.0.0 This is the Helm Chart that creates the Wordpress and MySQL service with dynamic parameters https://artifacthub.io/packages/helm/veilis-helm-charts/wordpress-operator 0.12.1999 v0.12.1999 Veilis WordPress Operator Helm Chart https://artifacthub.io/packages/helm/bitpoke/wordpress-operator 0.12.1 v0.12.1 Bitpoke WordPress Operator Helm Chart https://artifacthub.io/packages/helm/veilis-helm-charts/wordpress-site 0.12.3999 v0.12.3999 Helm chart for deploying a WordPress site on Veilis Stack https://artifacthub.io/packages/helm/bitpoke/wordpress-site 0.12.3 v0.12.3 Helm chart for deploying a WordPress site on Bitpoke Stack https://artifacthub.io/packages/helm/riotkit-org/wordpress-hardened 2.1.0-alpha4 v2.1-alpha4 Lightweight Wordpress installation with additional security fixes https://artifacthub.io/packages/helm/presslabs/wordpress-operator 0.11.0-alpha.3 0.11.0-alpha.3 Presslabs WordPress Operator Helm Chart https://artifacthub.io/packages/helm/presslabs/wordpress-site 1.0.0-test.1 v1.0.0-test.1 A Helm chart for deploying a WordPress site on Presslabs Stack https://artifacthub.io/packages/helm/phntom/binaryvision-static-wordpress 0.0.4 0.0.3 www.binaryvision.co.il static wordpress https://artifacthub.io/packages/helm/gh-shesselink81-public/wordpress-apache 2.1.4 5.9.3 Web publishing platform for building blogs and websites. https://artifacthub.io/packages/helm/sikalabs/wordpress-mysql 0.1.0 https://artifacthub.io/packages/helm/gh-shesselink81-public/wordpress-nginx 3.0.16 6.0.0 Web publishing platform for building blogs and websites. https://artifacthub.io/packages/helm/bitpoke/bitpoke 1.8.8 1.8.8 The Bitpoke App for WordPress provides a versatile dashboard to create, deploy, scale, manage and monitor WordPress sites in a Kubernetes cluster. https://artifacthub.io/packages/helm/sonu-wordpress-mysql/mychart 1.0.0 2 This is my custom chart to deploy wordpress and mysql https://artifacthub.io/packages/helm/veilis-helm-charts/veilis 1.8.8999 1.8.8999 The Veilis App for WordPress provides a versatile dashboard to create, deploy, scale, manage and monitor WordPress sites in a Kubernetes cluster. https://artifacthub.io/packages/helm/uvaise-wordpress/wordress 0.2.0 1.1.0 Wordpress for Kubernetes https://artifacthub.io/packages/helm/wordpress/wordress 0.2.0 1.1.0 Wordpress for Kubernetes https://artifacthub.io/packages/helm/wordpress-mysql-helm-chart/mychart 1.0.0 2 This is my custom chart to deploy wordpress and mysql https://artifacthub.io/packages/helm/veilis-helm-charts/stack 0.12.3999 v0.12.3999 Your Open-Source, Cloud-Native WordPress Infrastructure https://artifacthub.io/packages/helm/bitpoke/stack 0.12.3 v0.12.3 Your Open-Source, Cloud-Native WordPress Infrastructure https://artifacthub.io/packages/helm/securecodebox/wpscan 3.12.1 v3.8.22 A Helm chart for the WordPress security scanner that integrates with the secureCodeBox. https://artifacthub.io/packages/helm/wordpressss-app/app 1.1.0 5.8.2 Web publishing platform for building blogs and websites. https://artifacthub.io/packages/helm/viveksahu26/mychart 1.0.0 2 This is my custom chart to deploy wordpress and mysql https://artifacthub.io/packages/helm/presslabs/stack 0.11.0-rc.2 v0.11.0-rc.2 Open-Source WordPress Infrastructure on Kubernetes https://artifacthub.io/packages/helm/presslabs/stack-operators 1.6.2 v1.6.2 Open-Source WordPress Infrastructure on Kubernetes https://artifacthub.io/packages/helm/six/wordress 0.2.0 1.1.0 Wordpress for Kubernetes https://artifacthub.io/packages/helm/jinchi-chart/wordress 0.2.0 1.1.0 Wordpress for Kubernetes https://artifacthub.io/packages/helm/wordpressmysqlapp/wpmysql 0.1.0 1.1 https://artifacthub.io/packages/helm/presslabs/wp-operator 1.3.2 v1.3.2 Presslabs WordPress Operator Helm Chart
Il est aussi possible d'obtenir la sortie au format YAML :
trainee@gateway:~$ helm search hub wordpress --output yaml - app_version: "1.1" description: this is my wordpress package repository: name: kube-wordpress url: https://harsh-del.github.io/wordpress-charts/charts/ url: https://artifacthub.io/packages/helm/kube-wordpress/wordpress version: 0.1.0 - app_version: 6.0.1 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. repository: name: bitnami-aks url: https://marketplace.azurecr.io/helm/v1/repo url: https://artifacthub.io/packages/helm/bitnami-aks/wordpress version: 15.0.10 - app_version: 6.0.1 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. repository: name: bitnami url: https://charts.bitnami.com/bitnami url: https://artifacthub.io/packages/helm/bitnami/wordpress version: 15.0.11 - app_version: "" description: Simple Wordpress repository: name: sikalabs url: https://helm.sikalabs.io url: https://artifacthub.io/packages/helm/sikalabs/wordpress version: 0.2.0 - app_version: 6.0.1-apache description: A Helm chart for Wordpress on Kubernetes repository: name: groundhog2k url: https://groundhog2k.github.io/helm-charts/ url: https://artifacthub.io/packages/helm/groundhog2k/wordpress version: 0.6.2 - app_version: 5.8.1 description: Web publishing platform for building blogs and websites. repository: name: riftbit url: https://charts.riftbit.com/ url: https://artifacthub.io/packages/helm/riftbit/wordpress version: 12.1.16 - app_version: 4.8.1 description: Web publishing platform for building blogs and websites. repository: name: camptocamp3 url: https://camptocamp.github.io/charts url: https://artifacthub.io/packages/helm/camptocamp3/wordpress version: 0.6.10 - app_version: 1.16.0 description: A Helm chart for Kubernetes repository: name: mcouliba url: https://mcouliba.github.io/helm-charts url: https://artifacthub.io/packages/helm/mcouliba/wordpress version: 0.1.0 - app_version: 5.9.3-php8.1-apache description: Blog server repository: name: homeenterpriseinc url: https://homeenterpriseinc.github.io/helm-charts/ url: https://artifacthub.io/packages/helm/homeenterpriseinc/wordpress version: 0.5.0 - app_version: "1.1" description: This is a package for configuring wordpress and mysql on kubertes automatically repository: name: wordpress-mysql-1 url: https://akhilvmjr64.github.io/wordpress-mysql/charts url: https://artifacthub.io/packages/helm/wordpress-mysql-1/wordpress-mysql version: 1.0.0 - app_version: "4.0" description: 'Insecure & Outdated Wordpress Instance: Never expose it to the internet!' repository: name: securecodebox url: https://charts.securecodebox.io/ url: https://artifacthub.io/packages/helm/securecodebox/old-wordpress version: 3.12.1 - app_version: 6.0.1 description: WordPress for Intel is the most popular blogging application combined with cryptography acceleration for 3rd gen Xeon Scalable Processors (Ice Lake) to get a breakthrough performance improvement. repository: name: bitnami url: https://charts.bitnami.com/bitnami url: https://artifacthub.io/packages/helm/bitnami/wordpress-intel version: 2.0.11 - app_version: "" description: This is the Helm Chart that creates the Wordpress and MySQL service with dynamic parameters repository: name: wordpressmysql url: https://launchpad5682.github.io/WordPressMySQLHelmChart/charts url: https://artifacthub.io/packages/helm/wordpressmysql/wordpress-mysql version: 1.0.0 - app_version: v0.12.1999 description: Veilis WordPress Operator Helm Chart repository: name: veilis-helm-charts url: http://veilis-helm-charts.aionsigma.com/ url: https://artifacthub.io/packages/helm/veilis-helm-charts/wordpress-operator version: 0.12.1999 - app_version: v0.12.1 description: Bitpoke WordPress Operator Helm Chart repository: name: bitpoke url: https://helm-charts.bitpoke.io url: https://artifacthub.io/packages/helm/bitpoke/wordpress-operator version: 0.12.1 - app_version: v0.12.3999 description: Helm chart for deploying a WordPress site on Veilis Stack repository: name: veilis-helm-charts url: http://veilis-helm-charts.aionsigma.com/ url: https://artifacthub.io/packages/helm/veilis-helm-charts/wordpress-site version: 0.12.3999 - app_version: v0.12.3 description: Helm chart for deploying a WordPress site on Bitpoke Stack repository: name: bitpoke url: https://helm-charts.bitpoke.io url: https://artifacthub.io/packages/helm/bitpoke/wordpress-site version: 0.12.3 - app_version: v2.1-alpha4 description: Lightweight Wordpress installation with additional security fixes repository: name: riotkit-org url: https://riotkit-org.github.io/helm-of-revolution/ url: https://artifacthub.io/packages/helm/riotkit-org/wordpress-hardened version: 2.1.0-alpha4 - app_version: 0.11.0-alpha.3 description: Presslabs WordPress Operator Helm Chart repository: name: presslabs url: https://presslabs.github.io/charts url: https://artifacthub.io/packages/helm/presslabs/wordpress-operator version: 0.11.0-alpha.3 - app_version: v1.0.0-test.1 description: A Helm chart for deploying a WordPress site on Presslabs Stack repository: name: presslabs url: https://presslabs.github.io/charts url: https://artifacthub.io/packages/helm/presslabs/wordpress-site version: 1.0.0-test.1 - app_version: 0.0.3 description: www.binaryvision.co.il static wordpress repository: name: phntom url: https://phntom.kix.co.il/charts/ url: https://artifacthub.io/packages/helm/phntom/binaryvision-static-wordpress version: 0.0.4 - app_version: 5.9.3 description: Web publishing platform for building blogs and websites. repository: name: gh-shesselink81-public url: https://shesselink81.github.io/helm-charts/public-charts/ url: https://artifacthub.io/packages/helm/gh-shesselink81-public/wordpress-apache version: 2.1.4 - app_version: "" description: "" repository: name: sikalabs url: https://helm.sikalabs.io url: https://artifacthub.io/packages/helm/sikalabs/wordpress-mysql version: 0.1.0 - app_version: 6.0.0 description: Web publishing platform for building blogs and websites. repository: name: gh-shesselink81-public url: https://shesselink81.github.io/helm-charts/public-charts/ url: https://artifacthub.io/packages/helm/gh-shesselink81-public/wordpress-nginx version: 3.0.16 - app_version: 1.8.8 description: The Bitpoke App for WordPress provides a versatile dashboard to create, deploy, scale, manage and monitor WordPress sites in a Kubernetes cluster. repository: name: bitpoke url: https://helm-charts.bitpoke.io url: https://artifacthub.io/packages/helm/bitpoke/bitpoke version: 1.8.8 - app_version: "2" description: This is my custom chart to deploy wordpress and mysql repository: name: sonu-wordpress-mysql url: https://sonukushwaha403.github.io/wordpress_mysql_helm_chart/charts/ url: https://artifacthub.io/packages/helm/sonu-wordpress-mysql/mychart version: 1.0.0 - app_version: 1.8.8999 description: The Veilis App for WordPress provides a versatile dashboard to create, deploy, scale, manage and monitor WordPress sites in a Kubernetes cluster. repository: name: veilis-helm-charts url: http://veilis-helm-charts.aionsigma.com/ url: https://artifacthub.io/packages/helm/veilis-helm-charts/veilis version: 1.8.8999 - app_version: 1.1.0 description: Wordpress for Kubernetes repository: name: uvaise-wordpress url: https://uvaise1.github.io/five/ url: https://artifacthub.io/packages/helm/uvaise-wordpress/wordress version: 0.2.0 - app_version: 1.1.0 description: Wordpress for Kubernetes repository: name: wordpress url: https://guptaadi123.github.io/helm_chart/charts/ url: https://artifacthub.io/packages/helm/wordpress/wordress version: 0.2.0 - app_version: "2" description: This is my custom chart to deploy wordpress and mysql repository: name: wordpress-mysql-helm-chart url: https://viveksahu26.github.io/wordpress-mysql-deployment/chart/charts url: https://artifacthub.io/packages/helm/wordpress-mysql-helm-chart/mychart version: 1.0.0 - app_version: v0.12.3999 description: Your Open-Source, Cloud-Native WordPress Infrastructure repository: name: veilis-helm-charts url: http://veilis-helm-charts.aionsigma.com/ url: https://artifacthub.io/packages/helm/veilis-helm-charts/stack version: 0.12.3999 - app_version: v0.12.3 description: Your Open-Source, Cloud-Native WordPress Infrastructure repository: name: bitpoke url: https://helm-charts.bitpoke.io url: https://artifacthub.io/packages/helm/bitpoke/stack version: 0.12.3 - app_version: v3.8.22 description: A Helm chart for the WordPress security scanner that integrates with the secureCodeBox. repository: name: securecodebox url: https://charts.securecodebox.io/ url: https://artifacthub.io/packages/helm/securecodebox/wpscan version: 3.12.1 - app_version: 5.8.2 description: Web publishing platform for building blogs and websites. repository: name: wordpressss-app url: https://aditya-helmchart.github.io url: https://artifacthub.io/packages/helm/wordpressss-app/app version: 1.1.0 - app_version: "2" description: This is my custom chart to deploy wordpress and mysql repository: name: viveksahu26 url: https://viveksahu26.github.io/wordpress_mysql_helm_chart/charts url: https://artifacthub.io/packages/helm/viveksahu26/mychart version: 1.0.0 - app_version: v0.11.0-rc.2 description: Open-Source WordPress Infrastructure on Kubernetes repository: name: presslabs url: https://presslabs.github.io/charts url: https://artifacthub.io/packages/helm/presslabs/stack version: 0.11.0-rc.2 - app_version: v1.6.2 description: Open-Source WordPress Infrastructure on Kubernetes repository: name: presslabs url: https://presslabs.github.io/charts url: https://artifacthub.io/packages/helm/presslabs/stack-operators version: 1.6.2 - app_version: 1.1.0 description: Wordpress for Kubernetes repository: name: six url: https://uvaise1.github.io/six url: https://artifacthub.io/packages/helm/six/wordress version: 0.2.0 - app_version: 1.1.0 description: Wordpress for Kubernetes repository: name: jinchi-chart url: https://jinchihe.github.io/helm_chart/charts url: https://artifacthub.io/packages/helm/jinchi-chart/wordress version: 0.2.0 - app_version: "1.1" description: "" repository: name: wordpressmysqlapp url: https://vishaldhole173.github.io/Wordpress-Helm-Chart/chartss url: https://artifacthub.io/packages/helm/wordpressmysqlapp/wpmysql version: 0.1.0 - app_version: v1.3.2 description: Presslabs WordPress Operator Helm Chart repository: name: presslabs url: https://presslabs.github.io/charts url: https://artifacthub.io/packages/helm/presslabs/wp-operator version: 1.3.2
1.3 - Rechercher dans le Helm Hub
Rendez-vous ensuite à l'adresse du Hub en utilisant un navigateur Web et recherchez mysql :
Dans le résultat retourné, cliquez sur mysql du dépôt Bitnami :
Vous constaterez des informations conernant ce Chart ainsi que des instructions pour l'installer :
1.4 - Ajouter et supprimer un Dépôt
En utilisant les informations prises du Hub, installez maintenant le dépôt bitnami :
trainee@gateway:~$ helm repo add bitnami https://charts.bitnami.com/bitnami "bitnami" has been added to your repositories
Pour lister les dépôts installés, utilisez la commande helm repo list :
trainee@gateway:~$ helm repo list NAME URL bitnami https://charts.bitnami.com/bitnami
Pour mettre à jour les dépôts, utilisez la commande helm repo update :
trainee@gateway:~$ helm repo update Hang tight while we grab the latest from your chart repositories... ...Successfully got an update from the "bitnami" chart repository Update Complete. ⎈Happy Helming!⎈
Pour supprimer un dépôt, utilisez la commande helm repo remove <repo>
trainee@gateway:~$ helm repo remove bitnami "bitnami" has been removed from your repositories
trainee@gateway:~$ helm repo list Error: no repositories to show
1.5 - La Commande helm search repo
Ajoutez de nouveau le dépôt Bitnami :
trainee@gateway:~$ helm repo add bitnami https://charts.bitnami.com/bitnami "bitnami" has been added to your repositories
Pour voir le contenu de ce dépôt au format YAML, utilisez la commande helm search repo :
trainee@gateway:~$ helm search repo bitnami --output yaml | more - app_version: 2.3.3 description: Apache Airflow is a tool to express and execute workflows as directed acyclic graphs (DAGs). It includes utilities to schedule tasks, monitor task progress and handle task dependencies. name: bitnami/airflow version: 13.0.0 - app_version: 2.4.54 description: Apache HTTP Server is an open-source HTTP server. The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards. name: bitnami/apache version: 9.1.13 - app_version: 2.4.6 description: Argo CD is a continuous delivery tool for Kubernetes based on GitOps. name: bitnami/argo-cd version: 4.0.1 - app_version: 3.3.8 description: Argo Workflows is meant to orchestrate Kubernetes jobs in parallel. It uses DAG and step-based workflows name: bitnami/argo-workflows version: 2.3.6 - app_version: 6.0.7 description: ASP.NET Core is an open-source framework for web application development created by Microsoft. It runs on both the full .NET Framework, on Windows, and the cross-platform .NET Core. name: bitnami/aspnet-core version: 3.4.12 - app_version: 4.0.4 description: Apache Cassandra is an open source distributed database management system designed to handle large amounts of data across many servers, providing high availability with no single point of failure. name: bitnami/cassandra version: 9.2.7 - app_version: 1.8.2 description: Cert Manager is a Kubernetes add-on to automate the management and issuance of TLS certificates from various issuing sources. name: bitnami/cert-manager version: 0.7.1 - app_version: 1.16.0 --More--
Recherchez maintenant Wordpress dans le dépôt Bitnami :
trainee@gateway:~$ helm search repo wordpress NAME CHART VERSION APP VERSION DESCRIPTION bitnami/wordpress 15.0.11 6.0.1 WordPress is the world's most popular blogging ... bitnami/wordpress-intel 2.0.11 6.0.1 WordPress for Intel is the most popular bloggin...
La commande précédement exécutée ne retourne que la dernière verstion de Wordpress. Pour voir la liste des versions disponibles, utilisez l'option –versions :
trainee@gateway:~$ helm search repo wordpress --versions NAME CHART VERSION APP VERSION DESCRIPTION bitnami/wordpress 15.0.11 6.0.1 WordPress is the world's most popular blogging ... bitnami/wordpress 15.0.10 6.0.1 WordPress is the world's most popular blogging ... bitnami/wordpress 15.0.9 6.0.0 WordPress is the world's most popular blogging ... bitnami/wordpress 15.0.8 6.0.0 WordPress is the world's most popular blogging ... bitnami/wordpress 15.0.7 6.0.0 WordPress is the world's most popular blogging ... bitnami/wordpress 15.0.6 6.0.0 WordPress is the world's most popular blogging ... bitnami/wordpress 15.0.5 6.0.0 WordPress is the world's most popular blogging ... bitnami/wordpress 15.0.4 6.0.0 WordPress is the world's most popular blogging ... bitnami/wordpress 15.0.3 6.0.0 WordPress is the world's most popular blogging ... bitnami/wordpress 15.0.2 6.0.0 WordPress is the world's most popular blogging ... bitnami/wordpress 15.0.1 6.0.0 WordPress is the world's most popular blogging ... bitnami/wordpress 15.0.0 6.0.0 WordPress is the world's most popular blogging ... bitnami/wordpress 14.3.7 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 14.3.6 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 14.3.5 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 14.3.4 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 14.3.2 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 14.3.1 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 14.2.7 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 14.2.6 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 14.2.5 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 14.2.2 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 14.0.9 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 14.0.7 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 14.0.6 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 14.0.5 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 14.0.4 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 14.0.3 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 14.0.1 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 14.0.0 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 13.3.1 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 13.3.0 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 13.2.2 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 13.2.1 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 13.2.0 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 13.1.16 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 13.1.15 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 13.1.14 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 13.1.13 5.9.3 WordPress is the world's most popular blogging ... bitnami/wordpress 13.1.12 5.9.2 WordPress is the world's most popular blogging ... bitnami/wordpress 13.1.11 5.9.2 WordPress is the world's most popular blogging ... bitnami/wordpress 13.1.10 5.9.2 WordPress is the world's most popular blogging ... bitnami/wordpress 13.1.9 5.9.2 WordPress is the world's most popular blogging ... bitnami/wordpress 13.1.8 5.9.2 WordPress is the world's most popular blogging ... bitnami/wordpress 13.1.7 5.9.2 WordPress is the world's most popular blogging ... bitnami/wordpress 13.1.6 5.9.2 WordPress is the world's most popular blogging ... bitnami/wordpress 13.1.5 5.9.2 WordPress is the world's most popular blogging ... bitnami/wordpress 13.1.4 5.9.2 WordPress is the world's most popular blogging ... bitnami/wordpress 13.1.3 5.9.2 WordPress is the world's most popular blogging ... bitnami/wordpress 13.1.2 5.9.2 WordPress is the world's most popular blogging ... bitnami/wordpress 13.1.1 5.9.2 WordPress is the world's most popular blogging ... bitnami/wordpress 13.1.0 5.9.2 WordPress is the world's most popular blogging ... bitnami/wordpress 13.0.23 5.9.2 WordPress is the world's most popular blogging ... bitnami/wordpress 13.0.22 5.9.1 WordPress is the world's most popular blogging ... bitnami/wordpress 13.0.21 5.9.1 WordPress is the world's most popular blogging ... bitnami/wordpress 13.0.20 5.9.1 WordPress is the world's most popular blogging ... bitnami/wordpress 13.0.19 5.9.1 WordPress is the world's most popular blogging ... bitnami/wordpress 13.0.18 5.9.1 WordPress is the world's most popular blogging ... bitnami/wordpress 13.0.17 5.9.1 WordPress is the world's most popular blogging ... bitnami/wordpress 13.0.16 5.9.1 WordPress is the world's most popular blogging ... bitnami/wordpress 13.0.15 5.9.1 WordPress is the world's most popular blogging ... bitnami/wordpress 13.0.14 5.9.0 WordPress is the world's most popular blogging ... bitnami/wordpress 13.0.13 5.9.0 WordPress is the world's most popular blogging ... bitnami/wordpress 13.0.12 5.9.0 WordPress is the world's most popular blogging ... bitnami/wordpress 13.0.11 5.9.0 WordPress is the world's most popular blogging ... bitnami/wordpress 13.0.10 5.9.0 WordPress is the world's most popular blogging ... bitnami/wordpress 13.0.9 5.9.0 WordPress is the world's most popular blogging ... bitnami/wordpress 13.0.8 5.9.0 WordPress is the world's most popular blogging ... bitnami/wordpress 13.0.7 5.8.3 WordPress is the world's most popular blogging ... bitnami/wordpress 13.0.6 5.8.3 WordPress is the world's most popular blogging ... bitnami/wordpress 13.0.5 5.8.3 WordPress is the world's most popular blogging ... bitnami/wordpress 13.0.4 5.8.3 WordPress is the world's most popular blogging ... bitnami/wordpress 13.0.2 5.8.3 Web publishing platform for building blogs and ... bitnami/wordpress 12.3.3 5.8.3 Web publishing platform for building blogs and ... bitnami/wordpress 12.3.2 5.8.3 Web publishing platform for building blogs and ... bitnami/wordpress 12.3.1 5.8.3 Web publishing platform for building blogs and ... bitnami/wordpress 12.3.0 5.8.2 Web publishing platform for building blogs and ... bitnami/wordpress 12.2.9 5.8.2 Web publishing platform for building blogs and ... bitnami/wordpress-intel 2.0.11 6.0.1 WordPress for Intel is the most popular bloggin... bitnami/wordpress-intel 2.0.10 6.0.1 WordPress for Intel is the most popular bloggin... bitnami/wordpress-intel 2.0.9 6.0.0 WordPress for Intel is the most popular bloggin... bitnami/wordpress-intel 2.0.8 6.0.0 WordPress for Intel is the most popular bloggin... bitnami/wordpress-intel 2.0.7 6.0.0 WordPress for Intel is the most popular bloggin... bitnami/wordpress-intel 2.0.6 6.0.0 WordPress for Intel is the most popular bloggin... ...
1.6 - La Commande helm show
Pour voir les méta-données d'une version du Chart, il convient d'utiliser la commande helm show chart :
trainee@gateway:~$ helm show chart bitnami/wordpress --version=13.0.2 annotations: category: CMS apiVersion: v2 appVersion: 5.8.3 dependencies: - condition: mariadb.enabled name: mariadb repository: https://charts.bitnami.com/bitnami version: 10.x.x - condition: memcached.enabled name: memcached repository: https://charts.bitnami.com/bitnami version: 6.x.x - name: common repository: https://charts.bitnami.com/bitnami tags: - bitnami-common version: 1.x.x description: Web publishing platform for building blogs and websites. home: https://github.com/bitnami/charts/tree/master/bitnami/wordpress icon: https://bitnami.com/assets/stacks/wordpress/img/wordpress-stack-220x234.png keywords: - application - blog - cms - http - php - web - wordpress maintainers: - email: containers@bitnami.com name: Bitnami name: wordpress sources: - https://github.com/bitnami/bitnami-docker-wordpress - https://wordpress.org/ version: 13.0.2
Pour consultez le fichier README du Chart, il convient d'utiliser la commande helm show readme :
trainee@gateway:~$ helm show readme bitnami/wordpress --version 13.0.2 | more <!--- app-name: WordPress --> # WordPress [WordPress](https://wordpress.org/) is one of the most versatile open source content management systems on the market. A publishing platform for building blogs and websites. ## TL;DR ```console $ helm repo add bitnami https://charts.bitnami.com/bitnami $ helm install my-release bitnami/wordpress ``` ## Introduction This chart bootstraps a [WordPress](https://github.com/bitnami/bitnami-docker-wordpress) deployment on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. It also packages the [Bitnami MariaDB chart](https://github.com/bitnami/charts/tree/master/bitnami/mariadb) which is required for bootstrapping a MariaDB deployment for the database requirements of the WordPres s application, and the [Bitnami Memcached chart](https://github.com/bitnami/charts/tree/master/bitnami/memcached) that can be used to cache database queries. Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, Fluentd and Prome theus on top of the [BKPR](https://kubeprod.io/). ## Prerequisites - Kubernetes 1.19+ - Helm 3.2.0+ - PV provisioner support in the underlying infrastructure - ReadWriteMany volumes for deployment scaling ## Installing the Chart To install the chart with the release name `my-release`: ```console helm install my-release bitnami/wordpress ``` The command deploys WordPress on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation. > **Tip**: List all releases using `helm list` ## Uninstalling the Chart To uninstall/delete the `my-release` deployment: ```console helm delete my-release ``` The command removes all the Kubernetes components associated with the chart and deletes the release. ## Parameters ### Global parameters --More--
Pour consultez les valeurs du Chart, il convient d'utiliser la commande helm show values :
trainee@gateway:~$ helm show values bitnami/wordpress --version 13.0.2 | more ## @section Global parameters ## Global Docker image parameters ## Please, note that this will override the image parameters, including dependencies, configured to use the global value ## Current available global Docker image parameters: imageRegistry, imagePullSecrets and storageClass ## @param global.imageRegistry Global Docker image registry ## @param global.imagePullSecrets Global Docker registry secret names as an array ## @param global.storageClass Global StorageClass for Persistent Volume(s) ## global: imageRegistry: "" ## E.g. ## imagePullSecrets: ## - myRegistryKeySecretName ## imagePullSecrets: [] storageClass: "" ## @section Common parameters ## @param kubeVersion Override Kubernetes version ## kubeVersion: "" ## @param nameOverride String to partially override common.names.fullname template (will maintain the release name) ## nameOverride: "" ## @param fullnameOverride String to fully override common.names.fullname template ## fullnameOverride: "" ## @param commonLabels Labels to add to all deployed resources ## commonLabels: {} ## @param commonAnnotations Annotations to add to all deployed resources ## commonAnnotations: {} ## @param clusterDomain Kubernetes Cluster Domain ## clusterDomain: cluster.local ## @param extraDeploy Array of extra objects to deploy with the release ## extraDeploy: [] ## Enable diagnostic mode in the deployment ## diagnosticMode: ## @param diagnosticMode.enabled Enable diagnostic mode (all probes will be disabled and the command will be overridden) ## enabled: false ## @param diagnosticMode.command Command to override all containers in the deployment ## command: - sleep ## @param diagnosticMode.args Args to override all containers in the deployment ## args: - infinity --More--
Important : Les valeurs par défaut peuvent être surchargées par des valeurs dans un fichier au format YAML.
Pour consultez les méta-données, le fichier README ainsi que les valeurs du Chart, il convient d'utiliser la commande helm show all :
trainee@gateway:~$ helm show all bitnami/wordpress --version 13.0.2 | more annotations: category: CMS apiVersion: v2 appVersion: 5.8.3 dependencies: - condition: mariadb.enabled name: mariadb repository: https://charts.bitnami.com/bitnami version: 10.x.x - condition: memcached.enabled name: memcached repository: https://charts.bitnami.com/bitnami version: 6.x.x - name: common repository: https://charts.bitnami.com/bitnami tags: - bitnami-common version: 1.x.x description: Web publishing platform for building blogs and websites. home: https://github.com/bitnami/charts/tree/master/bitnami/wordpress icon: https://bitnami.com/assets/stacks/wordpress/img/wordpress-stack-220x234.png keywords: - application - blog - cms - http - php - web - wordpress maintainers: - email: containers@bitnami.com name: Bitnami name: wordpress sources: - https://github.com/bitnami/bitnami-docker-wordpress - https://wordpress.org/ version: 13.0.2 --- ## @section Global parameters ## Global Docker image parameters ## Please, note that this will override the image parameters, including dependencies, configured to use the global value ## Current available global Docker image parameters: imageRegistry, imagePullSecrets and storageClass ## @param global.imageRegistry Global Docker image registry ## @param global.imagePullSecrets Global Docker registry secret names as an array ## @param global.storageClass Global StorageClass for Persistent Volume(s) ## global: imageRegistry: "" ## E.g. ## imagePullSecrets: ## - myRegistryKeySecretName ## imagePullSecrets: [] storageClass: "" --More--
1.7 - Installation d'un Chart
Créez un Namespace appelé dof306 dans lequel vous allez installer WordPress :
trainee@gateway:~$ kubectl create namespace dof306 namespace/dof306 created
Créez le fichier wordpress-values.yaml contenant des valeurs qui surchargeront celles du Chart WordPress :
trainee@gateway:~$ vi wordpress-values.yaml trainee@gateway:~$ cat wordpress-values.yaml wordpressUsername: helm-user wordpressPassword: my-pass wordpressEmail: helm-user@i2tch.loc wordpressFirstName: Helm wordpressLastName: User wordpressBlogName: Learn Helm! service: type: NodePort
Installez maintenant le Chart WordPress :
trainee@gateway:~$ helm install wordpress bitnami/wordpress --values=wordpress-values.yaml --namespace dof306 --version 13.0.2 NAME: wordpress LAST DEPLOYED: Sat Jul 16 07:49:17 2022 NAMESPACE: dof306 STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: CHART NAME: wordpress CHART VERSION: 13.0.2 APP VERSION: 5.8.3 ** 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.dof306.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: export NODE_PORT=$(kubectl get --namespace dof306 -o jsonpath="{.spec.ports[0].nodePort}" services wordpress) export NODE_IP=$(kubectl get nodes --namespace dof306 -o jsonpath="{.items[0].status.addresses[0].address}") echo "WordPress URL: http://$NODE_IP:$NODE_PORT/" echo "WordPress Admin URL: http://$NODE_IP:$NODE_PORT/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: helm-user echo Password: $(kubectl get secret --namespace dof306 wordpress -o jsonpath="{.data.wordpress-password}" | base64 --decode)
Vérifiez ls statut du deployment de l'application :
trainee@gateway:~$ helm list --namespace dof306 NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION wordpress dof306 1 2022-07-16 09:57:00.556479771 +0200 CEST deployed wordpress-13.0.2 5.8.3
1.8 - La Commande helm get
Helm utilise un système de Hooks qui permet au développeurs d'exécuter des tâches à des moments précis. Les Hooks sont :
- pre-install
- post-install
- pre-delete
- post-delete
- pre-upgrade
- post-upgrade
- pre-rollback
- post-rollback
- test
Pour visualiser les Hooks, s'ils existent, il convient d'utiliser la commande helm get hooks :
trainee@gateway:~$ helm get hooks wordpress --namespace dof306 trainee@gateway:~$
Pour consulter les manifests, utilisez la commande helm get manifest :
trainee@gateway:~$ helm get manifest wordpress --namespace dof306 | more --- # Source: wordpress/charts/mariadb/templates/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: name: wordpress-mariadb namespace: "dof306" labels: app.kubernetes.io/name: mariadb helm.sh/chart: mariadb-10.3.1 app.kubernetes.io/instance: wordpress app.kubernetes.io/managed-by: Helm annotations: automountServiceAccountToken: false --- # Source: wordpress/charts/mariadb/templates/secrets.yaml apiVersion: v1 kind: Secret metadata: name: wordpress-mariadb namespace: "dof306" labels: app.kubernetes.io/name: mariadb helm.sh/chart: mariadb-10.3.1 app.kubernetes.io/instance: wordpress app.kubernetes.io/managed-by: Helm type: Opaque data: mariadb-root-password: "Ym9JcXFOcERUbQ==" mariadb-password: "Mlk0dUN6Nld3Zg==" --- # Source: wordpress/templates/secrets.yaml apiVersion: v1 kind: Secret metadata: name: wordpress namespace: "dof306" labels: app.kubernetes.io/name: wordpress helm.sh/chart: wordpress-13.0.2 app.kubernetes.io/instance: wordpress app.kubernetes.io/managed-by: Helm type: Opaque data: wordpress-password: "bXktcGFzcw==" --- # Source: wordpress/charts/mariadb/templates/primary/configmap.yaml apiVersion: v1 kind: ConfigMap metadata: name: wordpress-mariadb namespace: "dof306" labels: app.kubernetes.io/name: mariadb helm.sh/chart: mariadb-10.3.1 app.kubernetes.io/instance: wordpress --More--
Il est possible de revoir les NOTES imprimées à l'écran lors de l'exécution de la commande helm install en utilisant le comande help get notes :
trainee@gateway:~$ helm get notes wordpress --namespace dof306 NOTES: CHART NAME: wordpress CHART VERSION: 13.0.2 APP VERSION: 5.8.3 ** 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.dof306.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: export NODE_PORT=$(kubectl get --namespace dof306 -o jsonpath="{.spec.ports[0].nodePort}" services wordpress) export NODE_IP=$(kubectl get nodes --namespace dof306 -o jsonpath="{.items[0].status.addresses[0].address}") echo "WordPress URL: http://$NODE_IP:$NODE_PORT/" echo "WordPress Admin URL: http://$NODE_IP:$NODE_PORT/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: helm-user echo Password: $(kubectl get secret --namespace dof306 wordpress -o jsonpath="{.data.wordpress-password}" | base64 --decode)
Pour visualiser les valeurs spécifiées par l'utilisateur dans le fichier de valeurs, utilisez la commande helm get values :
trainee@gateway:~$ helm get values wordpress --namespace dof306 USER-SUPPLIED VALUES: service: type: NodePort wordpressBlogName: Learn Helm! wordpressEmail: helm-user@i2tch.loc wordpressFirstName: Helm wordpressLastName: User wordpressPassword: my-pass wordpressUsername: helm-user
Pour voir toutes les valeurs, il convient d'utiliser la commande helm get values avec l'option –all :
trainee@gateway:~$ helm get values wordpress --all --namespace dof306 | more COMPUTED VALUES: affinity: {} allowEmptyPassword: true allowOverrideNone: false apacheConfiguration: "" args: [] autoscaling: enabled: false maxReplicas: 11 minReplicas: 1 targetCPU: 50 targetMemory: 50 clusterDomain: cluster.local command: [] common: exampleValue: common-chart global: imagePullSecrets: [] imageRegistry: "" storageClass: "" commonAnnotations: {} commonLabels: {} containerPorts: http: 8080 https: 8443 containerSecurityContext: enabled: true runAsNonRoot: true runAsUser: 1001 customHTAccessCM: "" customLivenessProbe: {} customPostInitScripts: {} customReadinessProbe: {} customStartupProbe: {} diagnosticMode: args: - infinity command: - sleep enabled: false existingApacheConfigurationConfigMap: "" existingSecret: "" existingWordPressConfigurationSecret: "" externalCache: host: localhost port: 11211 externalDatabase: database: bitnami_wordpress existingSecret: "" host: localhost password: "" port: 3306 user: bn_wordpress extraContainerPorts: [] extraDeploy: [] extraEnvVars: [] --More--
Dernièrement pour visualiser toutes les informations, utilisez la commande helm get all :
trainee@gateway:~$ helm get all wordpress --namespace dof306 | more NAME: wordpress LAST DEPLOYED: Sat Jul 16 07:49:17 2022 NAMESPACE: dof306 STATUS: deployed REVISION: 1 TEST SUITE: None USER-SUPPLIED VALUES: service: type: NodePort wordpressBlogName: Learn Helm! wordpressEmail: helm-user@i2tch.loc wordpressFirstName: Helm wordpressLastName: User wordpressPassword: my-pass wordpressUsername: helm-user COMPUTED VALUES: affinity: {} allowEmptyPassword: true allowOverrideNone: false apacheConfiguration: "" args: [] autoscaling: enabled: false maxReplicas: 11 minReplicas: 1 targetCPU: 50 targetMemory: 50 clusterDomain: cluster.local command: [] common: exampleValue: common-chart global: imagePullSecrets: [] imageRegistry: "" storageClass: "" commonAnnotations: {} commonLabels: {} containerPorts: http: 8080 https: 8443 containerSecurityContext: enabled: true runAsNonRoot: true runAsUser: 1001 customHTAccessCM: "" customLivenessProbe: {} customPostInitScripts: {} customReadinessProbe: {} customStartupProbe: {} diagnosticMode: args: - infinity command: - sleep enabled: false --More--
1.9 - Utilisation des NOTES
Vérifiez le nombre de Pods qui ont été démarrés :
trainee@gateway:~$ kubectl get pods -n dof306 NAME READY STATUS RESTARTS AGE wordpress-6cb976dc8f-8xwhv 1/1 Running 1 (12m ago) 15m wordpress-mariadb-0 1/1 Running 0 15m
Pour se connecter à WordPress, il convient de suivre les instructions de la section NOTES imprimée à l'écran lors de l'exécution de la commande helm install :
trainee@gateway:~$ export NODE_PORT=$(kubectl get --namespace dof306 -o jsonpath="{.spec.ports[0].nodePort}" services wordpress) trainee@gateway:~$ export NODE_IP=$(kubectl get nodes --namespace dof306 -o jsonpath="{.items[0].status.addresses[0].address}") trainee@gateway:~$ echo "WordPress URL: http://$NODE_IP:$NODE_PORT/" WordPress URL: http://192.168.59.100:30140/ trainee@gateway:~$ echo "WordPress Admin URL: http://$NODE_IP:$NODE_PORT/admin" WordPress Admin URL: http://192.168.59.100:30140/admin
Si vous oubliez le mot de passe de l'interface d'administration de l'installation de WordPress, utilisez la commande suivante :
trainee@gateway:~$ echo Password: $(kubectl get secret --namespace dof306 wordpress -o jsonpath="{.data.wordpress-password}" | base64 -d) Password: my-pass
Connectez-vous maintenant à votre serveur cloud en mode graphique. Ouvrez le navigateur Firefox et saisissez l'URL que vous avez obtenu ci-dessus. Connectez-vous ensuite à votre Wordpress.
Déconnectez-vous et revenez à votre connexion SSH.
1.10 - La Commande helm upgrade
La mise-à-jour d'un Chart se fait en modifiant les valeurs dans le fichier YAML. Dans notre cas, le fichier s'appelle wordpress-values.yaml. Modifiez ce fichier pour porter le nombre de Replicas à 2 et pour diminuer la mémoire et le nombre de millicores du processeur par rapport à leurs valeurs par défaut de 512Mi et de 300m respectivement :
trainee@gateway:~$ vi wordpress-values.yaml trainee@gateway:~$ cat wordpress-values.yaml wordpressUsername: helm-user wordpressPassword: my-pass wordpressEmail: helm-user@i2tch.loc wordpressFirstName: Helm wordpressLastName: User wordpressBlogName: Learn Helm! service: type: NodePort replicaCount: 2 resources: requests: memory: 256Mi cpu: 100m
Utilisez maintenant la commande helm upgrade pour mettre à jour le deployment :
trainee@gateway:~$ helm upgrade wordpress bitnami/wordpress --values wordpress-values.yaml -n dof306 --version 13.0.2 Error: UPGRADE FAILED: execution error at (wordpress/templates/NOTES.txt:108:4): PASSWORDS ERROR: You must provide your current passwords when upgrading the release. Note that even after reinstallation, old credentials may be needed as they may be kept in persistent volume claims. Further information can be obtained at https://docs.bitnami.com/general/how-to/troubleshoot-helm-chart-issues/#credential-errors-while-upgrading-chart-releases 'mariadb.auth.rootPassword' must not be empty, please add '--set mariadb.auth.rootPassword=$MARIADB_ROOT_PASSWORD' to the command. To get the current value: export MARIADB_ROOT_PASSWORD=$(kubectl get secret --namespace "dof306" wordpress-mariadb -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) 'mariadb.auth.password' must not be empty, please add '--set mariadb.auth.password=$MARIADB_PASSWORD' to the command. To get the current value: export MARIADB_PASSWORD=$(kubectl get secret --namespace "dof306" wordpress-mariadb -o jsonpath="{.data.mariadb-password}" | base64 --decode)
Notez que la commande helm upgrade a retournée une erreur. Cette erreur est créée par le fait que les deux variables $MARIADB_ROOT_PASSWORD et $MARIADB_PASSWORD soient vides. Renseignez donc ses deux variables :
trainee@gateway:~$ export MARIADB_ROOT_PASSWORD=$(kubectl get secret --namespace dof306 wordpress-mariadb -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) trainee@gateway:~$ export MARIADB_PASSWORD=$(kubectl get secret --namespace dof306 wordpress-mariadb -o jsonpath="{.data.mariadb-password}" | base64 --decode)
Exécutez de nouveau la commande précédente en ajoutant les deux options –set :
trainee@gateway:~$ helm upgrade wordpress bitnami/wordpress --values wordpress-values.yaml -n dof306 --set mariadb.auth.rootPassword=$MARIADB_ROOT_PASSWORD --set mariadb.auth.password=$MARIADB_PASSWORD --version 13.0.2 Release "wordpress" has been upgraded. Happy Helming! NAME: wordpress LAST DEPLOYED: Sat Jul 16 10:20:54 2022 NAMESPACE: dof306 STATUS: deployed REVISION: 2 TEST SUITE: None NOTES: CHART NAME: wordpress CHART VERSION: 13.0.2 APP VERSION: 5.8.3 ** 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.dof306.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: export NODE_PORT=$(kubectl get --namespace dof306 -o jsonpath="{.spec.ports[0].nodePort}" services wordpress) export NODE_IP=$(kubectl get nodes --namespace dof306 -o jsonpath="{.items[0].status.addresses[0].address}") echo "WordPress URL: http://$NODE_IP:$NODE_PORT/" echo "WordPress Admin URL: http://$NODE_IP:$NODE_PORT/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: helm-user echo Password: $(kubectl get secret --namespace dof306 wordpress -o jsonpath="{.data.wordpress-password}" | base64 --decode)
Vérifiez maintenant le nombre de Pods qui ont été démarrés :
trainee@gateway:~$ kubectl get pods -n dof306 NAME READY STATUS RESTARTS AGE wordpress-74d8fd5dfc-5cz7t 1/1 Running 0 93s wordpress-74d8fd5dfc-9pz7m 1/1 Running 0 52s wordpress-mariadb-0 1/1 Running 0 25m
Exécutez de nouveau la mise-à-jour, cette fois sans spécifier le fichier de valeurs wordpress-values.yaml sur la ligne de commande :
trainee@gateway:~$ helm upgrade wordpress bitnami/wordpress -n dof306 --version 13.0.2 Release "wordpress" has been upgraded. Happy Helming! NAME: wordpress LAST DEPLOYED: Sat Jul 16 10:23:44 2022 NAMESPACE: dof306 STATUS: deployed REVISION: 3 TEST SUITE: None NOTES: CHART NAME: wordpress CHART VERSION: 13.0.2 APP VERSION: 5.8.3 ** 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.dof306.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: export NODE_PORT=$(kubectl get --namespace dof306 -o jsonpath="{.spec.ports[0].nodePort}" services wordpress) export NODE_IP=$(kubectl get nodes --namespace dof306 -o jsonpath="{.items[0].status.addresses[0].address}") echo "WordPress URL: http://$NODE_IP:$NODE_PORT/" echo "WordPress Admin URL: http://$NODE_IP:$NODE_PORT/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: helm-user echo Password: $(kubectl get secret --namespace dof306 wordpress -o jsonpath="{.data.wordpress-password}" | base64 --decode)
Visualisez les valeurs qui ont été utilisées lors de la mise-à-jour :
trainee@gateway:~$ helm get values wordpress -n dof306 USER-SUPPLIED VALUES: mariadb: auth: password: nNFD89VbI0 rootPassword: zDzxxTqGmp replicaCount: 2 resources: requests: cpu: 100m memory: 256Mi service: type: NodePort wordpressBlogName: Learn Helm! wordpressEmail: helm-user@i2tch.loc wordpressFirstName: Helm wordpressLastName: User wordpressPassword: my-pass wordpressUsername: helm-user
Important : Notez que la commande helm a réutilisé les valeurs de la première mise-à-jour.
Par contre dès lors que vous spécifiez une modification d'une des valeurs sur la ligne de commande avec l'option –set, helm applique automatiquement l'option –reset-values :
trainee@gateway:~$ helm upgrade wordpress bitnami/wordpress --set replicaCount=1 -n dof306 --version 13.0.2 Error: UPGRADE FAILED: execution error at (wordpress/templates/NOTES.txt:108:4): PASSWORDS ERROR: You must provide your current passwords when upgrading the release. Note that even after reinstallation, old credentials may be needed as they may be kept in persistent volume claims. Further information can be obtained at https://docs.bitnami.com/general/how-to/troubleshoot-helm-chart-issues/#credential-errors-while-upgrading-chart-releases 'wordpressPassword' must not be empty, please add '--set wordpressPassword=$WORDPRESS_PASSWORD' to the command. To get the current value: export WORDPRESS_PASSWORD=$(kubectl get secret --namespace "dof306" wordpress -o jsonpath="{.data.wordpress-password}" | base64 --decode) 'mariadb.auth.rootPassword' must not be empty, please add '--set mariadb.auth.rootPassword=$MARIADB_ROOT_PASSWORD' to the command. To get the current value: export MARIADB_ROOT_PASSWORD=$(kubectl get secret --namespace "dof306" wordpress-mariadb -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) 'mariadb.auth.password' must not be empty, please add '--set mariadb.auth.password=$MARIADB_PASSWORD' to the command. To get the current value: export MARIADB_PASSWORD=$(kubectl get secret --namespace "dof306" wordpress-mariadb -o jsonpath="{.data.mariadb-password}" | base64 --decode)
Exportez donc la varaible $WORDPRESS_PASSWORD :
trainee@gateway:~$ export WORDPRESS_PASSWORD=$(kubectl get secret --namespace dof306 wordpress -o jsonpath="{.data.wordpress-password}" | base64 --decode)
Exécutez de nouveau la commande précédente en ajoutant les trois options –set :
trainee@gateway:~$ helm upgrade wordpress bitnami/wordpress -n dof306 --set replicaCount=1 --set wordpressPassword=$WORDPRESS_PASSWORD --set mariadb.auth.rootPassword=$MARIADB_ROOT_PASSWORD --set mariadb.auth.password=$MARIADB_PASSWORD --version 13.0.2 Release "wordpress" has been upgraded. Happy Helming! NAME: wordpress LAST DEPLOYED: Sat Jul 16 10:26:45 2022 NAMESPACE: dof306 STATUS: deployed REVISION: 4 TEST SUITE: None NOTES: CHART NAME: wordpress CHART VERSION: 13.0.2 APP VERSION: 5.8.3 ** 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.dof306.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 dof306 -w wordpress' export SERVICE_IP=$(kubectl get svc --namespace dof306 wordpress --include "{{ 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 dof306 wordpress -o jsonpath="{.data.wordpress-password}" | base64 --decode)
Visualisez les valeurs qui ont été utilisées lors de la mise-à-jour :
trainee@gateway:~$ helm get values wordpress -n dof306 USER-SUPPLIED VALUES: mariadb: auth: password: nNFD89VbI0 rootPassword: zDzxxTqGmp replicaCount: 1 wordpressPassword: my-pass
Important : Notez que les valeurs utilisées sont uniquement celles spécifiées sur la ligne de commande.
Vérifiez maintenant le nombre de Pods qui ont été démarrés :
trainee@gateway:~$ kubectl get pods -n dof306 NAME READY STATUS RESTARTS AGE wordpress-554d5c4c94-2dbs8 1/1 Running 0 64s wordpress-mariadb-0 1/1 Running 0 30m
Important : Notez la présence que d'un seul Pod wordpress.
Pour modifier le comportement par défaut de la commande helm, utilisez l'option –reuse-values :
trainee@gateway:~$ helm upgrade wordpress bitnami/wordpress -n dof306 --set replicaCount=2 --reuse-values --version 13.0.2 Release "wordpress" has been upgraded. Happy Helming! NAME: wordpress LAST DEPLOYED: Sat Jul 16 10:29:14 2022 NAMESPACE: dof306 STATUS: deployed REVISION: 5 TEST SUITE: None NOTES: CHART NAME: wordpress CHART VERSION: 13.0.2 APP VERSION: 5.8.3 ** 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.dof306.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 dof306 -w wordpress' export SERVICE_IP=$(kubectl get svc --namespace dof306 wordpress --include "{{ 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 dof306 wordpress -o jsonpath="{.data.wordpress-password}" | base64 --decode)
Visualisez les valeurs qui ont été utilisées lors de la mise-à-jour :
trainee@gateway:~$ helm get values wordpress -n dof306 USER-SUPPLIED VALUES: mariadb: auth: password: nNFD89VbI0 rootPassword: zDzxxTqGmp replicaCount: 2 wordpressPassword: my-pass
Important : Notez la réutilisation des valeurs autres que celle stipulée sur la ligne de commande.
Vérifiez maintenant le nombre de Pods qui ont été démarrés :
trainee@gateway:~$ kubectl get pods -n dof306 NAME READY STATUS RESTARTS AGE wordpress-554d5c4c94-2dbs8 1/1 Running 0 3m35s wordpress-554d5c4c94-lsmvm 1/1 Running 0 67s wordpress-mariadb-0 1/1 Running 0 33m
Important : Notez la présence de deux Pods WordPress.
1.11 - La Commande helm history
Helm utilise un système de révisions. Une nouvelle révision est créée à chaque installation, mise-à-jour ou quand il y a un rollback. Pour voir la liste des révisions, utilisez la commande suivante :
trainee@gateway:~$ helm history wordpress -n dof306 REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION 1 Sat Jul 16 09:57:00 2022 superseded wordpress-13.0.2 5.8.3 Install complete 2 Sat Jul 16 10:20:54 2022 superseded wordpress-13.0.2 5.8.3 Upgrade complete 3 Sat Jul 16 10:23:44 2022 superseded wordpress-13.0.2 5.8.3 Upgrade complete 4 Sat Jul 16 10:26:45 2022 superseded wordpress-13.0.2 5.8.3 Upgrade complete 5 Sat Jul 16 10:29:14 2022 deployed wordpress-13.0.2 5.8.3 Upgrade complete
La commande helm get values peut être utilisée pour consulter la liste des valeurs pour chaque révision :
trainee@gateway:~$ helm get values wordpress --revision 3 -n dof306 USER-SUPPLIED VALUES: mariadb: auth: password: nNFD89VbI0 rootPassword: zDzxxTqGmp replicaCount: 2 resources: requests: cpu: 100m memory: 256Mi service: type: NodePort wordpressBlogName: Learn Helm! wordpressEmail: helm-user@i2tch.loc wordpressFirstName: Helm wordpressLastName: User wordpressPassword: my-pass wordpressUsername: helm-user trainee@gateway:~$ helm get values wordpress --revision 4 -n dof306 USER-SUPPLIED VALUES: mariadb: auth: password: nNFD89VbI0 rootPassword: zDzxxTqGmp replicaCount: 1 wordpressPassword: my-pass
La commande helm get manifest peut être utilisée pour consulter l'état des ressources Kubernetes pour chaque révision :
trainee@gateway:~$ helm get manifest wordpress --revision 4 -n dof306 | more --- # Source: wordpress/charts/mariadb/templates/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: name: wordpress-mariadb namespace: "dof306" labels: app.kubernetes.io/name: mariadb helm.sh/chart: mariadb-10.3.1 app.kubernetes.io/instance: wordpress app.kubernetes.io/managed-by: Helm annotations: automountServiceAccountToken: false --- # Source: wordpress/charts/mariadb/templates/secrets.yaml apiVersion: v1 kind: Secret metadata: name: wordpress-mariadb namespace: "dof306" labels: app.kubernetes.io/name: mariadb helm.sh/chart: mariadb-10.3.1 app.kubernetes.io/instance: wordpress app.kubernetes.io/managed-by: Helm type: Opaque data: mariadb-root-password: "ekR6eHhUcUdtcA==" mariadb-password: "bk5GRDg5VmJJMA==" --- # Source: wordpress/templates/secrets.yaml apiVersion: v1 kind: Secret metadata: name: wordpress namespace: "dof306" labels: app.kubernetes.io/name: wordpress helm.sh/chart: wordpress-13.0.2 app.kubernetes.io/instance: wordpress app.kubernetes.io/managed-by: Helm type: Opaque data: wordpress-password: "bXktcGFzcw==" --- # Source: wordpress/charts/mariadb/templates/primary/configmap.yaml apiVersion: v1 kind: ConfigMap metadata: name: wordpress-mariadb namespace: "dof306" labels: app.kubernetes.io/name: mariadb helm.sh/chart: mariadb-10.3.1 app.kubernetes.io/instance: wordpress --More--
1.12 - La Commande helm rollback
Pour revenir à une révision précédente il convient d'utilise la commande helm rollback :
trainee@gateway:~$ helm rollback wordpress 3 -n dof306 Rollback was a success! Happy Helming!
Il convient ensuite de vérifier que les valeurs actuelles sont bien celles de la révision ciblée :
trainee@gateway:~$ helm get values wordpress -n dof306 USER-SUPPLIED VALUES: mariadb: auth: password: nNFD89VbI0 rootPassword: zDzxxTqGmp replicaCount: 2 resources: requests: cpu: 100m memory: 256Mi service: type: NodePort wordpressBlogName: Learn Helm! wordpressEmail: helm-user@i2tch.loc wordpressFirstName: Helm wordpressLastName: User wordpressPassword: my-pass wordpressUsername: helm-user
Le Rollback est clairement indiqué dans la sortie de la commande helm history :
trainee@gateway:~$ helm history wordpress -n dof306 REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION 1 Sat Jul 16 09:57:00 2022 superseded wordpress-13.0.2 5.8.3 Install complete 2 Sat Jul 16 10:20:54 2022 superseded wordpress-13.0.2 5.8.3 Upgrade complete 3 Sat Jul 16 10:23:44 2022 superseded wordpress-13.0.2 5.8.3 Upgrade complete 4 Sat Jul 16 10:26:45 2022 superseded wordpress-13.0.2 5.8.3 Upgrade complete 5 Sat Jul 16 10:29:14 2022 superseded wordpress-13.0.2 5.8.3 Upgrade complete 6 Sat Jul 16 10:33:13 2022 deployed wordpress-13.0.2 5.8.3 Rollback to 3
1.13 - La Commande helm uninstall
La désinstallation d'un Chart se fait en utilisant la commande helm uninstall. Par défaut cette commande supprime aussi l'historique des révisions sauf si l'option –keep-history est spécifiée sur la ligne de commande. Supprimez donc le Chart wordpress ainsi que l'historique des révisions :
trainee@gateway:~$ helm uninstall wordpress -n dof306 release "wordpress" uninstalled
La commande helm list démontre cette suppression :
trainee@gateway:~$ helm list -n dof306 NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
ainsi qua la sortie de la commande kubectl get deployments :
trainee@gateway:~$ kubectl get deployments -l app=wordpress -n dof306 No resources found in dof306 namespace.
Par contre la commande helm unistall ne supprime pas le PersistentVolumeClaim créé lors de l'installation du Chart :
trainee@gateway:~$ kubectl get pvc -n dof306 NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE data-wordpress-mariadb-0 Bound pvc-ba17bb4d-08a4-4256-8647-af7ce22cf783 8Gi RWO standard 39m
Pour supprimer le PersistentVolumeClaim, il est necéssaire d'utilise la commande kubectl delete pvc avec l'option –field-selector :
trainee@gateway:~$ kubectl delete pvc --field-selector metadata.name=data-wordpress-mariadb-0 -n dof306 persistentvolumeclaim "data-wordpress-mariadb-0" deleted
Le PersistentVolumeClaim se trouve de cette manière supprimé :
trainee@gateway:~$ kubectl get pvc -n dof306 No resources found in dof306 namespace
LAB #2 - Supervision de Kubernetes avec le Stack EFK
2.1 - Présentation du Stack EFK
Le stack EFK est composé de trois éléments :
- Elasticsearch qui assure :
- le stockage des métriques et journaux,
- Fluentd qui assure :
- la collecte des données brutes de Kubernetes,
- l'envoie des métriques et journaux à Elasticsearch,
- Kibana qui permet :
- la visualisation des données stockées dans Elasticsearch.
Avant de poursuivre, arrêtez minikube et augmentez la mémoire de sa machine virtuelle à 12 294 Mo et le nombre de vCPUs à 4 :
trainee@gateway:~$ minikube stop ✋ Stopping node "minikube" ... 🛑 1 node stopped. trainee@gateway:~$ minikube delete 🔥 Deleting "minikube" in virtualbox ... 💀 Removed all traces of the "minikube" cluster. trainee@gateway:~$ minikube config set memory 12294 ❗ These changes will take effect upon a minikube delete and then a minikube start trainee@gateway:~$ minikube config set cpus 4 ❗ These changes will take effect upon a minikube delete and then a minikube start trainee@gateway:~$ minikube start 😄 minikube v1.26.0 on Debian 11.3 (kvm/amd64) ✨ Using the virtualbox driver based on user configuration 👍 Starting control plane node minikube in cluster minikube 🔥 Creating virtualbox VM (CPUs=4, Memory=12294MB, Disk=20000MB) ... 🐳 Preparing Kubernetes v1.24.1 on Docker 20.10.16 ... ▪ Generating certificates and keys ... ▪ Booting up control plane ... ▪ Configuring RBAC rules ... ╭───────────────────────────────────────────────────────────────────────────────────────────────────╮ │ │ │ You have selected "virtualbox" driver, but there are better options ! │ │ For better performance and support consider using a different driver: │ │ - kvm2 │ │ - qemu2 │ │ │ │ To turn off this warning run: │ │ │ │ $ minikube config set WantVirtualBoxDriverWarning false │ │ │ │ │ │ To learn more about on minikube drivers checkout https://minikube.sigs.k8s.io/docs/drivers/ │ │ To see benchmarks checkout https://minikube.sigs.k8s.io/docs/benchmarks/cpuusage/ │ │ │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────╯ 🔎 Verifying Kubernetes components... ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5 🌟 Enabled addons: storage-provisioner, default-storageclass 🏄 Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
2.2 - Installation du Chart elasticsearch
Commencez par installer le repository stable de https://charts.helm.sh :
trainee@gateway:~$ helm repo add stable https://charts.helm.sh/stable "stable" has been added to your repositories
Installez ensuite le Chart helm elasticsearch :
trainee@gateway:~$ helm install elasticsearch stable/elasticsearch WARNING: This chart is deprecated NAME: elasticsearch LAST DEPLOYED: Sat Jul 16 11:27:22 2022 NAMESPACE: default STATUS: deployed REVISION: 1 NOTES: This Helm chart is deprecated. Please use https://github.com/elastic/helm-charts/tree/master/elasticsearch instead. --- The elasticsearch cluster has been installed. Elasticsearch can be accessed: * Within your cluster, at the following DNS name at port 9200: elasticsearch-client.default.svc * From outside the cluster, run these commands in the same shell: export POD_NAME=$(kubectl get pods --namespace default -l "app=elasticsearch,component=client,release=elasticsearch" -o jsonpath="{.items[0].metadata.name}") echo "Visit http://127.0.0.1:9200 to use Elasticsearch" kubectl port-forward --namespace default $POD_NAME 9200:9200
Patientez quelques minutes afin que tous les Pods affichent un état de READY :
trainee@gateway:~$ kubectl get pods NAME READY STATUS RESTARTS AGE elasticsearch-client-7869bf97bb-tb25p 1/1 Running 0 5m50s elasticsearch-client-7869bf97bb-zvl6h 1/1 Running 0 5m49s elasticsearch-data-0 1/1 Running 0 5m49s elasticsearch-data-1 1/1 Running 0 2m37s elasticsearch-master-0 1/1 Running 0 5m49s elasticsearch-master-1 1/1 Running 0 2m37s elasticsearch-master-2 1/1 Running 0 65s
Vérifiez ensuite la présence des services elasticsearch-client et elasticsearch-discovery :
trainee@gateway:~$ kubectl get services NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE elasticsearch-client ClusterIP 10.106.34.82 <none> 9200/TCP 8m23s elasticsearch-discovery ClusterIP None <none> 9300/TCP 8m23s kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 10m
2.3 - Installation du Chart fluentd-elasticsearch
Installez le Chart helm fluentd-elasticsearch à partir du repository stable :
trainee@gateway:~$ helm install fluentd stable/fluentd-elasticsearch --set elasticsearch.host=elasticsearch-client WARNING: This chart is deprecated W0716 12:20:08.692464 7135 warnings.go:70] spec.template.metadata.annotations[scheduler.alpha.kubernetes.io/critical-pod]: non-functional in v1.16+; use the "priorityClassName" field instead NAME: fluentd LAST DEPLOYED: Sat Jul 16 12:20:07 2022 NAMESPACE: default STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: 1. To verify that Fluentd has started, run: kubectl --namespace=default get pods -l "app.kubernetes.io/name=fluentd-elasticsearch,app.kubernetes.io/instance=fluentd" THIS APPLICATION CAPTURES ALL CONSOLE OUTPUT AND FORWARDS IT TO elasticsearch . Anything that might be identifying, including things like IP addresses, container images, and object names will NOT be anonymized.
Important : Fluentd a besoin de connaître l’emplacement de l'hôte Elasticsearch. Dans notre cas, la valeur est elasticsearch-client. Notez donc l'utilisation sur la ligne de commande de l'option –set elasticsearch.host=.
Patientez quelques secondes afin que le Pod fluentd-fluentd-elasticsearch-xxxxx affiche un état de READY :
trainee@gateway:~$ kubectl get pods NAME READY STATUS RESTARTS AGE elasticsearch-client-7869bf97bb-tb25p 1/1 Running 0 10m elasticsearch-client-7869bf97bb-zvl6h 1/1 Running 0 10m elasticsearch-data-0 1/1 Running 0 10m elasticsearch-data-1 1/1 Running 0 6m51s elasticsearch-master-0 1/1 Running 0 10m elasticsearch-master-1 1/1 Running 0 6m51s elasticsearch-master-2 1/1 Running 0 5m19s fluentd-fluentd-elasticsearch-znvq5 1/1 Running 0 62s
Important : Notez que dans le cas de l'utilisation de minikube, nous n'avons qu'un seul nœud dans le cluster Kubernetes. Pour cette raison, nous avons installé qu'un seul Pod Fluentd avec Helm sans passer par un DaemonSet.
2.4 - Installation du Chart kibana
Kibana a aussi besoin de connaître l'emplacement de l'hôte Elasticsearch. Cette fois-ci, la valeur sera incluse dans un fichier de values. Créez donc le fichier kibana-values.yaml :
trainee@gateway:~$ vi kibana-values.yaml trainee@gateway:~$ cat kibana-values.yaml files: kibana.yml: ## Default Kibana configuration from kibana-docker. server.name: kibana server.host: "0" ## For kibana < 6.6, use elasticsearch.url instead elasticsearch.hosts: http://elasticsearch-client:9200 service: type: NodePort
Important : Notez la création d'un service de type NodePort. Dans le cas de l'utilisation du DaemonSet, nous aurions créé un service ClusterIP* de type LoadBalancer.
Installez donc le Chart Helm kibana à partir du repository stable en référençant le fichier values kibana-values.yaml :
trainee@gateway:~$ helm install kibana stable/kibana -f kibana-values.yaml WARNING: This chart is deprecated NAME: kibana LAST DEPLOYED: Sat Jul 16 12:22:57 2022 NAMESPACE: default STATUS: deployed REVISION: 1 NOTES: THE CHART HAS BEEN DEPRECATED! Find the new official version @ https://github.com/elastic/helm-charts/tree/master/kibana To verify that kibana has started, run: kubectl --namespace=default get pods -l "app=kibana" Kibana can be accessed: * From outside the cluster, run these commands in the same shell: export NODE_PORT=$(kubectl get --namespace default -o jsonpath="{.spec.ports[0].nodePort}" services kibana) export NODE_IP=$(kubectl get nodes --namespace default -o jsonpath="{.items[0].status.addresses[0].address}") echo http://$NODE_IP:$NODE_PORT
Notez les instructions à la fin de la sortie précédente qui indiquent comment atteindre Kibana de l'extérieur du cluster. Créez donc les deux variables NODE_PORT et NODE_IP et exécutez la commande echo afin d'obtenir le socket de connexion à Kibana. Notez cette information :
trainee@gateway:~$ export NODE_PORT=$(kubectl get --namespace default -o jsonpath="{.spec.ports[0].nodePort}" services kibana) trainee@gateway:~$ export NODE_IP=$(kubectl get nodes --namespace default -o jsonpath="{.items[0].status.addresses[0].address}") trainee@gateway:~$ echo http://$NODE_IP:$NODE_PORT http://192.168.59.101:30812
Patientez quelques minutes afin que le Pod kibana-yyyyyyyyy-xxxxx affiche un état de READY :
trainee@gateway:~$ kubectl get pods NAME READY STATUS RESTARTS AGE elasticsearch-client-7869bf97bb-tb25p 1/1 Running 0 14m elasticsearch-client-7869bf97bb-zvl6h 1/1 Running 0 14m elasticsearch-data-0 1/1 Running 0 14m elasticsearch-data-1 1/1 Running 0 11m elasticsearch-master-0 1/1 Running 0 14m elasticsearch-master-1 1/1 Running 0 11m elasticsearch-master-2 1/1 Running 0 9m28s fluentd-fluentd-elasticsearch-znvq5 1/1 Running 0 5m11s kibana-74cd958bd4-qxmtc 1/1 Running 0 2m21s
Vérifiez ensuite la présence du service NodePort :
trainee@gateway:~$ kubectl get services NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE elasticsearch-client ClusterIP 10.106.34.82 <none> 9200/TCP 14m elasticsearch-discovery ClusterIP None <none> 9300/TCP 14m kibana NodePort 10.97.180.37 <none> 443:30812/TCP 2m49s kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 16m
2.5 - Génération de Traces dans Kubernetes
Créez maintenant un fichier counter.yaml afin de créer un Pod qui générera des logs de démonstration en continu :
trainee@gateway:~$ vi counter.yaml trainee@gateway:~$ cat counter.yaml ## counter.yaml apiVersion: v1 kind: Pod metadata: name: counter spec: containers: - name: count image: busybox args: [/bin/sh, -c, 'i=0; while true; do echo "Demo log $i: $(date)"; i=$((i+1)); sleep 1; done']
Appliquez ce fichier avec la commande kubecl :
trainee@gateway:~$ kubectl apply -f counter.yaml pod/counter created
Vérifiez que le Pod counter soit bien en état de READY :
trainee@gateway:~$ kubectl get pods NAME READY STATUS RESTARTS AGE counter 1/1 Running 0 17s elasticsearch-client-7869bf97bb-tb25p 1/1 Running 0 16m elasticsearch-client-7869bf97bb-zvl6h 1/1 Running 0 16m elasticsearch-data-0 1/1 Running 0 16m elasticsearch-data-1 1/1 Running 0 13m elasticsearch-master-0 1/1 Running 0 16m elasticsearch-master-1 1/1 Running 0 13m elasticsearch-master-2 1/1 Running 0 11m fluentd-fluentd-elasticsearch-znvq5 1/1 Running 0 7m15s kibana-74cd958bd4-qxmtc 1/1 Running 0 4m25s
2.6 - Visualisation des Données avec Kibana
Connectez-vous à votre VM Gateway en mode VNC en utilisant Apache Guacamole ou via une connexion RDP.
Ouvrez le navigateur FireFox et saisissez l'adresse que vous avez obtenu en exécutant la commande echo ci-dessus.
Cliquez sur Explore on my own > Management > Index Patterns, ensuite, dans Create index pattern, renseignez la valeur logstash-* et cliquez sur le bouton Next step :
Dans l'étape 2/2, renseignez la valeur de @timestamp puis cliquez sur le bouton Create index pattern :
Cliquez sur le lien Discover dans le menu de Kibana. Sélectionnez logstash-* puis choisissez @timestamp dans Available fields et cliquez sur le bouton Add :
Appliquez un filtre en cliquant sur le champ kubernetes.pod_name :
Cliquez sur la loupe + en face de la ligne counter puis sur le bouton Add en face du nom du champs :
Copyright © 2024 Hugh Norris