Closed simha5009 closed 3 years ago
/assign @vrabbi
@simha5009 this is possible already via the kubeadmconfigtemplate and kubeadmcontrolplane crds. this is done by adding in the kubeletExtraArgs section an arg called "maxPods" an example bellow is how you could set it in a kubeadmconfigtemplate:
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3
kind: KubeadmConfigTemplate
metadata:
name: capv-cls-01-md-0
spec:
template:
spec:
joinConfiguration:
nodeRegistration:
criSocket: "/var/run/containerd/containerd.sock"
kubeletExtraArgs:
maxPods: 50
cloud-provider: external
tls-cipher-suites: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
name: "{{ ds.meta_data.hostname }}"
preKubeadmCommands:
- hostname "{{ ds.meta_data.hostname }}"
- echo "::1 ipv6-localhost ipv6-loopback" >/etc/hosts
- echo "127.0.0.1 localhost" >>/etc/hosts
- echo "127.0.0.1 {{ ds.meta_data.hostname }}" >>/etc/hosts
- echo "{{ ds.meta_data.hostname }}" >/etc/hostname
useExperimentalRetryJoin: true
users:
- name: capv
sshAuthorizedKeys:
- ssh-rsa AAAAB3NzaC1yc2EAAAAD..............................................
you can also set "podsPerCore" which is another option for limiting the number of pods on the node just based by core count. for the full list of what you can set in the extraArgs section for kubelet look at the following doc: https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/
Are they available on templates? I could not see them in release templates.
Should we make them configurable through ENV variables like do for other settings?
They are not on the default templates as this is an advanced setting i dont believe also fits the standard use case. You will need to edit the manifest generated by clusterctl for you before applying it and add that value.
On Sep 3, 2021 07:35, Narasimha Karumanchi @.***> wrote:
Are they available on templates? I could not see them.
Should we make them configurable?
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHubhttps://github.com/kubernetes-sigs/cluster-api-provider-vsphere/issues/1238#issuecomment-912248417, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALR7DWEDC7UVK73C6MHMCELUABF7JANCNFSM5C265MBA.
We can close this
/kind feature
Describe the solution you'd like Can we add max-pod support on the machines/nodes?
Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]
Environment:
kubectl version
): all/etc/os-release
): all