From e6b21ba01c2bd2a2a0f0ed9bb00edde9fdb398f9 Mon Sep 17 00:00:00 2001 From: fbyrne Date: Fri, 11 Oct 2024 23:19:41 +0100 Subject: [PATCH] Add support for kubeadm.k8s.io/v1beta4 available since k8s v1.31 --- .../containerd-api-port.yaml | 22 ++-- .../containerd-pod-network-cidr.yaml | 22 ++-- .../{v1beta3 => v1beta4}/containerd.yaml | 10 +- .../crio-options-gates.yaml | 10 +- .../templates/{v1beta3 => v1beta4}/crio.yaml | 10 +- .../{v1beta3 => v1beta4}/default.yaml | 10 +- .../templates/{v1beta3 => v1beta4}/dns.yaml | 10 +- .../image-repository.yaml | 10 +- .../{v1beta3 => v1beta4}/options.yaml | 31 +++-- .../bootstrapper/bsutil/ktmpl/v1beta4.go | 112 ++++++++++++++++++ pkg/minikube/bootstrapper/bsutil/kubeadm.go | 10 +- .../testdata/v1.31/containerd-api-port.yaml | 22 ++-- .../v1.31/containerd-pod-network-cidr.yaml | 22 ++-- .../bsutil/testdata/v1.31/containerd.yaml | 22 ++-- .../testdata/v1.31/crio-options-gates.yaml | 40 ++++--- .../bsutil/testdata/v1.31/crio.yaml | 22 ++-- .../bsutil/testdata/v1.31/default.yaml | 22 ++-- .../bsutil/testdata/v1.31/dns.yaml | 22 ++-- .../testdata/v1.31/image-repository.yaml | 22 ++-- .../bsutil/testdata/v1.31/options.yaml | 31 +++-- 20 files changed, 349 insertions(+), 133 deletions(-) rename hack/update/kubernetes_version/templates/{v1beta3 => v1beta4}/containerd-api-port.yaml (75%) rename hack/update/kubernetes_version/templates/{v1beta3 => v1beta4}/containerd-pod-network-cidr.yaml (75%) rename hack/update/kubernetes_version/templates/{v1beta3 => v1beta4}/containerd.yaml (84%) rename hack/update/kubernetes_version/templates/{v1beta3 => v1beta4}/crio-options-gates.yaml (85%) rename hack/update/kubernetes_version/templates/{v1beta3 => v1beta4}/crio.yaml (84%) rename hack/update/kubernetes_version/templates/{v1beta3 => v1beta4}/default.yaml (84%) rename hack/update/kubernetes_version/templates/{v1beta3 => v1beta4}/dns.yaml (84%) rename hack/update/kubernetes_version/templates/{v1beta3 => v1beta4}/image-repository.yaml (84%) rename hack/update/kubernetes_version/templates/{v1beta3 => v1beta4}/options.yaml (70%) create mode 100644 pkg/minikube/bootstrapper/bsutil/ktmpl/v1beta4.go diff --git a/hack/update/kubernetes_version/templates/v1beta3/containerd-api-port.yaml b/hack/update/kubernetes_version/templates/v1beta4/containerd-api-port.yaml similarity index 75% rename from hack/update/kubernetes_version/templates/v1beta3/containerd-api-port.yaml rename to hack/update/kubernetes_version/templates/v1beta4/containerd-api-port.yaml index 14e9c7d25a66..ab59a9854cef 100644 --- a/hack/update/kubernetes_version/templates/v1beta3/containerd-api-port.yaml +++ b/hack/update/kubernetes_version/templates/v1beta4/containerd-api-port.yaml @@ -1,4 +1,4 @@ -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: InitConfiguration localAPIEndpoint: advertiseAddress: 1.1.1.1 @@ -14,22 +14,27 @@ nodeRegistration: criSocket: unix:///run/containerd/containerd.sock name: "mk" kubeletExtraArgs: - node-ip: 1.1.1.1 + - name: "node-ip" + value: "1.1.1.1" taints: [] --- -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration apiServer: certSANs: ["127.0.0.1", "localhost", "1.1.1.1"] extraArgs: - enable-admission-plugins: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" + - name: "enable-admission-plugins" + value: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" controllerManager: extraArgs: - allocate-node-cidrs: "true" - leader-elect: "false" + - name: "allocate-node-cidrs" + value: "true" + - name: "leader-elect" + value: "false" scheduler: extraArgs: - leader-elect: "false" + - name: "leader-elect" + value: "false" certificatesDir: /var/lib/minikube/certs clusterName: mk controlPlaneEndpoint: control-plane.minikube.internal:12345 @@ -37,7 +42,8 @@ etcd: local: dataDir: /var/lib/minikube/etcd extraArgs: - proxy-refresh-interval: "70000" + - name: "proxy-refresh-interval" + value: "70000" kubernetesVersion: v1.23.0 networking: dnsDomain: cluster.local diff --git a/hack/update/kubernetes_version/templates/v1beta3/containerd-pod-network-cidr.yaml b/hack/update/kubernetes_version/templates/v1beta4/containerd-pod-network-cidr.yaml similarity index 75% rename from hack/update/kubernetes_version/templates/v1beta3/containerd-pod-network-cidr.yaml rename to hack/update/kubernetes_version/templates/v1beta4/containerd-pod-network-cidr.yaml index 5cace184dfef..92d646b65596 100644 --- a/hack/update/kubernetes_version/templates/v1beta3/containerd-pod-network-cidr.yaml +++ b/hack/update/kubernetes_version/templates/v1beta4/containerd-pod-network-cidr.yaml @@ -1,4 +1,4 @@ -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: InitConfiguration localAPIEndpoint: advertiseAddress: 1.1.1.1 @@ -14,22 +14,27 @@ nodeRegistration: criSocket: unix:///run/containerd/containerd.sock name: "mk" kubeletExtraArgs: - node-ip: 1.1.1.1 + - name: "node-ip" + value: "1.1.1.1" taints: [] --- -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration apiServer: certSANs: ["127.0.0.1", "localhost", "1.1.1.1"] extraArgs: - enable-admission-plugins: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" + - name: "enable-admission-plugins" + value: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" controllerManager: extraArgs: - allocate-node-cidrs: "true" - leader-elect: "false" + - name: "allocate-node-cidrs" + value: "true" + - name: "leader-elect" + value: "false" scheduler: extraArgs: - leader-elect: "false" + - name: "leader-elect" + value: "false" certificatesDir: /var/lib/minikube/certs clusterName: mk controlPlaneEndpoint: control-plane.minikube.internal:8443 @@ -37,7 +42,8 @@ etcd: local: dataDir: /var/lib/minikube/etcd extraArgs: - proxy-refresh-interval: "70000" + - name: "proxy-refresh-interval" + value: "70000" kubernetesVersion: v1.23.0 networking: dnsDomain: cluster.local diff --git a/hack/update/kubernetes_version/templates/v1beta3/containerd.yaml b/hack/update/kubernetes_version/templates/v1beta4/containerd.yaml similarity index 84% rename from hack/update/kubernetes_version/templates/v1beta3/containerd.yaml rename to hack/update/kubernetes_version/templates/v1beta4/containerd.yaml index 5508409d29c5..ddf161f5c823 100644 --- a/hack/update/kubernetes_version/templates/v1beta3/containerd.yaml +++ b/hack/update/kubernetes_version/templates/v1beta4/containerd.yaml @@ -1,4 +1,4 @@ -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: InitConfiguration localAPIEndpoint: advertiseAddress: 1.1.1.1 @@ -14,15 +14,17 @@ nodeRegistration: criSocket: unix:///run/containerd/containerd.sock name: "mk" kubeletExtraArgs: - node-ip: 1.1.1.1 + - name: "node-ip" + value: "1.1.1.1" taints: [] --- -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration apiServer: certSANs: ["127.0.0.1", "localhost", "1.1.1.1"] extraArgs: - enable-admission-plugins: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" + - name: "enable-admission-plugins" + value: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" controllerManager: extraArgs: allocate-node-cidrs: "true" diff --git a/hack/update/kubernetes_version/templates/v1beta3/crio-options-gates.yaml b/hack/update/kubernetes_version/templates/v1beta4/crio-options-gates.yaml similarity index 85% rename from hack/update/kubernetes_version/templates/v1beta3/crio-options-gates.yaml rename to hack/update/kubernetes_version/templates/v1beta4/crio-options-gates.yaml index 63c7a40dbe54..c64545a510b3 100644 --- a/hack/update/kubernetes_version/templates/v1beta3/crio-options-gates.yaml +++ b/hack/update/kubernetes_version/templates/v1beta4/crio-options-gates.yaml @@ -1,4 +1,4 @@ -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: InitConfiguration localAPIEndpoint: advertiseAddress: 1.1.1.1 @@ -14,15 +14,17 @@ nodeRegistration: criSocket: unix:///var/run/crio/crio.sock name: "mk" kubeletExtraArgs: - node-ip: 1.1.1.1 + - name: "node-ip" + value: "1.1.1.1" taints: [] --- -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration apiServer: certSANs: ["127.0.0.1", "localhost", "1.1.1.1"] extraArgs: - enable-admission-plugins: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" + - name: "enable-admission-plugins" + value: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" fail-no-swap: "true" feature-gates: "a=b" controllerManager: diff --git a/hack/update/kubernetes_version/templates/v1beta3/crio.yaml b/hack/update/kubernetes_version/templates/v1beta4/crio.yaml similarity index 84% rename from hack/update/kubernetes_version/templates/v1beta3/crio.yaml rename to hack/update/kubernetes_version/templates/v1beta4/crio.yaml index d14509774a4c..db7de1556333 100644 --- a/hack/update/kubernetes_version/templates/v1beta3/crio.yaml +++ b/hack/update/kubernetes_version/templates/v1beta4/crio.yaml @@ -1,4 +1,4 @@ -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: InitConfiguration localAPIEndpoint: advertiseAddress: 1.1.1.1 @@ -14,15 +14,17 @@ nodeRegistration: criSocket: unix:///var/run/crio/crio.sock name: "mk" kubeletExtraArgs: - node-ip: 1.1.1.1 + - name: "node-ip" + value: "1.1.1.1" taints: [] --- -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration apiServer: certSANs: ["127.0.0.1", "localhost", "1.1.1.1"] extraArgs: - enable-admission-plugins: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" + - name: "enable-admission-plugins" + value: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" controllerManager: extraArgs: allocate-node-cidrs: "true" diff --git a/hack/update/kubernetes_version/templates/v1beta3/default.yaml b/hack/update/kubernetes_version/templates/v1beta4/default.yaml similarity index 84% rename from hack/update/kubernetes_version/templates/v1beta3/default.yaml rename to hack/update/kubernetes_version/templates/v1beta4/default.yaml index 6ab06fb8ccd5..731e2f8b3662 100644 --- a/hack/update/kubernetes_version/templates/v1beta3/default.yaml +++ b/hack/update/kubernetes_version/templates/v1beta4/default.yaml @@ -1,4 +1,4 @@ -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: InitConfiguration localAPIEndpoint: advertiseAddress: 1.1.1.1 @@ -14,15 +14,17 @@ nodeRegistration: criSocket: unix:///var/run/dockershim.sock name: "mk" kubeletExtraArgs: - node-ip: 1.1.1.1 + - name: "node-ip" + value: "1.1.1.1" taints: [] --- -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration apiServer: certSANs: ["127.0.0.1", "localhost", "1.1.1.1"] extraArgs: - enable-admission-plugins: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" + - name: "enable-admission-plugins" + value: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" controllerManager: extraArgs: allocate-node-cidrs: "true" diff --git a/hack/update/kubernetes_version/templates/v1beta3/dns.yaml b/hack/update/kubernetes_version/templates/v1beta4/dns.yaml similarity index 84% rename from hack/update/kubernetes_version/templates/v1beta3/dns.yaml rename to hack/update/kubernetes_version/templates/v1beta4/dns.yaml index 5e2ab12754fc..a283e91b6c4c 100644 --- a/hack/update/kubernetes_version/templates/v1beta3/dns.yaml +++ b/hack/update/kubernetes_version/templates/v1beta4/dns.yaml @@ -1,4 +1,4 @@ -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: InitConfiguration localAPIEndpoint: advertiseAddress: 1.1.1.1 @@ -14,15 +14,17 @@ nodeRegistration: criSocket: unix:///var/run/dockershim.sock name: "mk" kubeletExtraArgs: - node-ip: 1.1.1.1 + - name: "node-ip" + value: "1.1.1.1" taints: [] --- -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration apiServer: certSANs: ["127.0.0.1", "localhost", "1.1.1.1"] extraArgs: - enable-admission-plugins: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" + - name: "enable-admission-plugins" + value: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" controllerManager: extraArgs: allocate-node-cidrs: "true" diff --git a/hack/update/kubernetes_version/templates/v1beta3/image-repository.yaml b/hack/update/kubernetes_version/templates/v1beta4/image-repository.yaml similarity index 84% rename from hack/update/kubernetes_version/templates/v1beta3/image-repository.yaml rename to hack/update/kubernetes_version/templates/v1beta4/image-repository.yaml index d674355f480d..067665bf452f 100644 --- a/hack/update/kubernetes_version/templates/v1beta3/image-repository.yaml +++ b/hack/update/kubernetes_version/templates/v1beta4/image-repository.yaml @@ -1,4 +1,4 @@ -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: InitConfiguration localAPIEndpoint: advertiseAddress: 1.1.1.1 @@ -14,16 +14,18 @@ nodeRegistration: criSocket: unix:///var/run/dockershim.sock name: "mk" kubeletExtraArgs: - node-ip: 1.1.1.1 + - name: "node-ip" + value: "1.1.1.1" taints: [] --- -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration imageRepository: test/repo apiServer: certSANs: ["127.0.0.1", "localhost", "1.1.1.1"] extraArgs: - enable-admission-plugins: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" + - name: "enable-admission-plugins" + value: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" controllerManager: extraArgs: allocate-node-cidrs: "true" diff --git a/hack/update/kubernetes_version/templates/v1beta3/options.yaml b/hack/update/kubernetes_version/templates/v1beta4/options.yaml similarity index 70% rename from hack/update/kubernetes_version/templates/v1beta3/options.yaml rename to hack/update/kubernetes_version/templates/v1beta4/options.yaml index 7f9ba3f12040..3a66badf25b6 100644 --- a/hack/update/kubernetes_version/templates/v1beta3/options.yaml +++ b/hack/update/kubernetes_version/templates/v1beta4/options.yaml @@ -1,4 +1,4 @@ -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: InitConfiguration localAPIEndpoint: advertiseAddress: 1.1.1.1 @@ -14,25 +14,33 @@ nodeRegistration: criSocket: unix:///var/run/dockershim.sock name: "mk" kubeletExtraArgs: - node-ip: 1.1.1.1 + - name: "node-ip" + value: "1.1.1.1" taints: [] --- -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration apiServer: certSANs: ["127.0.0.1", "localhost", "1.1.1.1"] extraArgs: - enable-admission-plugins: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" - fail-no-swap: "true" + - name: "enable-admission-plugins" + value: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" + - name: "fail-no-swap" + value: "true" controllerManager: extraArgs: - allocate-node-cidrs: "true" - kube-api-burst: "32" - leader-elect: "false" + - name: "allocate-node-cidrs" + value: "true" + - name: "kube-api-burst" + value: "32" + - name: "leader-elect" + value: "false" scheduler: extraArgs: - leader-elect: "false" - scheduler-name: "mini-scheduler" + - name: "leader-elect" + value: "false" + - name: "scheduler-name" + value: "mini-scheduler" certificatesDir: /var/lib/minikube/certs clusterName: mk controlPlaneEndpoint: control-plane.minikube.internal:8443 @@ -40,7 +48,8 @@ etcd: local: dataDir: /var/lib/minikube/etcd extraArgs: - proxy-refresh-interval: "70000" + - name: "proxy-refresh-interval" + value: "70000" kubernetesVersion: v1.23.0 networking: dnsDomain: cluster.local diff --git a/pkg/minikube/bootstrapper/bsutil/ktmpl/v1beta4.go b/pkg/minikube/bootstrapper/bsutil/ktmpl/v1beta4.go new file mode 100644 index 000000000000..cc3843a850a4 --- /dev/null +++ b/pkg/minikube/bootstrapper/bsutil/ktmpl/v1beta4.go @@ -0,0 +1,112 @@ +/* +Copyright 2022 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package ktmpl + +import "text/template" + +// V1Beta4 is kubeadm config template for Kubernetes v1.23.0+ +var V1Beta4 = template.Must(template.New("configTmpl-v1beta4").Funcs(template.FuncMap{ + "printMapInOrder": printMapInOrder, +}).Parse(`apiVersion: kubeadm.k8s.io/v1beta4 +kind: InitConfiguration +localAPIEndpoint: + advertiseAddress: {{.AdvertiseAddress}} + bindPort: {{.APIServerPort}} +bootstrapTokens: + - groups: + - system:bootstrappers:kubeadm:default-node-token + ttl: 24h0m0s + usages: + - signing + - authentication +nodeRegistration: + criSocket: {{if .CRISocket}}{{if .PrependCriSocketUnix}}unix://{{end}}{{.CRISocket}}{{else}}{{if .PrependCriSocketUnix}}unix://{{end}}/var/run/dockershim.sock{{end}} + name: "{{.NodeName}}" + kubeletExtraArgs: + - name: "node-ip" + value: "{{.NodeIP}}" + taints: [] +--- +apiVersion: kubeadm.k8s.io/v1beta4 +kind: ClusterConfiguration +{{ if .ImageRepository}}imageRepository: {{.ImageRepository}} +{{end}}{{range .ComponentOptions}}{{.Component}}: +{{- range $k, $v := .Pairs }} + {{$k}}: {{$v}} +{{- end}} + extraArgs: +{{- range $key, $val := .ExtraArgs }} + - name: "{{$key}}" + value: "{{$val}}" +{{- end}} +{{end -}} +{{if .FeatureArgs}}featureGates: +{{range $i, $val := .FeatureArgs}}{{$i}}: {{$val}} +{{end -}}{{end -}} +certificatesDir: {{.CertDir}} +clusterName: mk +controlPlaneEndpoint: {{.ControlPlaneAddress}}:{{.APIServerPort}} +etcd: + local: + dataDir: {{.EtcdDataDir}} + extraArgs: + - name: "proxy-refresh-interval" + value: "70000" +{{- range $key, $val := .EtcdExtraArgs }} + - name: "{{$key}}" + value: "{{$val}}" +{{- end}} +kubernetesVersion: {{.KubernetesVersion}} +networking: + dnsDomain: {{if .DNSDomain}}{{.DNSDomain}}{{else}}cluster.local{{end}} + podSubnet: "{{.PodSubnet }}" + serviceSubnet: {{.ServiceCIDR}} +--- +apiVersion: kubelet.config.k8s.io/v1beta1 +kind: KubeletConfiguration +authentication: + x509: + clientCAFile: {{.ClientCAFile}} +cgroupDriver: {{.CgroupDriver}} +{{- range $key, $val := .KubeletConfigOpts}} +{{$key}}: {{$val}} +{{- end}} +clusterDomain: "{{if .DNSDomain}}{{.DNSDomain}}{{else}}cluster.local{{end}}" +# disable disk resource management by default +imageGCHighThresholdPercent: 100 +evictionHard: + nodefs.available: "0%" + nodefs.inodesFree: "0%" + imagefs.available: "0%" +failSwapOn: false +staticPodPath: {{.StaticPodPath}}{{if .ResolvConfSearchRegression}} +resolvConf: /etc/kubelet-resolv.conf{{end}} +--- +apiVersion: kubeproxy.config.k8s.io/v1alpha1 +kind: KubeProxyConfiguration +clusterCIDR: "{{.PodSubnet }}" +metricsBindAddress: 0.0.0.0:10249 +conntrack: + maxPerCore: 0 +# Skip setting "net.netfilter.nf_conntrack_tcp_timeout_established" + tcpEstablishedTimeout: 0s +# Skip setting "net.netfilter.nf_conntrack_tcp_timeout_close" + tcpCloseWaitTimeout: 0s +{{- range $i, $val := printMapInOrder .KubeProxyOptions ": " }} +{{$val}} +{{- end}} +`)) diff --git a/pkg/minikube/bootstrapper/bsutil/kubeadm.go b/pkg/minikube/bootstrapper/bsutil/kubeadm.go index 5edf5ffae1e6..a65efb33d4f6 100644 --- a/pkg/minikube/bootstrapper/bsutil/kubeadm.go +++ b/pkg/minikube/bootstrapper/bsutil/kubeadm.go @@ -172,7 +172,15 @@ func GenerateKubeadmYAML(cc config.ClusterConfig, n config.Node, r cruntime.Mana if version.GTE(semver.MustParse("1.23.0")) { configTmpl = ktmpl.V1Beta3 } - // TODO: support v1beta4 kubeadm config when released - refs: https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta4/ and https://github.com/kubernetes/kubeadm/issues/2890 + // v1beta4 isn't required until v1.31. + if version.GTE(semver.MustParse("1.31.0")) { + // Support v1beta4 kubeadm config + // refs: + // - https://kubernetes.io/blog/2024/08/23/kubernetes-1-31-kubeadm-v1beta4/ + // - https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta4/ + // - https://github.com/kubernetes/kubeadm/issues/2890 + configTmpl = ktmpl.V1Beta4 + } if version.GTE(semver.MustParse("1.24.0-alpha.2")) { opts.PrependCriSocketUnix = true diff --git a/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/containerd-api-port.yaml b/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/containerd-api-port.yaml index a7260d1afa0a..030c81ea5307 100644 --- a/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/containerd-api-port.yaml +++ b/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/containerd-api-port.yaml @@ -1,4 +1,4 @@ -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: InitConfiguration localAPIEndpoint: advertiseAddress: 1.1.1.1 @@ -14,22 +14,27 @@ nodeRegistration: criSocket: unix:///run/containerd/containerd.sock name: "mk" kubeletExtraArgs: - node-ip: 1.1.1.1 + - name: "node-ip" + value: "1.1.1.1" taints: [] --- -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration apiServer: certSANs: ["127.0.0.1", "localhost", "1.1.1.1"] extraArgs: - enable-admission-plugins: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" + - name: "enable-admission-plugins" + value: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" controllerManager: extraArgs: - allocate-node-cidrs: "true" - leader-elect: "false" + - name: "allocate-node-cidrs" + value: "true" + - name: "leader-elect" + value: "false" scheduler: extraArgs: - leader-elect: "false" + - name: "leader-elect" + value: "false" certificatesDir: /var/lib/minikube/certs clusterName: mk controlPlaneEndpoint: control-plane.minikube.internal:12345 @@ -37,7 +42,8 @@ etcd: local: dataDir: /var/lib/minikube/etcd extraArgs: - proxy-refresh-interval: "70000" + - name: "proxy-refresh-interval" + value: "70000" kubernetesVersion: v1.31.0 networking: dnsDomain: cluster.local diff --git a/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/containerd-pod-network-cidr.yaml b/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/containerd-pod-network-cidr.yaml index 2db4da31061e..93e18e13b8bb 100644 --- a/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/containerd-pod-network-cidr.yaml +++ b/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/containerd-pod-network-cidr.yaml @@ -1,4 +1,4 @@ -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: InitConfiguration localAPIEndpoint: advertiseAddress: 1.1.1.1 @@ -14,22 +14,27 @@ nodeRegistration: criSocket: unix:///run/containerd/containerd.sock name: "mk" kubeletExtraArgs: - node-ip: 1.1.1.1 + - name: "node-ip" + value: "1.1.1.1" taints: [] --- -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration apiServer: certSANs: ["127.0.0.1", "localhost", "1.1.1.1"] extraArgs: - enable-admission-plugins: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" + - name: "enable-admission-plugins" + value: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" controllerManager: extraArgs: - allocate-node-cidrs: "true" - leader-elect: "false" + - name: "allocate-node-cidrs" + value: "true" + - name: "leader-elect" + value: "false" scheduler: extraArgs: - leader-elect: "false" + - name: "leader-elect" + value: "false" certificatesDir: /var/lib/minikube/certs clusterName: mk controlPlaneEndpoint: control-plane.minikube.internal:8443 @@ -37,7 +42,8 @@ etcd: local: dataDir: /var/lib/minikube/etcd extraArgs: - proxy-refresh-interval: "70000" + - name: "proxy-refresh-interval" + value: "70000" kubernetesVersion: v1.31.0 networking: dnsDomain: cluster.local diff --git a/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/containerd.yaml b/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/containerd.yaml index d5dccaccd579..99a619530804 100644 --- a/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/containerd.yaml +++ b/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/containerd.yaml @@ -1,4 +1,4 @@ -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: InitConfiguration localAPIEndpoint: advertiseAddress: 1.1.1.1 @@ -14,22 +14,27 @@ nodeRegistration: criSocket: unix:///run/containerd/containerd.sock name: "mk" kubeletExtraArgs: - node-ip: 1.1.1.1 + - name: "node-ip" + value: "1.1.1.1" taints: [] --- -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration apiServer: certSANs: ["127.0.0.1", "localhost", "1.1.1.1"] extraArgs: - enable-admission-plugins: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" + - name: "enable-admission-plugins" + value: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" controllerManager: extraArgs: - allocate-node-cidrs: "true" - leader-elect: "false" + - name: "allocate-node-cidrs" + value: "true" + - name: "leader-elect" + value: "false" scheduler: extraArgs: - leader-elect: "false" + - name: "leader-elect" + value: "false" certificatesDir: /var/lib/minikube/certs clusterName: mk controlPlaneEndpoint: control-plane.minikube.internal:8443 @@ -37,7 +42,8 @@ etcd: local: dataDir: /var/lib/minikube/etcd extraArgs: - proxy-refresh-interval: "70000" + - name: "proxy-refresh-interval" + value: "70000" kubernetesVersion: v1.31.0 networking: dnsDomain: cluster.local diff --git a/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/crio-options-gates.yaml b/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/crio-options-gates.yaml index da42aff37007..a10667065484 100644 --- a/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/crio-options-gates.yaml +++ b/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/crio-options-gates.yaml @@ -1,4 +1,4 @@ -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: InitConfiguration localAPIEndpoint: advertiseAddress: 1.1.1.1 @@ -14,28 +14,39 @@ nodeRegistration: criSocket: unix:///var/run/crio/crio.sock name: "mk" kubeletExtraArgs: - node-ip: 1.1.1.1 + - name: "node-ip" + value: "1.1.1.1" taints: [] --- -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration apiServer: certSANs: ["127.0.0.1", "localhost", "1.1.1.1"] extraArgs: - enable-admission-plugins: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" - fail-no-swap: "true" - feature-gates: "a=b" + - name: "enable-admission-plugins" + value: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" + - name: "fail-no-swap" + value: "true" + - name: "feature-gates" + value: "a=b" controllerManager: extraArgs: - allocate-node-cidrs: "true" - feature-gates: "a=b" - kube-api-burst: "32" - leader-elect: "false" + - name: "allocate-node-cidrs" + value: "true" + - name: "feature-gates" + value: "a=b" + - name: "kube-api-burst" + value: "32" + - name: "leader-elect" + value: "false" scheduler: extraArgs: - feature-gates: "a=b" - leader-elect: "false" - scheduler-name: "mini-scheduler" + - name: "feature-gates" + value: "a=b" + - name: "leader-elect" + value: "false" + - name: "scheduler-name" + value: "mini-scheduler" certificatesDir: /var/lib/minikube/certs clusterName: mk controlPlaneEndpoint: control-plane.minikube.internal:8443 @@ -43,7 +54,8 @@ etcd: local: dataDir: /var/lib/minikube/etcd extraArgs: - proxy-refresh-interval: "70000" + - name: "proxy-refresh-interval" + value: "70000" kubernetesVersion: v1.31.0 networking: dnsDomain: cluster.local diff --git a/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/crio.yaml b/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/crio.yaml index 819f15ce08d3..66a9097ca095 100644 --- a/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/crio.yaml +++ b/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/crio.yaml @@ -1,4 +1,4 @@ -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: InitConfiguration localAPIEndpoint: advertiseAddress: 1.1.1.1 @@ -14,22 +14,27 @@ nodeRegistration: criSocket: unix:///var/run/crio/crio.sock name: "mk" kubeletExtraArgs: - node-ip: 1.1.1.1 + - name: "node-ip" + value: "1.1.1.1" taints: [] --- -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration apiServer: certSANs: ["127.0.0.1", "localhost", "1.1.1.1"] extraArgs: - enable-admission-plugins: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" + - name: "enable-admission-plugins" + value: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" controllerManager: extraArgs: - allocate-node-cidrs: "true" - leader-elect: "false" + - name: "allocate-node-cidrs" + value: "true" + - name: "leader-elect" + value: "false" scheduler: extraArgs: - leader-elect: "false" + - name: "leader-elect" + value: "false" certificatesDir: /var/lib/minikube/certs clusterName: mk controlPlaneEndpoint: control-plane.minikube.internal:8443 @@ -37,7 +42,8 @@ etcd: local: dataDir: /var/lib/minikube/etcd extraArgs: - proxy-refresh-interval: "70000" + - name: "proxy-refresh-interval" + value: "70000" kubernetesVersion: v1.31.0 networking: dnsDomain: cluster.local diff --git a/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/default.yaml b/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/default.yaml index df50e2e23d7c..44b3314f3915 100644 --- a/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/default.yaml +++ b/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/default.yaml @@ -1,4 +1,4 @@ -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: InitConfiguration localAPIEndpoint: advertiseAddress: 1.1.1.1 @@ -14,22 +14,27 @@ nodeRegistration: criSocket: unix:///var/run/dockershim.sock name: "mk" kubeletExtraArgs: - node-ip: 1.1.1.1 + - name: "node-ip" + value: "1.1.1.1" taints: [] --- -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration apiServer: certSANs: ["127.0.0.1", "localhost", "1.1.1.1"] extraArgs: - enable-admission-plugins: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" + - name: "enable-admission-plugins" + value: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" controllerManager: extraArgs: - allocate-node-cidrs: "true" - leader-elect: "false" + - name: "allocate-node-cidrs" + value: "true" + - name: "leader-elect" + value: "false" scheduler: extraArgs: - leader-elect: "false" + - name: "leader-elect" + value: "false" certificatesDir: /var/lib/minikube/certs clusterName: mk controlPlaneEndpoint: control-plane.minikube.internal:8443 @@ -37,7 +42,8 @@ etcd: local: dataDir: /var/lib/minikube/etcd extraArgs: - proxy-refresh-interval: "70000" + - name: "proxy-refresh-interval" + value: "70000" kubernetesVersion: v1.31.0 networking: dnsDomain: cluster.local diff --git a/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/dns.yaml b/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/dns.yaml index e9872a1029d9..c11958b071e3 100644 --- a/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/dns.yaml +++ b/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/dns.yaml @@ -1,4 +1,4 @@ -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: InitConfiguration localAPIEndpoint: advertiseAddress: 1.1.1.1 @@ -14,22 +14,27 @@ nodeRegistration: criSocket: unix:///var/run/dockershim.sock name: "mk" kubeletExtraArgs: - node-ip: 1.1.1.1 + - name: "node-ip" + value: "1.1.1.1" taints: [] --- -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration apiServer: certSANs: ["127.0.0.1", "localhost", "1.1.1.1"] extraArgs: - enable-admission-plugins: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" + - name: "enable-admission-plugins" + value: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" controllerManager: extraArgs: - allocate-node-cidrs: "true" - leader-elect: "false" + - name: "allocate-node-cidrs" + value: "true" + - name: "leader-elect" + value: "false" scheduler: extraArgs: - leader-elect: "false" + - name: "leader-elect" + value: "false" certificatesDir: /var/lib/minikube/certs clusterName: mk controlPlaneEndpoint: control-plane.minikube.internal:8443 @@ -37,7 +42,8 @@ etcd: local: dataDir: /var/lib/minikube/etcd extraArgs: - proxy-refresh-interval: "70000" + - name: "proxy-refresh-interval" + value: "70000" kubernetesVersion: v1.31.0 networking: dnsDomain: minikube.local diff --git a/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/image-repository.yaml b/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/image-repository.yaml index 2e2d09403d88..8e0313c6cf24 100644 --- a/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/image-repository.yaml +++ b/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/image-repository.yaml @@ -1,4 +1,4 @@ -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: InitConfiguration localAPIEndpoint: advertiseAddress: 1.1.1.1 @@ -14,23 +14,28 @@ nodeRegistration: criSocket: unix:///var/run/dockershim.sock name: "mk" kubeletExtraArgs: - node-ip: 1.1.1.1 + - name: "node-ip" + value: "1.1.1.1" taints: [] --- -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration imageRepository: test/repo apiServer: certSANs: ["127.0.0.1", "localhost", "1.1.1.1"] extraArgs: - enable-admission-plugins: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" + - name: "enable-admission-plugins" + value: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" controllerManager: extraArgs: - allocate-node-cidrs: "true" - leader-elect: "false" + - name: "allocate-node-cidrs" + value: "true" + - name: "leader-elect" + value: "false" scheduler: extraArgs: - leader-elect: "false" + - name: "leader-elect" + value: "false" certificatesDir: /var/lib/minikube/certs clusterName: mk controlPlaneEndpoint: control-plane.minikube.internal:8443 @@ -38,7 +43,8 @@ etcd: local: dataDir: /var/lib/minikube/etcd extraArgs: - proxy-refresh-interval: "70000" + - name: "proxy-refresh-interval" + value: "70000" kubernetesVersion: v1.31.0 networking: dnsDomain: cluster.local diff --git a/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/options.yaml b/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/options.yaml index f712250ab5d6..59e60f78c9d4 100644 --- a/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/options.yaml +++ b/pkg/minikube/bootstrapper/bsutil/testdata/v1.31/options.yaml @@ -1,4 +1,4 @@ -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: InitConfiguration localAPIEndpoint: advertiseAddress: 1.1.1.1 @@ -14,25 +14,33 @@ nodeRegistration: criSocket: unix:///var/run/dockershim.sock name: "mk" kubeletExtraArgs: - node-ip: 1.1.1.1 + - name: "node-ip" + value: "1.1.1.1" taints: [] --- -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration apiServer: certSANs: ["127.0.0.1", "localhost", "1.1.1.1"] extraArgs: - enable-admission-plugins: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" - fail-no-swap: "true" + - name: "enable-admission-plugins" + value: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" + - name: "fail-no-swap" + value: "true" controllerManager: extraArgs: - allocate-node-cidrs: "true" - kube-api-burst: "32" - leader-elect: "false" + - name: "allocate-node-cidrs" + value: "true" + - name: "kube-api-burst" + value: "32" + - name: "leader-elect" + value: "false" scheduler: extraArgs: - leader-elect: "false" - scheduler-name: "mini-scheduler" + - name: "leader-elect" + value: "false" + - name: "scheduler-name" + value: "mini-scheduler" certificatesDir: /var/lib/minikube/certs clusterName: mk controlPlaneEndpoint: control-plane.minikube.internal:8443 @@ -40,7 +48,8 @@ etcd: local: dataDir: /var/lib/minikube/etcd extraArgs: - proxy-refresh-interval: "70000" + - name: "proxy-refresh-interval" + value: "70000" kubernetesVersion: v1.31.0 networking: dnsDomain: cluster.local