labring / sealos

Sealos is a production-ready Kubernetes distribution. You can run any Docker image on sealos, start high availability databases like mysql/pgsql/redis/mongo, develop applications using any Programming language.
https://cloud.sealos.io
Apache License 2.0
13.98k stars 2.08k forks source link

Use the environment variable serviceSubnet, podSubnet cannot take effect #4387

Closed xrjk closed 10 months ago

xrjk commented 10 months ago

Sealos Version

4.3.7

How to reproduce the bug?

sealos run -e serviceSubnet=172.16.0.0/16 -e podSubnet=192.168.0.0/16 docker.io/labring/kubernetes-docker:v1.24.17-4.3.7 --masters 10.1.1.1,10.1.1.2,10.1.1.3 --nodes 10.1,1,4,10.1.1.5,10.1.1.6

What is the expected behavior?

No response

What do you see instead?

No response

Operating environment

- Sealos version:
- Docker version:
- Kubernetes version:
- Operating system:
- Runtime environment:
- Cluster size:
- Additional information:

Additional information

No response

xrjk commented 10 months ago

apiVersion: v1 data: ClusterConfiguration: | apiServer: certSANs:

xrjk commented 10 months ago

apiVersion: apps.sealos.io/v1beta1 kind: Cluster metadata: creationTimestamp: "2023-12-07T02:42:48Z" name: default spec: hosts:

bxy4543 commented 10 months ago

serviceSubnet,podSubnet并不是通过环境变量来设置的,你需要通过Clusterfile来修改改字段,和部署集群

sealos-ci-robot commented 10 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


serviceSubnet and podSubnet are not set through environment variables. You need to modify the fields through Clusterfile and deploy the cluster.

xrjk commented 10 months ago

clusterfile 里的podSubnet: 192.168.0.0/24 serviceSubnet: 172.16.0.0/16 已经改了的呀,我用上面文件 sealos apply -f Clusterfile 问题依旧

sealos-ci-robot commented 10 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


podSubnet in clusterfile: 192.168.0.0/24 serviceSubnet: 172.16.0.0/16 has been changed. I used the above file sealos apply -f Clusterfile and the problem remains.

bxy4543 commented 10 months ago

你是安装好之后在apply的吗?

sealos-ci-robot commented 10 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Did you apply it after installing it?

bxy4543 commented 10 months ago

step1: sealos gen --masters xxx --nodes xxx docker.io/labring/kubernetes-docker:v1.24.17-4.3.7 -o Clusterfile step2: 找到Clusterfile中的podSubnet,serviceSubnet并修改 step3: sealos apply -f Clusterfile

sealos-ci-robot commented 10 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


step1: sealos gen --masters xxx --nodes xxx docker.io/labring/kubernetes-docker:v1.24.17-4.3.7 -o Clusterfile step2: Find podSubnet and serviceSubnet in Clusterfile and modify them step3: sealos apply -f Clusterfile

cuisongliu commented 10 months ago

你的用法不对。在安装集群之前修改,不支持安装后修改。

sealos-ci-robot commented 10 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Your usage is wrong. Modify before installing the cluster. Modification after installation is not supported.