zookeeper-operator icon indicating copy to clipboard operation
zookeeper-operator copied to clipboard

ZooKeeper cluster not found when scaling up/down

Open alfonsomunozpomer opened this issue 2 years ago • 3 comments

I can create, describe or delete ZooKeeper clusters with the operator, but I can’t scale it because kubectl scale says that the resource is not found. Is there anything I’m missing?

Find below my simple cluster YAML and some example output. I’m running this on a GKE Autopilot cluster.

# foo.yaml
apiVersion: "zookeeper.pravega.io/v1beta1"
kind: "ZookeeperCluster"
metadata:
  name: "zookeeper"
spec:
  replicas: 1
$ kubectl create -f foo.yaml 
zookeepercluster.zookeeper.pravega.io/zookeeper created

$ kubectl get zookeepercluster
NAME        REPLICAS   READY REPLICAS   VERSION   DESIRED VERSION   INTERNAL ENDPOINT   EXTERNAL ENDPOINT   AGE
zookeeper   1                                     0.2.13            10.118.2.3:2181     N/A                 6s

$ kubectl scale --replicas=3 zookeepercluster zookeeper
Error from server (NotFound): zookeeperclusters.zookeeper.pravega.io "zookeeper" not found

$ kubectl delete zookeepercluster zookeeper
zookeepercluster.zookeeper.pravega.io "zookeeper" deleted

alfonsomunozpomer avatar Oct 21 '22 11:10 alfonsomunozpomer

You have to scale using kubectl edit zookeepercluster zookeeper and change the replicas

anishakj avatar Oct 21 '22 11:10 anishakj

Are there any plans to add support for kubectl scale?

alfonsomunozpomer avatar Oct 21 '22 16:10 alfonsomunozpomer

I’ve seen similar issues with rollout:

$ kubectl rollout restart zookeepercluster zookeeper
error: no kind "ZookeeperCluster" is registered for version "zookeeper.pravega.io/v1beta1" in scheme "pkg/scheme/scheme.go:28"

Whereas restarting the cluster as a sts works.

alfonsomunozpomer avatar Oct 21 '22 16:10 alfonsomunozpomer