Logo
Section 1 / 5

Helm 简介

学习如何使用 Helm 来管理 Kubernetes 资源。

导入

Helm 简介

学习如何使用 Helm 来管理 Kubernetes 资源。

1curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 2chmod 700 get_helm.sh 3./get_helm.sh

Helm 安装完成后输出

1Downloading https://get.helm.sh/helm-v3.9.4-linux-amd64.tar.gz 2Verifying checksum... Done. 3Preparing to install helm into /usr/local/bin 4helm installed into /usr/local/bin/helm
1# 进入包含 Helm Chart 的目录 2cd /usercode/infrastructure 3 4# 使用 Helm 安装 Chart 5helm install first-chart ./python-sample

helm install 命令的输出

1NAME: first-chart 2LAST DEPLOYED: Sat Sep 17 18:27:36 2022 3NAMESPACE: default 4STATUS: deployed 5REVISION: 1 6NOTES: 71. 获取应用 URL,请执行以下命令: 8 export NODE_PORT=$(kubectl get --namespace default -o jsonpath="{.spec.ports[0].nodePort}" services first-chart-python-sample) 9 export NODE_IP=$(kubectl get nodes --namespace default -o jsonpath="{.items[0].status.addresses[0].address}") 10 echo http://$NODE_IP:$NODE_PORT

向应用发送请求的命令

1export NODE_PORT=$(kubectl get --namespace default -o jsonpath="{.spec.ports[0].nodePort}" services first-chart-python-sample) 2export NODE_IP=$(kubectl get nodes --namespace default -o jsonpath="{.items[0].status.addresses[0].address}") 3curl http://$NODE_IP:$NODE_PORT

向应用发送请求的命令输出

1Hello, Educative Learner! This is version 1.0

No configuration found for ID: 008ac316e90f70b211c4866e82af3afab630aea38c86781e56fd3a24000396dd

基于 GitOps 的系统架构

使用 Helm 管理发布版本