标签:href pac deploy logs clust man beta tps select
接着上文,排除故障后,我重新配置了metallb组件到k8s环境。
metallb为k8s service 的loadbalance负载方式提供免费的解决方案。
external-ip的收费方案,可以选择GRE或Azure,或其他国内云商LB方案。
以下是详细安装和配置步骤:
root >> kubectl apply -f - << EOF apiVersion: v1 kind: ConfigMap metadata: namespace: metallb-system name: config data: config: | peers: # Cosmetic edit to make MetalLB notice that this is a new config. - my-asn: 64512 peer-asn: 64512 peer-address: 10.4.0.100 - my-asn: 64512 peer-asn: 64512 peer-address: 10.4.0.101 - my-asn: 64512 peer-asn: 64512 peer-address: 10.4.0.102 address-pools: - name: my-ip-space protocol: bgp avoid-buggy-ips: true addresses: - 10.5.0.0/24
# 执行完毕如下图
root >> kubectl apply -f - << EOF apiVersion: extensions/v1beta1 kind: Deployment metadata: name: nginx-lb namespace: app spec: selector: matchLabels: app: nginx-lb replicas: 1 template: metadata: labels: app: nginx-lb spec: containers: - name: nginx-lb image: nginx:1.7.9 ports: - containerPort: 80 --- apiVersion: v1 kind: Service metadata: name: nginx-lb namespace: app spec: type: LoadBalancer ports: - port: 8090 targetPort: 80 selector: app: nginx-lb
K8S LoadBalance 私有环境解决方案 == metallb 工具安装和使用介绍
标签:href pac deploy logs clust man beta tps select
原文地址:https://www.cnblogs.com/itshare/p/12096900.html