Kubernetes : Helm स्थापित करें2023/09/04 |
Helm इंस्टॉल करें जो Kubernetes अनुप्रयोगों को प्रबंधित करने में मदद करता है।
यह उदाहरण निम्न प्रकार से पर्यावरण पर आधारित है।
-----------+---------------------------+--------------------------+------------ | | | eth0|10.0.0.25 eth0|10.0.0.71 eth0|10.0.0.72 +----------+-----------+ +-----------+-----------+ +-----------+-----------+ | [ ctrl.srv.world ] | | [snode01.srv.world] | | [snode02.srv.world] | | Control Plane | | Worker Node | | Worker Node | +----------------------+ +-----------------------+ +-----------------------+ |
[1] | Helm स्थापित करें। |
root@ctrl:~#
curl -O https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
root@ctrl:~#
root@ctrl:~# bash ./get-helm-3 Downloading https://get.helm.sh/helm-v3.10.1-linux-amd64.tar.gz Verifying checksum... Done. Preparing to install helm into /usr/local/bin helm installed into /usr/local/bin/helm helm version version.BuildInfo{Version:"v3.10.1", GitCommit:"9f88ccb6aee40b9a0535fcc7efea6055e1ef72c9", GitTreeState:"clean", GoVersion:"go1.18.7"} |
[2] | Helm का मूल उपयोग। |
# Helm हब में शब्दों के आधार पर चार्ट खोजें root@ctrl:~# 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/shubham-wo... 0.1.0 1.16.0 A Helm chart for Kubernetes https://artifacthub.io/packages/helm/bitnami/wo... 15.2.10 6.1.0 WordPress is the world's most popular blogging ... ..... ..... # भंडार जोड़ें # नीचे दिया गया उदाहरण आधिकारिक Helm स्टेबल रिपॉजिटरी है root@ctrl:~# helm repo add stable https://charts.helm.sh/stable "stable" has been added to your repositories root@ctrl:~# helm repo add bitnami https://charts.bitnami.com/bitnami "bitnami" has been added to your repositories # जोड़े गए रिपॉजिटरी प्रदर्शित करें root@ctrl:~# helm repo list NAME URL stable https://charts.helm.sh/stable bitnami https://charts.bitnami.com/bitnami # भंडार में शब्दों द्वारा चार्ट खोजें root@ctrl:~# helm search repo stable NAME CHART VERSION APP VERSION DESCRIPTION stable/acs-engine-autoscaler 2.2.2 2.1.1 DEPRECATED Scales worker nodes within agent pools stable/aerospike 0.3.5 v4.5.0.5 DEPRECATED A Helm chart for Aerospike in Kubern... stable/airflow 7.13.3 1.10.12 DEPRECATED - please use: https://github.com/air... stable/ambassador 5.3.2 0.86.1 DEPRECATED A Helm chart for Datawire Ambassador stable/anchore-engine 1.7.0 0.7.3 Anchore container analysis and policy evaluatio... stable/apm-server 2.1.7 7.0.0 DEPRECATED The server receives data from the El... ..... ..... # चार्ट का विवरण प्रदर्शित करें # helm show [all|chart|readme|values] [chart name] root@ctrl:~# helm show chart bitnami/wordpress annotations: category: CMS apiVersion: v2 appVersion: 6.1.0 dependencies: - condition: memcached.enabled name: memcached repository: https://charts.bitnami.com/bitnami version: 6.x.x - condition: mariadb.enabled name: mariadb repository: https://charts.bitnami.com/bitnami version: 11.x.x - name: common repository: https://charts.bitnami.com/bitnami tags: - bitnami-common version: 2.x.x description: WordPress is the world's most popular blogging and content management platform. Powerful yet simple, everyone from students to global corporations use it to build beautiful, functional websites. home: https://github.com/bitnami/charts/tree/main/bitnami/wordpress icon: https://bitnami.com/assets/stacks/wordpress/img/wordpress-stack-220x234.png keywords: - application - blog - cms - http - php - web - wordpress maintainers: - name: Bitnami url: https://github.com/bitnami/charts name: wordpress sources: - https://github.com/bitnami/containers/tree/main/bitnami/wordpress - https://wordpress.org/ version: 15.2.10 # निर्दिष्ट चार्ट द्वारा एप्लिकेशन को तैनात करें # helm install [any name] [chart name] root@ctrl:~# helm install wordpress bitnami/wordpress NAME: wordpress LAST DEPLOYED: Thu Nov 3 05:27:16 2022 NAMESPACE: default STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: CHART NAME: wordpress CHART VERSION: 15.2.10 APP VERSION: 6.1.0 ** Please be patient while the chart is being deployed ** Your WordPress site can be accessed through the following DNS name from within your cluster: wordpress.default.svc.cluster.local (port 80) To access your WordPress site from outside the cluster follow the steps below: 1. Get the WordPress URL by running these commands: NOTE: It may take a few minutes for the LoadBalancer IP to be available. Watch the status with: 'kubectl get svc --namespace default -w wordpress' export SERVICE_IP=$(kubectl get svc --namespace default wordpress --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 default wordpress -o jsonpath="{.data.wordpress-password}" | base64 -d) # तैनात एप्लिकेशन प्रदर्शित करें root@ctrl:~# helm list NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION wordpress default 1 2022-11-03 05:27:16.505435499 +0000 UTC deployed wordpress-15.2.10 6.1.0 # तैनात एप्लिकेशन की स्थिति प्रदर्शित करें root@ctrl:~# helm status wordpress NAME: wordpress LAST DEPLOYED: Thu Nov 3 05:27:16 2022 NAMESPACE: default STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: CHART NAME: wordpress CHART VERSION: 15.2.10 APP VERSION: 6.1.0 ..... ..... # तैनात एप्लिकेशन को अनइंस्टॉल करें root@ctrl:~# helm uninstall wordpress release "registry" uninstalled |
Sponsored Link |