Kubernetes : Helm インストール2026/08/07 |
|
Helm をインストールすると、Kubernetes アプリケーションのイントール等々の管理が容易になります。 当例では以下のように 4 台のノードを使用して Kubernetes クラスターを構成しています。
+----------------------+ +----------------------+
| [ ctrl.srv.world ] | | [ dlp.srv.world ] |
| Manager Node | | Control Plane |
+-----------+----------+ +-----------+----------+
eth0|10.0.0.25 eth0|10.0.0.30
| |
------------+--------------------------+-----------
| |
eth0|10.0.0.51 eth0|10.0.0.52
+-----------+----------+ +-----------+----------+
| [ node01.srv.world ] | | [ node02.srv.world ] |
| Worker Node#1 | | Worker Node#2 |
+----------------------+ +----------------------+
|
| [1] | Helm をインストールします。 |
|
[root@ctrl ~]#
dnf -y install git
[root@ctrl ~]#
[root@ctrl ~]# curl -O https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
bash ./get-helm-3 Downloading https://get.helm.sh/helm-v3.21.3-linux-amd64.tar.gz Verifying checksum... Done. Preparing to install helm into /usr/local/bin helm installed into /usr/local/bin/helm[root@ctrl ~]# helm version version.BuildInfo{Version:"v3.21.3", GitCommit:"1ad6e68924fdf6fb0c7dcef8e9e1dfc0f36eaed6", GitTreeState:"clean", GoVersion:"go1.26.5"} |
| [2] | Helm の基本操作です。 |
|
# Helm Hub からキーワードが含まれるチャートを検索 [centos@ctrl ~]$ helm search hub wordpress URL CHART VERSION APP VERSION DESCRIPTION https://artifacthub.io/packages/helm/wordpress-... 1.0.3 7.0.2 WordPress is the world's most popular blogging ... https://artifacthub.io/packages/helm/slybase-wo... 5.4.8 7.0.1 Using the official WordPress image. This chart ... https://artifacthub.io/packages/helm/quench-wor... 0.0.9 7.0.2 Hardened WordPress CMS (PHP-FPM + nginx) on a 0... ..... ..... # リポジトリを追加 (下例は haproxytech リポジトリ) [centos@ctrl ~]$ helm repo add haproxytech https://haproxytech.github.io/helm-charts "haproxytech" has been added to your repositories # リポジトリ一覧 [centos@ctrl ~]$ helm repo list NAME URL haproxytech https://haproxytech.github.io/helm-charts # リポジトリからキーワードが含まれるチャートを検索 [centos@ctrl ~]$ helm search repo haproxy NAME CHART VERSION APP VERSION DESCRIPTION haproxytech/haproxy 1.29.0 3.3.10 A Helm chart for HAProxy on Kubernetes haproxytech/haproxy-unified-gateway 1.1.0 1.0.5 A Helm chart for HAProxy Unified Gateway - Kube... haproxytech/kubernetes-ingress 1.52.1 3.2.12 A Helm chart for HAProxy Kubernetes Ingress Con... # チャートの情報を表示 # helm show [all|chart|readme|values] [チャート名] [centos@ctrl ~]$ helm show chart haproxytech/haproxy
annotations:
artifacthub.io/category: networking
artifacthub.io/changes: |
- Update base image to HAProxy 3.3.10
artifacthub.io/images: |
- name: haproxy
image: docker.io/haproxytech/haproxy-alpine:3.3.6
artifacthub.io/license: Apache-2.0
artifacthub.io/links: |
- name: support
url: https://github.com/haproxytech/helm-charts/issues
apiVersion: v2
appVersion: 3.3.10
description: A Helm chart for HAProxy on Kubernetes
home: https://github.com/haproxytech/helm-charts/tree/main/haproxy
icon: https://raw.githubusercontent.com/haproxytech/helm-charts/main/haproxy/chart-icon.png
keywords:
- haproxy
kubeVersion: '>=1.17.0-0'
maintainers:
- email: dkorunic@haproxy.com
name: Dinko Korunic
name: haproxy
sources:
- http://www.haproxy.org/
type: application
version: 1.29.0
# チャートからアプリケーションをデプロイ # helm install [任意の名称] [チャート名] [centos@ctrl ~]$ helm install haproxy haproxytech/haproxy
NAME: haproxy
LAST DEPLOYED: Fri Aug 7 11:24:15 2026
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
HAProxy has been has been successfully installed. This Chart is used to run HAProxy as a regular application,
as opposed to HAProxy Ingress Controller Chart.
Controller image deployed is: "docker.io/haproxytech/haproxy-alpine:3.3.10".
Your HAProxy app is of a "Deployment" kind.
Service ports mapped are:
- name: http
containerPort: 80
protocol: TCP
- name: https
containerPort: 443
protocol: TCP
- name: stat
containerPort: 1024
protocol: TCP
To be able to bind to privileged ports as non-root, the following is required:
securityContext:
enabled: true
runAsUser: 1000
runAsGroup: 1000
initContainers:
- name: sysctl
image: "busybox:musl"
command:
- /bin/sh
- -c
- sysctl -w net.ipv4.ip_unprivileged_port_start=0
securityContext:
privileged: true
Node IP can be found with:
$ kubectl --namespace default get nodes -o jsonpath="{.items[0].status.addresses[1].address}"
For more examples and up to date documentation, please visit:
* Helm chart documentation: https://github.com/haproxytech/helm-charts/tree/main/haproxy
* HAProxy Alpine Docker container documentation: https://github.com/haproxytech/haproxy-docker-alpine
* HAProxy documentation: https://www.haproxy.org/download/2.7/doc/configuration.txt
# デプロイ済みアプリケーションの一覧 [centos@ctrl ~]$ helm list NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION haproxy default 1 2026-08-07 11:24:15.974396886 +0900 JST deployed haproxy-1.29.0 3.3.10 # デプロイ済みアプリケーションのステータスを表示 [centos@ctrl ~]$ helm status haproxy NAME: haproxy LAST DEPLOYED: Fri Aug 7 11:24:15 2026 NAMESPACE: default STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: HAProxy has been has been successfully installed. This Chart is used to run HAProxy as a regular application, as opposed to HAProxy Ingress Controller Chart. Controller image deployed is: "docker.io/haproxytech/haproxy-alpine:3.3.10". Your HAProxy app is of a "Deployment" kind. ..... .....[centos@ctrl ~]$ kubectl get pods NAME READY STATUS RESTARTS AGE haproxy-78d847cd67-c5j62 1/1 Running 0 89s # デプロイ済みアプリケーションをアンインストール [centos@ctrl ~]$ helm uninstall haproxy release "haproxy" uninstalled |
| Sponsored Link |
|
|