hyperspike / valkey-operator

A Kubernetes Operator to deploy and manage Valkey Clusters
https://hyperspike.io
Apache License 2.0
56 stars 3 forks source link

error: resource mapping not found for name: "valkey-cluster" namespace: "mynamespace" from "valkey-cluster.yaml": no matches for kind "PodDisruptionBudget" in version "policy/v1beta1" #54

Open arpan57 opened 2 months ago

arpan57 commented 2 months ago

Hi,

On the K8S cluster I have installed valkey-operator:v0.0.11 in 'mynamespace'. The controller pod is up and running. Now I am trying to build a ValKey cluster using valkey-cluster.yaml with a little modification. In this file I made a couple of changes 1) Updated the namespace from 'default' to 'mynamespace'. 2) External mages referred from docker.io to internal ones.

Step followed

$ k apply -f valkey-cluster.yaml -n mynamespace

Output:

networkpolicy.networking.k8s.io/valkey-cluster created
serviceaccount/valkey-cluster created
secret/valkey-cluster created
configmap/valkey-cluster-default created
configmap/valkey-cluster-scripts created
service/valkey-cluster-headless created
service/valkey-cluster created
statefulset.apps/valkey-cluster created
error: resource mapping not found for name: "valkey-cluster" namespace: "mynamespace" from "valkey-cluster.yaml": no matches for kind "PodDisruptionBudget" in version "policy/v1beta1"
ensure CRDs are installed first

Output of pods

❯ k get pods -n mynamespace | grep -i valkey
valkey-cluster-0                                                  0/1     Pending                 0                   88m
valkey-cluster-1                                                  0/1     Pending                 0                   88m
valkey-cluster-2                                                  0/1     Pending                 0                   88m
valkey-operator-controller-manager-b448967dd-7vdxs                1/1     Running                 0                   23h

Output of describe

❯  k describe pod valkey-cluster-1
Events:
  Type     Reason            Age                   From               Message
  ----     ------            ----                  ----               -------
  Warning  FailedScheduling  9m13s (x17 over 89m)  default-scheduler  0/19 nodes are available: 19 pod has unbound immediate PersistentVolumeClaims. preemption: 0/19 nodes are available: 19 Preemption is not helpful for scheduling.

I wonder if

error: resource mapping not found for name: "valkey-cluster" namespace: "mynamespace" from "valkey-cluster.yaml": no matches for kind "PodDisruptionBudget" in version "policy/v1beta1"

is making the pods unschedulable?

dmolik commented 2 months ago

PDB is a red herring, it looks like the STS PVC needs to adjusted

dmolik commented 2 months ago

the valkey-cluster.yaml is an expanded helm chart used as reference during development of the operator.