2

I am trying to create a kubernetes cluster on my local machine. I created 3 vm's (two master and a slave).
I am using kubespray(v2.15.0) to create my cluster, But my kube-apiserver contianer keeps crashing with following error:

2021-03-03T10:33:06.41276414Z stderr F F0303 10:33:06.408597       1 sample_and_watermark.go:182] Time went backwards from 2021-03-03T10:33:06.408588954Z to 2021-03-03T10:33:06.408562115Z for labelValues=[]string{"executing", "readOnly"}

Can someone please help me diagnose this issue.

Here are the list of versions:

  • Vagrant : 2.2.14
  • Ubuntu : 18.04.5 LTS
  • Kubespray : 2.15.0
  • kubernetes : 1.19.7
  • 1
    Can you try to install latest version of Kubernetes 1.20.4? Make sure you have choose proper network plugin - Vagrant uses flannel. Check if all requirements are met - https://github.com/kubernetes-sigs/kubespray#requirements https://github.com/kubernetes-sigs/kubespray/blob/master/docs/vagrant.md – Malgorzata Mar 03 '21 at 14:32
  • Hi Vishak, welcome to S.F. [The issue](https://github.com/kubernetes/kubernetes/issues/96459) doesn't mention it, but that behavior _(which is happening to your kernel, and k8s is just the victim)_ is almost certainly caused by extremely high load on your host OS, screwing up the virtualization's clock. I see the fix was pulled into _some_ release of 1.19 but the changelog doesn't cite it, so ideally you'd heed Malgorzata's advice and use a modern version. Good luck! – mdaniel Mar 03 '21 at 17:04
  • @VishakVinod Did you manage solve problem using our tips ? – Malgorzata Mar 10 '21 at 15:28
  • Sorry I didnt get time to run it with 1.20.4. I will try it soon and let u knw about the result – Vishak Vinod Mar 12 '21 at 13:32
  • @Malgorzata thanks for the advice.. it worked.. I changed the version to 1.20.4 and it worked.. kubespray latest version(2.15.0) officially dosent upport 1.20.4 so had to do some manual changes to get it working – Vishak Vinod Mar 13 '21 at 10:37

1 Answers1

1

As solution install newest version of Kubernetes - 1.20.4. Kubespray version officially support - Kubernetes v1.19.7 so small changes should be done before applying to adjust to Kubernetes version 1.20.4.

Read: kubernetes, kubespray.

Malgorzata
  • 358
  • 1
  • 5