1

I'm using an openshift cluster to deploy my k8s operator. I deployed the operator manually not from the operator hub. I was able to deploy the operator successfully. But when I try to do a deployment through the operator it gives me the following error.

If I execute "kubectl logs command":

{"level":"info","ts":1585406191.404172,"logger":"cmd","msg":"Go Version: go1.13"}
{"level":"info","ts":1585406191.404281,"logger":"cmd","msg":"Go OS/Arch: linux/amd64"}
{"level":"info","ts":1585406191.4042957,"logger":"cmd","msg":"Version of operator-sdk: v0.7.0+git"}
{"level":"info","ts":1585406191.4049966,"logger":"leader","msg":"Trying to become the leader."}
{"level":"info","ts":1585406191.5270786,"logger":"leader","msg":"Found existing lock","LockOwner":"apim-operator-b6446674d-56zp2"}
{"level":"info","ts":1585406191.5332227,"logger":"leader","msg":"Not the leader. Waiting."}
{"level":"info","ts":1585406192.661973,"logger":"leader","msg":"Not the leader. Waiting."}

It looks like my pods never getting ready due to this lock, any solutions?

Mark Watney
  • 5,268
  • 2
  • 11
  • 33
uvindu sri
  • 264
  • 1
  • 4
  • 16
  • 1
    As it says, someone else has the leader election lock. Which election mode did you configure? Would be in the code that initializes your Manager object. – coderanger Mar 29 '20 at 03:57
  • 1
    `{"level":"info","ts":1585406191.5270786,"logger":"leader","msg":"Found existing lock","LockOwner":"apim-operator-b6446674d-56zp2"}` this is telling you that the pod `"apim-operator-b6446674d-56zp2"` owns the lock. check the logs of that pod – OregonTrail Mar 29 '20 at 05:30
  • I deleted the evicted pod. and it resolves the error, thank you :) – uvindu sri Mar 29 '20 at 07:49

0 Answers0