kubernetes: Unable to sync kubernetes service: Post https://[::1]:6443

What happened:

I used k8s cluster without problems but after reboot the node, I cannot do any actions(create, delete, rollout) except get and list.

I can see such errors in api-server logs.

E0220 12:59:16.933815       1 reflector.go:178] k8s.io/client-go/informers/factory.go:135: Failed to list *v1.ResourceQuota: Get https://[::1]:6443/api/v1/resourcequotas?resourceVersin=2727847: dial tcp [::1]:6443: connect: cannot assign requested address
E0220 12:59:19.584540       1 reflector.go:178] k8s.io/client-go/informers/factory.go:135: Failed to list *v1.PersistentVolume: Get https://[::1]:6443/api/v1/persistentvolumes?resourcVersion=2730108: dial tcp [::1]:6443: connect: cannot assign requested address
E0220 12:59:20.862950       1 reflector.go:178] k8s.io/client-go/informers/factory.go:135: Failed to list *v1.StorageClass: Get https://[::1]:6443/apis/storage.k8s.io/v1/storageclasse?resourceVersion=2727847: dial tcp [::1]:6443: connect: cannot assign requested address
E0220 12:59:23.528011       1 controller.go:223] unable to sync kubernetes service: Post https://[::1]:6443/api/v1/namespaces: dial tcp [::1]:6443: connect: cannot assign requested adress
E0220 12:59:23.791957       1 reflector.go:178] k8s.io/client-go/informers/factory.go:135: Failed to list *v1.Pod: Get https://[::1]:6443/api/v1/pods?resourceVersion=3793709: dial tcp[::1]:6443: connect: cannot assign requested address
E0220 12:59:24.718812       1 status.go:71] apiserver received an error that is not an metav1.Status: &url.Error{Op:"Get", URL:"https://[::1]:6443/api/v1/namespaces/test/resourceuotas", Err:(*net.OpError)(0xc002ff5f40)}
I0220 13:56:41.532831       1 event.go:278] Event(v1.ObjectReference{Kind:"Deployment", Namespace:"kubernetes-dashboard", Name:"kubernetes-dashboard", UID:"1f60ae9c-0014-48e4-8ff7-bee30f0a2cae", APIVersion:"apps/v1", ResourceVersion:"3849690", FieldPath:""}): type: 'Warning' reason: 'ReplicaSetCreateError' Failed to create new replica set "kubernetes-dashboard-69fff65949": Get https://[::1]:6443/api/v1/namespaces/kubernetes-dashboard/resourcequotas: dial tcp [::1]:6443: connect: cannot assign requested address

Anything else we need to know?:

Why does api server consume ipv6 [::1] even though I didn’t use that?

Environment:

  • Kubernetes version
client: v1.20.2
server: v1.18.15
  • Cloud provider or hardware configuration:
Local baremetal server
  • OS
NAME="Ubuntu"
VERSION="18.04.1 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
  • Kernel
Linux poweredge-r730 4.15.0-135-generic #139-Ubuntu SMP Mon Jan 18 17:38:24 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools: I installed k8s cluster using kubeadm.
  • Network plugin and version Using Calico v3.10.4

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (12 by maintainers)

Most upvoted comments

Check also what the DN “localhost” resolves to. It should be the ipv4 address 127.0.0.1.

My idea is that the dial has a ipv4 source and tries to connect to the ipv6 localhost.