kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: bakery-ia-local
nodes:
- role: control-plane
  # Increase resource limits for the Kind node to handle multiple services
  kubeadmConfigPatches:
  - |
    kind: InitConfiguration
    nodeRegistration:
      kubeletExtraArgs:
        node-labels: "ingress-ready=true"
        # Increase max pods for development environment
        max-pods: "200"
  - |
    kind: ClusterConfiguration
    # Increase API server memory and other parameters for local dev
    apiServer:
      extraArgs:
        encryption-provider-config: /etc/kubernetes/enc/encryption-config.yaml
      extraVolumes:
      - name: encryption-config
        hostPath: /etc/kubernetes/enc
        mountPath: /etc/kubernetes/enc
        readOnly: true
        pathType: DirectoryOrCreate
  # Mount encryption keys for secure development
  extraMounts:
  - hostPath: ./infrastructure/kubernetes/encryption
    containerPath: /etc/kubernetes/enc
    readOnly: true
  # Port mappings for local access
  extraPortMappings:
  # HTTP ingress - nginx ingress controller uses hostPort: 80
  - containerPort: 80
    hostPort: 80
    protocol: TCP
  # HTTPS ingress - nginx ingress controller uses hostPort: 443
  - containerPort: 443
    hostPort: 443
    protocol: TCP
  # Direct frontend access (backup)
  - containerPort: 30300
    hostPort: 3000
    protocol: TCP
  # Direct gateway access (backup)
  - containerPort: 30800
    hostPort: 8000
    protocol: TCP