sealos icon indicating copy to clipboard operation
sealos copied to clipboard

How to specify pod cidr and service cidr?

Open wangzhilin90 opened this issue 3 years ago • 4 comments

Previous versions of sealos could specify pod and service networkcidr through sealos init -- podcidr -- servicecidr. But for sealos version 4.0, there is no option to specify these two network

the following is the SealOS command Usage: sealos run [flags]

Examples:

create cluster to your baremetal server, appoint the iplist: sealos run labring/kubernetes:v1.24.0 --masters 192.168.0.2,192.168.0.3,192.168.0.4
--nodes 192.168.0.5,192.168.0.6,192.168.0.7 --passwd xxx multi image: sealos run labring/kubernetes:v1.24.0 calico:v3.22.1
--masters 192.168.64.2,192.168.64.22,192.168.64.20 --nodes 192.168.64.21,192.168.64.19

wangzhilin90 avatar Sep 16 '22 10:09 wangzhilin90

https://www.sealos.io/docs/getting-started/customize-cluster

fanux avatar Sep 16 '22 12:09 fanux

https://www.sealos.io/docs/getting-started/customize-cluster

it's useful to specify pod network,but i want specify service network, is there any idea?thanks

wangzhilin90 avatar Sep 19 '22 02:09 wangzhilin90

maybe same method

networking:
  serviceSubnet: 10.96.0.0/12
  podSubnet: 192.168.0.0/16

weironz avatar Sep 19 '22 09:09 weironz

maybe same method

networking:
  serviceSubnet: 10.96.0.0/12
  podSubnet: 192.168.0.0/16

i have tried ,but not work

wangzhilin90 avatar Sep 20 '22 03:09 wangzhilin90

networking:
  serviceSubnet: "100.55.0.0/16"
  podSubnet: "55.55.0.0/16"
  dnsDomain: "cluster.local"
apiServer:
  certSANs:
    - "100.55.0.1"
  timeoutForControlPlane: 4m0s

I have tried like this,the Cluster cloud be created.when I tried to add --master,I got a message as followed. error execution phase control-plane-prepare/certs: error creating PKI assets: failed to write or validate certificate "apiserver": certificate apiserver is invalid: x509: certificate is valid for 127.0.0.1, 192.168.26.6, 192.168.26.4, 10.96.0.1, 10.103.97.2, 192.168.26.5, not 100.55.0.1

5codes avatar Oct 21 '22 08:10 5codes

Provide docs about how to add certSANs

fanux avatar Feb 12 '23 13:02 fanux

https://github.com/labring-actions/bug-verify/actions/runs/4161615545

cuisongliu avatar Feb 13 '23 09:02 cuisongliu

new version is fixed 4.1.5-rc1 test is ok.

cuisongliu avatar Feb 13 '23 09:02 cuisongliu