K8S MetalLB裸金属安装
设置ipvskubectl edit configmap -n kube-system kube-proxy如下apiVersion: kubeproxy.config.k8s.io/v1alpha1kind: KubeProxyConfigurationmode: "ipvs"ipvs:strictARP: true添加到kubeadm-config中kubectl get configmap
·
设置ipvs
kubectl edit configmap -n kube-system kube-proxy
如下
apiVersion: kubeproxy.config.k8s.io/v1alpha1
kind: KubeProxyConfiguration
mode: "ipvs"
ipvs:
strictARP: true
添加到kubeadm-config中
kubectl get configmap kube-proxy -n kube-system -o yaml | \
sed -e "s/strictARP: false/strictARP: true/" | \
kubectl diff -f - -n kube-system
# actually apply the changes, returns nonzero returncode on errors only
kubectl get configmap kube-proxy -n kube-system -o yaml | \
sed -e "s/strictARP: false/strictARP: true/" | \
kubectl apply -f - -n kube-system
开始安装
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.9.5/manifests/namespace.yaml
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.9.5/manifests/metallb.yaml
# On first install only
kubectl create secret generic -n metallb-system memberlist --from-literal=secretkey="$(openssl rand -base64 128)"
[root@k8s-60 MetalLB]# kubectl get pods -n metallb-system
NAME READY STATUS RESTARTS AGE
controller-65db86ddc6-bj6q9 1/1 Running 0 75s
speaker-9dlgc 1/1 Running 0 75s
speaker-qj2zw 1/1 Running 0 75s
speaker-x46vj 1/1 Running 0 75s
官方参考链接
https://metallb.universe.tf/installation/
更多推荐
已为社区贡献82条内容
所有评论(0)