kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
kubeadmConfigPatches:
- |
  apiVersion: kubeadm.k8s.io/v1beta2
  kind: ClusterConfiguration
  metadata:
    name: config
  apiServer:
    extraArgs:
      # Trustworthy JWT for SDS
      "service-account-issuer": "kubernetes.default.svc"
      "service-account-signing-key-file": "/etc/kubernetes/pki/sa.key"

      "feature-gates": "EndpointSlice=true"
      "runtime-config": "discovery.k8s.io/v1alpha1=true"
  controllerManager:
    extraArgs:
      "feature-gates": "EndpointSlice=true"
      "controllers": "*,endpointslice"
      # Reduce number to allow testing multiple slices without requiring 100+ pods
      "max-endpoints-per-slice": "3"
containerdConfigPatches:
  - |-
    [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"]
      endpoint = ["http://kind-registry:5000"]