在虚机上安装PorterLB
1.PorterLB
https://github.com/kubesphere/porter
2,先要修改 kube-proxy
kubectl edit configmap -n kube-system kube-proxy
这里 strictARP: true
ipvs:
excludeCIDRs: null
minSyncPeriod: 0s
scheduler: ""
strictARP: true
syncPeriod: 30s
kind: KubeProxyConfiguration
我当时环境是是 canal 的cni(rancher 装的),找不到 这个,没关 这个
3, 我的环境是 rancher
rancher :10.10.10.104
[root@node131 ~]# kubectl get nodes
NAME STATUS ROLES AGE VERSION
node131 Ready controlplane,etcd,worker 20h v1.19.4
node132 Ready worker 20h v1.19.4
[root@node131 ~]#
4, 部署试验过程
4.1 部署
kubectl apply -f https://raw.githubusercontent.com/kubesphere/porter/master/deploy/porter.yaml
遇到问题
[root@node132 ~]# kubectl get pod -A
NAMESPACE NAME READY STATUS RESTARTS AGE
cattle-system cattle-cluster-agent-55c6869d78-fgj66 1/1 Running 1 20h
cattle-system cattle-node-agent-2nqbd 1/1 Running 0 20h
cattle-system cattle-node-agent-gf924 1/1 Running 0 20h
cattle-system kube-api-auth-7fd72 1/1 Running 0 20h
。。。。。。
porter-system porter-admission-create-jkb6v 0/1 Completed 0 75m
porter-system porter-admission-patch-vswbm 0/1 Completed 0 75m
porter-system porter-manager-767f557fbb-ttpd9 0/1 Pending 0 75m
Describe了一下,说是 因为 没有可用的端口 不能调度,
找了一下 RKE 上 缺省部署了 nginx ingress controller,导出yaml后 delete 了 daemonset yaml
再部署PorterLB后 成功
保存的 nginx-ingress-controller.yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
annotations:
deprecated.daemonset.template.generation: "1"
field.cattle.io/publicEndpoints: '[{"nodeName":"c-cggxv:m-076aa8983113","addresses":["10.10.10.131"],"port":80,"protocol":"TCP","podName":"ingress-nginx:nginx-ingress-controller-nq2gd","allNodes":false},{"nodeName":"c-cggxv:m-076aa89