I am trying to set up Kubernetes vertical scaling for pxd cluster. Following this blog. After setting up everything, my pods are starting, VPA is running. After waiting for about 10mins it does not providing any of recomendations. When using kubectl describe vpa
I receive following status:
Status:
Conditions:
Last Transition Time: 2022-02-03T14:37:23Z
Message: The targetRef controller has a parent but it should point to a topmost well-known or scalable controller
Status: True
Type: ConfigUnsupported
Last Transition Time: 2022-02-03T14:37:23Z
Message: No pods match this VPA object
Reason: NoPodsMatched
Status: True
Type: NoPodsMatched
Last Transition Time: 2022-02-03T14:37:23Z
Message: No pods match this VPA object
Reason: NoPodsMatched
Status: False
Type: RecommendationProvided
Recommendation:
Events: <none>
I am using following configuration to define my cluster and VPA:
apiVersion: pxc.percona.com/v1-11-0
kind: PerconaXtraDBCluster
metadata:
name: mysql-cluster
spec:
crVersion: 1.11.0
secretsName: mysql-cluster-secrets
allowUnsafeConfigurations: true
upgradeOptions:
apply: 8.0-recommended
schedule: '0 4 * * *'
pxc:
size: 2
image: percona/percona-xtradb-cluster:8.0.23-14.1
autoRecovery: true
affinity:
antiAffinityTopologyKey: 'kubernetes.io/hostname'
podDisruptionBudget:
maxUnavailable: 1
gracePeriod: 30
resources:
requests:
memory: 128Mi
cpu: 200m
limits:
memory: 256Mi
cpu: 400m
volumeSpec:
persistentVolumeClaim:
accessModes: ['ReadWriteOnce']
resources:
requests:
storage: 10G
storageClassName: hcloud-volumes
haproxy:
enabled: true
size: 2
image: perconalab/percona-xtradb-cluster-operator:main-haproxy
affinity:
antiAffinityTopologyKey: 'kubernetes.io/hostname'
podDisruptionBudget:
maxUnavailable: 1
resources:
requests:
memory: 128Mi
cpu: 200m
limits:
memory: 256Mi
cpu: 400m
gracePeriod: 30
logcollector:
enabled: true
image: perconalab/percona-xtradb-cluster-operator:main-logcollector
---
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: pxc-vpa
spec:
targetRef:
apiVersion: apps/v1
kind: StatefulSet
name: mysql-cluster-pxc
updatePolicy:
updateMode: 'Off'
I can use kubectl top
command, so metrics-server is working. What could be the reason of this behavior?