projectcalico / calico

Cloud native networking and network security
https://docs.tigera.io/calico/latest/about/
Apache License 2.0
5.91k stars 1.32k forks source link

calico installation error with svc unreachable #8038

Closed xfyan0408 closed 1 year ago

xfyan0408 commented 1 year ago

I want to set a basic IPv6 K8s cluster with calico, it it had some bugs. I config a network card ipv6 address as follows, I do not config the dns address, because it is a server that do not connect to the internet.

   enp8s0f0:
      dhcp4: false
      dhcp6: false
      addresses: [3001:1::205/64]

and I start a k8s cluster with the configuration:

NIC address: 3001:1::205/64
pod-cidr: 3002:1::/64
serviceSubnet: 3003:1::/112

Expected Behavior

install calico correctly

Current Behavior

image image

Possible Solution

I do not know how to fix the error, I just configured a nic ipv6 address as 3001:1::205/64, I think the server does not have route table for svc 3003:1::1. I do not know how solve this

2023-09-20 14:20:33.213 [ERROR][1] cni-installer/<nil> <nil>: Unable to create token for CNI kubeconfig error=Post "https://[3003:1::1]:443/api/v1/namespaces/kube-system/serviceaccounts/calico-cni-plugin/token": dial tcp [3003:1::1]:443: connect: network is unreachable

Steps to Reproduce (for bugs)

  1. kubeadm init -- config kube-init.yaml
  2. kubectl apply -f calico.yaml

Context

I want to set a basic IPv6 K8s cluster with calico, it it had some bugs.

Your Environment

Thanks a lot!

xfyan0408 commented 1 year ago

The reason is that the cluster may fail to connect svc address in single IPv6 stack mode. I changed cluster to IPv4/v6 dual stack, the problem was sovled