kubeasz/roles/kube-node/templates/kubelet-config.yaml.j2

88 lines
2.1 KiB
Plaintext
Raw Normal View History

kind: KubeletConfiguration
apiVersion: kubelet.config.k8s.io/v1beta1
2022-01-05 12:43:03 +08:00
address: 0.0.0.0
authentication:
anonymous:
enabled: false
webhook:
cacheTTL: 2m0s
enabled: true
x509:
clientCAFile: {{ ca_dir }}/ca.pem
authorization:
mode: Webhook
webhook:
cacheAuthorizedTTL: 5m0s
cacheUnauthorizedTTL: 30s
2021-04-19 00:00:55 +08:00
cgroupDriver: {{ CGROUP_DRIVER }}
cgroupsPerQOS: true
clusterDNS:
2021-01-13 21:27:18 +08:00
{% if ENABLE_LOCAL_DNS_CACHE %}
- {{ LOCAL_DNS_CACHE }}
{% else %}
- {{ CLUSTER_DNS_SVC_IP }}
2021-01-13 21:27:18 +08:00
{% endif %}
clusterDomain: {{ CLUSTER_DNS_DOMAIN }}
configMapAndSecretChangeDetectionStrategy: Watch
containerLogMaxFiles: 3
containerLogMaxSize: 10Mi
enforceNodeAllocatable:
- pods
{% if KUBE_RESERVED_ENABLED == "yes" %}
- kube-reserved
{% endif %}
{% if SYS_RESERVED_ENABLED == "yes" %}
- system-reserved
{% endif %}
eventBurst: 10
eventRecordQPS: 5
evictionHard:
imagefs.available: 15%
memory.available: 300Mi
nodefs.available: 10%
nodefs.inodesFree: 5%
evictionPressureTransitionPeriod: 5m0s
failSwapOn: true
fileCheckFrequency: 40s
hairpinMode: hairpin-veth
2022-01-05 12:43:03 +08:00
healthzBindAddress: 0.0.0.0
healthzPort: 10248
httpCheckFrequency: 40s
imageGCHighThresholdPercent: 85
imageGCLowThresholdPercent: 80
imageMinimumGCAge: 2m0s
{% if KUBE_RESERVED_ENABLED == "yes" %}
kubeReservedCgroup: /podruntime.slice
kubeReserved:
memory: 400Mi
{% endif %}
kubeAPIBurst: 100
kubeAPIQPS: 50
makeIPTablesUtilChains: true
maxOpenFiles: 1000000
maxPods: {{ MAX_PODS }}
nodeLeaseDurationSeconds: 40
nodeStatusReportFrequency: 1m0s
nodeStatusUpdateFrequency: 10s
oomScoreAdj: -999
podPidsLimit: -1
port: 10250
2020-02-01 10:06:07 +08:00
# disable readOnlyPort
readOnlyPort: 0
2021-01-25 00:02:45 +08:00
{% if ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int > 16 %}
resolvConf: /run/systemd/resolve/resolv.conf
{% else %}
resolvConf: /etc/resolv.conf
{% endif %}
runtimeRequestTimeout: 2m0s
serializeImagePulls: true
streamingConnectionIdleTimeout: 4h0m0s
syncFrequency: 1m0s
{% if SYS_RESERVED_ENABLED == "yes" %}
systemReservedCgroup: /system.slice
systemReserved:
memory: 1000Mi
{% endif %}
tlsCertFile: {{ ca_dir }}/kubelet.pem
tlsPrivateKeyFile: {{ ca_dir }}/kubelet-key.pem