apiVersion: kubeadm.k8s.io/v1beta2
kind: ClusterConfiguration
kubernetesVersion: ${k8s_version}
imageRepository: "${google_image_registry}"
controlPlaneEndpoint: "${k8s_api_domain}:${k8s_api_port}"
#clusterName: ${clucster_name}
apiServer:
  extraArgs:
    service-node-port-range: "${node_port_range}"
#  certSANs:
#  - ${k8s_api_domain}
#  - ${k8s_api_vip}
etcd:
  local:
    dataDir: "${etcd_data_dir}"
    extraArgs:
      quota-backend-bytes: "8589934592"
      auto-compaction-retention: "24h"
      auto-compaction-mode: "periodic"

networking:
  serviceSubnet: "${svc_cidr}"
  podSubnet: "${pod_cidr}"
  dnsDomain: "${cluster_dns_domain}"

---
 
apiVersion: kubeadm.k8s.io/v1beta2
kind: InitConfiguration
bootstrapTokens:
- token: "${cluster_cert_token}"
  description: "default kubeadm bootstrap token"
  ttl: "24h"
#localAPIEndpoint:
#  advertiseAddress: 192.168.96.151
#  bindPort: 6443
#nodeRegistration:
#  criSocket: /run/containerd/containerd.sock
#  taints:
#  - effect: PreferNoSchedule
#    key: node-role.kubernetes.io/master
 
---

apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
cgroupDriver: systemd
failSwapOn: false
evictionHard:
  memory.available: "500Mi"
  nodefs.available: "1Gi"
  imagefs.available: "20Gi"
evictionMinimumReclaim:
  memory.available: "0Mi"
  nodefs.available: "500Mi"
  imagefs.available: "2Gi"

---

apiVersion: kubeproxy.config.k8s.io/v1alpha1
kind: KubeProxyConfiguration
mode: ${cluster_proxy_mode}
ipvs:
  excludeCIDRs:
  - ${k8s_api_vip}/32
