创建部署问题时,请参考下面模板,你提供的信息越多,越容易及时获得解答。如果未按模板创建问题,管理员有权关闭问题。
确保帖子格式清晰易读,用 markdown code block 语法格式化代码块。
你只花一分钟创建的问题,不能指望别人花上半个小时给你解答。
操作系统信息
虚拟机,Centos7.9,4C/8G
Kubernetes版本信息
将 kubectl version
命令执行结果贴在下方
[root@k8snode001 ~]# kubectl version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short. Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.3", GitCommit:"aef86a93758dc3cb2c658dd9657ab4ad4afc21cb", GitTreeState:"clean", BuildDate:"2022-07-13T14:30:46Z", GoVersion:"go1.18.3", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.4
Server Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.3", GitCommit:"aef86a93758dc3cb2c658dd9657ab4ad4afc21cb", GitTreeState:"clean", BuildDate:"2022-07-13T14:23:26Z", GoVersion:"go1.18.3", Compiler:"gc", Platform:"linux/amd64"}
容器运行时
将 docker version
/ crictl version
/ nerdctl version
结果贴在下方
[root@k8snode001 ~]# containerd -v
containerd github.com/containerd/containerd v1.6.6 10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1
[root@k8snode001 ~]# crictl version
Version: 0.1.0
RuntimeName: containerd
RuntimeVersion: v1.6.6
RuntimeApiVersion: v1
[root@k8snode001 ~]# nerdctl version
Client:
Version: v0.20.0
OS/Arch: linux/amd64
Git commit: e77e05b5fd252274e3727e0439e9a2d45622ccb9
Server:
containerd:
Version: v1.6.6
GitCommit: 10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1
[root@k8snode001 ~]#
KubeSphere版本信息
v3.3.0。离线安装。在已有K8s上安装。
问题是什么
已安装openelb,并将其启用为项目网关。但是,当新的services通过kubesphere启用loadbalancer时,如果不加注解,是不能自动获得eip的。如何将openelb设置为kubesphere的缺省负载均衡,且能自动加注解获得eip呢?


[root@k8snode001 ~]# kubectl get svc -n demo
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
nginx01-svc LoadBalancer 10.233.157.6 <pending> 80:30613/TCP 160d
svc-mysql-01 LoadBalancer 10.233.2.223 10.30.41.203 3306:32113/TCP 12d