Helm版
https://github.com/bitnami/charts/tree/master/bitnami/metallb/
https://metallb.universe.tf/configuration/
https://note.classact.co.jp/user/honma-h/%E3%83%A1%E3%83%A2/2020/05/10/Kubernetes%E3%81%A7MetalLB%EF%BC%88LoadBalancer%EF%BC%89%E3%82%92%E6%A7%8B%E7%AF%89
https://metallb.universe.tf/installation/
bitnamiのリポジトリ追加
root@k8s-01:~# helm repo add bitnami https://charts.bitnami.com/bitnami "bitnami" has been added to your repositories root@k8s-01:~# helm repo list NAME URL bitnami https://charts.bitnami.com/bitnami
bitnamiで利用できるチャートの確認
出力が長い為、一部抜粋しています。
root@k8s-01:~# helm search repo bitnami
NAME CHART VERSION APP VERSION DESCRIPTION
bitnami/magento 19.0.9 2.4.3 A feature-rich flexible e-commerce solution. It...
bitnami/mariadb 9.8.1 10.5.13 Fast, reliable, scalable, and easy to use open-...
bitnami/mariadb-cluster 1.0.2 10.2.14 DEPRECATED Chart to create a Highly available M...
bitnami/mariadb-galera 6.0.3 10.6.4 MariaDB Galera is a multi-master database clust...
bitnami/mean 6.1.2 4.6.2 DEPRECATED MEAN is a free and open-source JavaS...
bitnami/mediawiki 12.3.17 1.36.2 Extremely powerful, scalable software and a fea...
bitnami/memcached 5.15.8 1.6.12 Chart for Memcached
bitnami/metallb 2.5.10 0.11.0 The Metal LB for Kubernetes
bitnami/metrics-server 5.10.8 0.5.1 Metrics Server is a cluster-wide aggregator of ...
bitnami/minio 9.0.7 2021.11.9 Bitnami Object Storage based on MinIO® is a...
bitnami/mongodb 10.29.2 4.4.10 NoSQL document-oriented database that stores JS...
bitnami/mongodb-sharded 3.9.14 4.4.10 NoSQL document-oriented database that stores JS...
bitnami/moodle 11.1.6 3.11.4 Moodle™ is a learning platform designed t...
bitnami/mxnet 2.3.20 1.8.0 A flexible and efficient library for deep learning
bitnami/mysql 8.8.12 8.0.27 Chart to create a Highly available MySQL cluster
bitnami/metallbのデフォルト値を確認
出力が長い為、省略します。
root@k8s-01:~# helm show values bitnami/metallb
bitnami/metallbのChart取得
bitnami/metallbのChartを取得します。–untarは.tgzを展開した状態でカレントディレクトリ(今回は/root)にダウンロードします。今回は特に使用しません。
root@k8s-01:~# helm pull bitnami/metallb --untar
Layer 2 Configurationの設定
今回はLayer2モードを使用します。アドレスは各ノードと同じネットワークの範囲でレンジを指定します。
root@k8s-01:~# vim /root/metallb-config.yaml
apiVersion: v1
kind: ConfigMap
metadata:
namespace: metallb-system
name: config
data:
config: |
address-pools:
- name: default
protocol: layer2
addresses:
- 192.168.68.50-192.168.68.59
Namespaceの追加
metallb用のNamespaceを追加します。
root@k8s-01:~# kubectl create namespace metallb-system namespace/metallb-system created root@k8s-01:~# kubectl get namespace NAME STATUS AGE default Active 16d kube-node-lease Active 16d kube-public Active 16d kube-system Active 16d metallb-system Active 24s
bitnami/metallbのHelm Chartをインストール
root@k8s-01:~# helm install metallb bitnami/metallb -f /root/metallb-config.yaml
NAME: metallb
LAST DEPLOYED: Thu Nov 11 16:40:28 2021
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
CHART NAME: metallb
CHART VERSION: 2.5.10
APP VERSION: 0.11.0
** Please be patient while the chart is being deployed **
MetalLB is now running in the cluster
LoadBalancer Services in your cluster are now available on the IPs you
defined in MetalLB's configuration. To see IP assignments,
kubectl get services -o wide --all-namespaces | grep --color=never -E 'LoadBalancer|NAMESPACE'
should be executed.
To see the currently configured configuration for metallb run
kubectl get configmaps --namespace default metallb-config -o yaml
in your preferred shell.
root@k8s-01:~# helm uninstall metallb
Kubernetes MetalLB導入 Helm版