-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Labels
Description
What would you like to be added?
Make spiderpool work on AKS with ipvlan as underlay network, similarly to
https://spidernet-io.github.io/spiderpool/v1.1/usage/install/cloud/get-started-alibaba
https://spidernet-io.github.io/spiderpool/v1.1/usage/install/cloud/get-started-aws/
Here are the test steps:
- Create AKS cluster with Azure CNI disabled:
RESOURCE_GROUP=cni-test
CLUSTER_NAME=cni-test
az aks create -l eastus2 \
--resource-group "${RESOURCE_GROUP}" \
--cluster-name "${CLUSTER_NAME}" \
--tier standard \
--kubernetes-version 1.34.0 \
--network-plugin none \
--disable-disk-driver \
--disable-file-driver \
--nodepool-name system \
--vm-set-type VirtualMachines \
--node-vm-size Standard_D8ds_v5 \
--node-count 3
az aks get-credentials --resource-group "${RESOURCE_GROUP}" \
--name "${CLUSTER_NAME}" \
--overwrite-existing- Install spiderpool
helm repo add spiderpool https://spidernet-io.github.io/spiderpool
helm repo update spiderpool
helm install spiderpool spiderpool/spiderpool --namespace default --create-namespace --set ipam.enableStatefulSet=false --set multus.multusCNI.defaultCniCRName="ipvlan-eth0"- Create SpiderMultusConfig
cat <<EOF | kubectl apply -f -
apiVersion: spiderpool.spidernet.io/v2beta1
kind: SpiderMultusConfig
metadata:
name: ipvlan-eth0
namespace: default
spec:
cniType: ipvlan
enableCoordinator: true
ipvlan:
master:
- eth0
EOF- Add secondary ip configuration on nic attached to VM:
- Add SpiderIPPool for node/VM
cat <<EOF | kubectl apply -f -
apiVersion: spiderpool.spidernet.io/v2beta1
kind: SpiderIPPool
metadata:
name: aks-system-27117018-vms22
spec:
subnet: 10.224.0.32/28
ips:
- 10.224.0.34-10.224.0.46
gateway: 10.224.0.33
default: true
nodeName: ["aks-system-27117018-vms22"]
multusName: ["default/ipvlan-eth0"]
EOF
- repeat step 4 and 5 for nodes
aks-system-27117018-vms21andaks-system-27117018-vms23
Why is this needed?
Currently ipam is not working as coredns and metrics-server are stuck in ContainerCreating
k get pod -n kube-system -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
cloud-node-manager-8vblw 1/1 Running 0 26h 10.224.0.6 aks-system-27117018-vms23 <none> <none>
cloud-node-manager-b8wft 1/1 Running 0 26h 10.224.0.5 aks-system-27117018-vms21 <none> <none>
cloud-node-manager-pkhhc 1/1 Running 0 26h 10.224.0.4 aks-system-27117018-vms22 <none> <none>
coredns-6d7b684fb5-n2h4h 0/1 ContainerCreating 0 26h <none> aks-system-27117018-vms21 <none> <none>
coredns-autoscaler-65bcdc4967-ckqs8 0/1 ContainerCreating 0 26h <none> aks-system-27117018-vms21 <none> <none>
konnectivity-agent-67998c6866-wdwxm 1/1 Running 0 26h 10.224.0.6 aks-system-27117018-vms23 <none> <none>
kube-proxy-6h8nz 1/1 Running 0 26h 10.224.0.5 aks-system-27117018-vms21 <none> <none>
kube-proxy-q8vd2 1/1 Running 0 26h 10.224.0.6 aks-system-27117018-vms23 <none> <none>
kube-proxy-qt52g 1/1 Running 0 26h 10.224.0.4 aks-system-27117018-vms22 <none> <none>
metrics-server-674b4b94b6-glmb2 0/2 ContainerCreating 0 26h <none> aks-system-27117018-vms21 <none> <none>
metrics-server-674b4b94b6-gsfvd 0/2 ContainerCreating 0 26h <none> aks-system-27117018-vms21 <none> <none>
k describe pod coredns-6d7b684fb5-g5n24 -n kube-system
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 20s default-scheduler Successfully assigned kube-system/coredns-6d7b684fb5-g5n24 to aks-system-27117018-vms22
Warning FailedCreatePodSandBox 20s kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "1760b66b09bf98198e68c022168bf63b212bbdeb1cc4e5efe62caf32642c4713": plugin type="multus" name="multus-cni-network" failed (add): [kube-system/coredns-6d7b684fb5-g5n24/184105dd-26ec-4011-bc92-3900d008a1e3:ipvlan-eth0]: error adding container to network "ipvlan-eth0": plugin type="coordinator" failed (add): failed to GetCoordinatorConfig: [GET /coordinator/config][500] getCoordinatorConfigFailure spidercoordinator: default no ready
Warning FailedCreatePodSandBox 19s kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "c3785590a8f4eda01f35f4dd41a98116fc0f547edf2e6413a7cf3f5d6d1a0735": plugin type="multus" name="multus-cni-network" failed (add): [kube-system/coredns-6d7b684fb5-g5n24/184105dd-26ec-4011-bc92-3900d008a1e3:ipvlan-eth0]: error adding container to network "ipvlan-eth0": plugin type="ipvlan" failed (add): failed to add IP addr {Interface:0xc0001b07a8 Address:{IP:10.224.0.35 Mask:fffffff0} Gateway:10.224.0.33} to "eth0": address already in use
Warning FailedCreatePodSandBox 18s kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "26504f5226c228b32b46420acfcf104275920d458342cffdf9022b09b48f6aa3": plugin type="multus" name="multus-cni-network" failed (add): [kube-system/coredns-6d7b684fb5-g5n24/184105dd-26ec-4011-bc92-3900d008a1e3:ipvlan-eth0]: error adding container to network "ipvlan-eth0": plugin type="coordinator" failed (add): failed to GetCoordinatorConfig: [GET /coordinator/config][500] getCoordinatorConfigFailure spidercoordinator: default no ready
Warning FailedCreatePodSandBox 17s kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "86d1d75b052acb7f6821bb0e711ddcf9e8616363d1f9c082f6be2381c6b99015": plugin type="multus" name="multus-cni-network" failed (add): [kube-system/coredns-6d7b684fb5-g5n24/184105dd-26ec-4011-bc92-3900d008a1e3:ipvlan-eth0]: error adding container to network "ipvlan-eth0": plugin type="ipvlan" failed (add): failed to add IP addr {Interface:0xc00009a798 Address:{IP:10.224.0.35 Mask:fffffff0} Gateway:10.224.0.33} to "eth0": address already in use
Warning FailedCreatePodSandBox 16s kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "7ca0aa6f1ddab00207a153e08e781b8a4e9def0fe85bcc23a9206bc2ce592459": plugin type="multus" name="multus-cni-network" failed (add): [kube-system/coredns-6d7b684fb5-g5n24/184105dd-26ec-4011-bc92-3900d008a1e3:ipvlan-eth0]: error adding container to network "ipvlan-eth0": plugin type="coordinator" failed (add): failed to GetCoordinatorConfig: [GET /coordinator/config][500] getCoordinatorConfigFailure spidercoordinator: default no ready
Warning FailedCreatePodSandBox 15s kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "a6d83a605ae58ae1a705438dc6ae3c7fd20cfd2c0b46f8310b83ebc47a5dd158": plugin type="multus" name="multus-cni-network" failed (add): [kube-system/coredns-6d7b684fb5-g5n24/184105dd-26ec-4011-bc92-3900d008a1e3:ipvlan-eth0]: error adding container to network "ipvlan-eth0": plugin type="coordinator" failed (add): failed to GetCoordinatorConfig: [GET /coordinator/config][500] getCoordinatorConfigFailure spidercoordinator: default no ready
Warning FailedCreatePodSandBox 14s kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "f5ac75b25f2ac9a338ca0e0a2374540288d695b04cf6bb45576716d02befdcd4": plugin type="multus" name="multus-cni-network" failed (add): [kube-system/coredns-6d7b684fb5-g5n24/184105dd-26ec-4011-bc92-3900d008a1e3:ipvlan-eth0]: error adding container to network "ipvlan-eth0": plugin type="ipvlan" failed (add): failed to add IP addr {Interface:0xc00009b688 Address:{IP:10.224.0.35 Mask:fffffff0} Gateway:10.224.0.33} to "eth0": address already in use
Warning FailedCreatePodSandBox 13s kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "dae197b9388da99646dc21a3dcdc4ec0cae55590285a00b728d209657874de72": plugin type="multus" name="multus-cni-network" failed (add): [kube-system/coredns-6d7b684fb5-g5n24/184105dd-26ec-4011-bc92-3900d008a1e3:ipvlan-eth0]: error adding container to network "ipvlan-eth0": plugin type="coordinator" failed (add): failed to GetCoordinatorConfig: [GET /coordinator/config][500] getCoordinatorConfigFailure spidercoordinator: default no ready
Warning FailedCreatePodSandBox 12s kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "d6b31e2ea3d2e3478a80912b77d08d24109d463cfae7680221c32edc3622ca5f": plugin type="multus" name="multus-cni-network" failed (add): [kube-system/coredns-6d7b684fb5-g5n24/184105dd-26ec-4011-bc92-3900d008a1e3:ipvlan-eth0]: error adding container to network "ipvlan-eth0": plugin type="ipvlan" failed (add): failed to add IP addr {Interface:0xc000192798 Address:{IP:10.224.0.35 Mask:fffffff0} Gateway:10.224.0.33} to "eth0": address already in use
Normal SandboxChanged 0s (x20 over 19s) kubelet Pod sandbox changed, it will be killed and re-created.
Warning FailedCreatePodSandBox 0s (x12 over 11s) kubelet (combined from similar events): Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "51f8efe045e24b950c9152eb783063b207f7ab123184c85d09fa03919163a17c": plugin type="multus" name="multus-cni-network" failed (add): [kube-system/coredns-6d7b684fb5-g5n24/184105dd-26ec-4011-bc92-3900d008a1e3:ipvlan-eth0]: error adding container to network "ipvlan-eth0": plugin type="coordinator" failed (add): failed to GetCoordinatorConfig: [GET /coordinator/config][500] getCoordinatorConfigFailure spidercoordinator: default no ready
k get spiderippool aks-system-27117018-vms22 -o yaml
apiVersion: spiderpool.spidernet.io/v2beta1
kind: SpiderIPPool
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"spiderpool.spidernet.io/v2beta1","kind":"SpiderIPPool","metadata":{"annotations":{},"name":"aks-system-27117018-vms22"},"spec":{"default":true,"gateway":"10.224.0.33","ips":["10.224.0.34-10.224.0.46"],"multusName":["kube-system/ipvlan-eth0"],"nodeName":["aks-system-27117018-vms22"],"subnet":"10.224.0.32/28"}}
creationTimestamp: "2025-11-30T18:13:34Z"
finalizers:
- spiderpool.spidernet.io
generation: 2
labels:
ipam.spidernet.io/ippool-cidr: 10-224-0-32-28
name: aks-system-27117018-vms22
resourceVersion: "455295"
uid: a983f0d2-5a33-4b4b-ab1b-86e84d8f958b
spec:
default: true
disable: false
gateway: 10.224.0.33
ipVersion: 4
ips:
- 10.224.0.34-10.224.0.46
multusName:
- default/ipvlan-eth0
nodeName:
- aks-system-27117018-vms22
subnet: 10.224.0.32/28
status:
allocatedIPCount: 2
allocatedIPs: '{"10.224.0.34":{"pod":"default/nginx-lb-76745b8c95-jpkkq","podUid":"84d777f1-22b1-4595-92dd-1c31d5a38c19"},"10.224.0.35":{"pod":"kube-system/coredns-6d7b684fb5-g5n24","podUid":"184105dd-26ec-4011-bc92-3900d008a1e3"}}'
totalIPCount: 13
How to implement it (if possible)?
spidernet controller/agent/cooridnator should setup node network configs to make pod-to-pod/ingress/egress work
Additional context
No response