kubernetes: Unable to remove old endpoints from kubernetes service: StorageError
os : Ubuntu 16.04.2 LTS
uname: Linux node01 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
docker: 1.13.1
kubeadm: v1.14.0 on katacoda.com
the kube-apiserver’s log print this
controller.go:148] Unable to remove old endpoints from kubernetes service: StorageError: key not found, Code: 1, Key: /registry/masterleases/172.16.1.6, ResourceVersion: 0, AdditionalErrorMsg:
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 23
- Comments: 69 (24 by maintainers)
Your cluster was not clean before you installing kubernetes cluster, you should deployed kubernetes on your env before. Clean you ENV, and re-deploy again could resolve this issue.
Small probability is caused by ipv6 try this
If not works, could try this:
It is incredible that this problem has existed for more than 2 years and has not been solved. I encountered this error when deploying k8s using binary files, I tried v1.18 - v1.21, and I checked all the search results on google. Unfortunately, it took me 3 days to still not be able to solve this problem.
hmm the error is just informative, it happens for a new installation, it doesn’t exist, throws the error and later the lease is added
this error in the log is a red herring, most of the cases reported are related to deployment issues, wrong IP family, KIND cluster restarts, …
I’m going to close this to avoid converting this issue in a magnet, TL;DR
Unable to remove old endpoints from kubernetes service:is not a problem, if apiserver doesn’t start check further in the logs, the reason has to be there /closenot sure whats causing this. I had virtualbox VMs (3) on windows 10 amd64. and this issue happened after restarts, spent days to figure things out, including trying to set kubernetes up in different distros of linux.
then i switched to vmware player, no issue so far. Again, my scenario is arbitrary, if anyone has the same setup as me, probably give vmware a try.
та же проблема
The issue in my case was k8s api-server was using ipv6 address ([::1]) which was not working. I disabled ipv6 and it fixed the issue for me