EKS 1.23
Trying to set default podTopologySpead on cluster level. Using the suggested config from k8s documentation: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#cluster-level-default-constraints :
apiVersion: kubescheduler.config.k8s.io/v1beta3
kind: KubeSchedulerConfiguration
profiles:
- schedulerName: default-scheduler
pluginConfig:
- name: PodTopologySpread
args:
defaultConstraints:
- maxSkew: 1
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: ScheduleAnyway
defaultingType: List
when applying I get the following error:
➜ kubectl apply -f ./topology-test
error: unable to recognize "./topology-test": no matches for kind "KubeSchedulerConfiguration" in version "kubescheduler.config.k8s.io/v1beta3"
Also tried to change api version to v1beta1
, v1beta2
,v1alpha1
,v1
.
another question regarding it: isn't this configuration requires namespace mention?