k8s参数优化实战
1.kubelet#/var/lib/kubelet/config.yamlapiVersion: kubelet.config.k8s.io/v1beta1authentication:anonymous:enabled: falsewebhook:cacheTTL: 2m0senabled: truex509:clientCAFile: /etc/kubernetes/pki/ca.crtau
·
1.kubelet
#/var/lib/kubelet/config.yaml
apiVersion: kubelet.config.k8s.io/v1beta1
authentication:
anonymous:
enabled: false
webhook:
cacheTTL: 2m0s
enabled: true
x509:
clientCAFile: /etc/kubernetes/pki/ca.crt
authorization:
mode: Webhook
webhook:
cacheAuthorizedTTL: 5m0s
cacheUnauthorizedTTL: 30s
clusterDNS:
- 10.96.0.10
clusterDomain: cluster.local
cpuManagerReconcilePeriod: 10s
evictionPressureTransitionPeriod: 20s
fileCheckFrequency: 10s
healthzBindAddress: 127.0.0.1
healthzPort: 10248
httpCheckFrequency: 20s
imageMinimumGCAge: 0s
kind: KubeletConfiguration
nodeStatusReportFrequency: 30s
nodeStatusUpdateFrequency: 10s
rotateCertificates: true
runtimeRequestTimeout: 2m0s
staticPodPath: /etc/kubernetes/manifests
streamingConnectionIdleTimeout: 0s
syncFrequency: 30s
volumeStatsAggPeriod: 1m0s
maxOpenFiles: 1000000
FeatureGates:
RotateKubeletClientCertificate: true
RotateKubeletServerCertificate: true
enforceNodeAllocatable:
- pods
- kube-reserved
eventBurst: 10
eventRecordQPS: 5
evictionHard:
imagefs.available: 15%
memory.available: 1024Mi
nodefs.available: 10%
nodefs.inodesFree: 5%
evictionPressureTransitionPeriod: 3m0s
kubeReservedCgroup: /system.slice/kubelet.service
kubeReserved:
cpu: "1"
memory: 2Gi
vim /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
ExecStartPre=/bin/mkdir -p /sys/fs/cgroup/cpuset/system.slice/kubelet.service
ExecStartPre=/bin/mkdir -p /sys/fs/cgroup/hugetlb/system.slice/kubelet.service
2.docker
3.kubeapiserver
4.kubecontroler
更多推荐
已为社区贡献45条内容
所有评论(0)