https://rancher.com/ logo
Title
v

victorious-mouse-54341

02/21/2023, 9:51 PM
Alright. So modifying the server node IPs appears to have NOT actually worked. it changes the server IPs, but everything is broken. when I use this syntax:
k3d cluster create doctorconsul --network doctorconsul_wan \
    --api-port 127.0.0.1:6443 \
    -p "8502:443@loadbalancer" \
    --k3s-arg="--disable=traefik@server:0" \
    --k3s-arg="--node-ip=192.169.7.10@server:0" \
    --k3s-arg="-node-external-ip=192.169.7.10@server:0"
The only server node does correctly have these IPs
Addresses:                                                                                                                                                                                                                                                                ││   InternalIP:  192.169.7.10                                                                                                                                                                                                                                               ││   ExternalIP:  192.169.7.10                                                                                                                                                                                                                                               ││   Hostname:    k3d-doctorconsul-server-0
But coreDNS won't come up.
[INFO] plugin/ready: Still waiting on: "kubernetes"                                                                                                      
[WARNING] plugin/kubernetes: Kubernetes API connection failure: Get "<https://10.43.0.1:443/version>": dial tcp 10.43.0.1:443: connect: no route to host
^^^ These are just repeatedly spammed. Anyone know why? I'm way out of my kube league and I'm just trying to get K3d to accept a static IP instead of choosing the first avail dynamically. Thanks
w

wide-garage-9465

02/22/2023, 6:02 AM
192.169.7.x is the subnet of your external docker network? You'd need a way to specify the IP of the node containers that k3d spins up. There's currently no option in k3d to do so. Feel free to open a feature request though 👍
v

victorious-mouse-54341

02/22/2023, 3:39 PM
My docker network config looks like this:
networks:
  dc1:
    driver: bridge
    ipam:
     config:
       - subnet: 10.5.0.0/16
  dc2:
    driver: bridge
    ipam:
     config:
       - subnet: 10.6.0.0/16
  wan:
    driver: bridge
    ipam:
     config:
       - subnet: 192.169.7.0/24
         gateway: 192.169.7.1
Essentially, I want k3d to play on the WAN network, which is the ingress/egress network where I'm federating multiple consul clusters. For consistency reasons, I really want it statically assigned.