b8b2cc7c74
* zh-trans:/docs/docs/concepts/workloads/pods/ephemeral-containers.md (#16948) * update zh-trans of define-environment-variable-container.md (#16999) Signed-off-by: Yixiang2019 <wang.yixiang@zte.com.cn> * update chinese docs (#16985) * Fix ordered list (#16988) Signed-off-by: PingWang <wang.ping5@zte.com.cn> update Signed-off-by: PingWang <wang.ping5@zte.com.cn> * zh-trans:/docs/reference/setup-tools/kubeadm/kubeadm-upgrade-phase.md (#16951) Signed-off-by: PingWang <wang.ping5@zte.com.cn> update Signed-off-by: PingWang <wang.ping5@zte.com.cn> update Signed-off-by: PingWang <wang.ping5@zte.com.cn> * Remove redundant symbol and fix some ordered list (#17000) Signed-off-by: PingWang <wang.ping5@zte.com.cn> update Signed-off-by: PingWang <wang.ping5@zte.com.cn> * update-zh-translation/docs/reference/setup-tools/kubeadm/kubeadm-init.md (#16997) * update zh translation kubeadm-reset.md kubeadm-upgrade.md (#16992) * Create kubeadm_join_phase_control-plane-join_all.md (#16987) * Update web-ui-dashboard.md (#16976) * update format problem (#16956) Signed-off-by: PingWang <wang.ping5@zte.com.cn> update Signed-off-by: PingWang <wang.ping5@zte.com.cn> * zh-trans:/docs/docs/concepts/storage/volume-pvc-datasource.md (#17021) * update zh translation /docs/reference/access-authn-authz/webhook.md (#16860) * fix confict update zh translation (#16863) * zh-trans:/docs/concepts/workloads/pods/disruptions.md (#16983) * zh-trans:/docs/concepts/workloads/pods/disruptions.md * Update content/zh/docs/concepts/workloads/pods/disruptions.md Co-Authored-By: Qiming <tengqim@cn.ibm.com> * update zh translation content/zh/docs/reference/command-line-tools-reference/kube-scheduler.md (#17006) * Update RC's link (#16935) Signed-off-by: PingWang <wang.ping5@zte.com.cn> Update Signed-off-by: PingWang <wang.ping5@zte.com.cn> update the style Signed-off-by: PingWang <wang.ping5@zte.com.cn> * Update the links for /zh/docs/setup (#16938) Signed-off-by: PingWang <wang.ping5@zte.com.cn> * zh-trans:/docs/docs/concepts/services-networking/dual-stack.md (#17024) * update zh translation /reference/setup-tools/kubeadm/generated/kubeadm.md (#17036) * update zh tanslation /reference/setup-tools/kubeadm/generated/kubeadm_alpha_kubelet_config_download.md (#17037) * update zh translation -/reference/setup-tools/kubeadm/generated/kubeadm_alpha.md (#17038) * update zh translation /docs/contribute/participating.md (#17040) * Fix cri-o's links to match English docs (#16936) Signed-off-by: PingWang <wang.ping5@zte.com.cn> * update zh translation content/zh/docs/reference/kubectl/jsonpath.md (#16862) * update zh translation /docs/reference/setup-tools/kubeadm/generated/kubeadm_token_generate.md (#17049) * update Unkown -> Unknown (#17062) * zh-translation:high-availability.md (#16960) Signed-off-by: yuxiaobo <yuxiaobogo@163.com> * update Runnning -> Running (#17061) * zh-trans:/docs/docs/concepts/storage/volume-snapshots.md (#17054) * update zh transation /docs/reference/setup-tools/kubeadm/generated/kubeadm_reset.md (#17060) * update zh translation /docs/reference/setup-tools/kubeadm/generated/kubeadm_token_create.md (#17052) * update zh translation /docs/reference/setup-tools/kubeadm/generated/kubeadm_token.md (#17055) * update zh translation update-zh-translation-/docs/reference/setup-tools/kubeadm/generated/kubeadm_token_list.md (#17048) * update zh-translation:ha-topology.md (#17099) Signed-off-by: yuxiaobo <yuxiaobogo@163.com> * zh-trans /reference/setup-tools/kubeadm/generated/kubeadm_config_images_list.md (#17093) * update zh translation /reference/setup-tools/kubeadm/generated/kubeadm_init_phase_certs_all.md (#17083) * Add Chinese translation for scheduler-perf-tuning (#17087) Signed-off-by: GeorgeSen <wang.sen2@zte.com.cn> Add Chinese translation for scheduler-perf-tuning Signed-off-by: GeorgeSen <wang.sen2@zte.com.cn> Add Chinese translation for scheduler-perf-tuning Signed-off-by: GeorgeSen <wang.sen2@zte.com.cn> Add Chinese translation for scheduler-perf-tuning Signed-off-by: GeorgeSen <wang.sen2@zte.com.cn> * zh trans content/zh/docs/setup/production-environment/tools/kubeadm/control-plane-flags.md (#17121) * update zh trans content/zh/docs/tasks/access-application-cluster/service-access-application-cluster.md (#17122) * zh-translation:content/zh/docs/tasks/administer-cluster/namespaces-walkthrough.md (#17105) Signed-off-by: yuxiaobo <yuxiaobogo@163.com> * update-zh-translation-/docs/reference/setup-tools/kubeadm/generated/kubeadm_config_migrate.md (#17091) * update zh trans /docs/setup/learning-environment/minikube.md (#17143) * update zh trans /zh/docs/reference/_index.md (#17146) * update zh trans /docs/tasks/access-application-cluster/port-forward-access-application-cluster.md (#17134) * update zh translation 20191020-update-zh-translation-/docs/contribute/localization.md (#17046) * update zh trans /docs/reference/using-api/client-libraries.md (#17144) * update zh trans /docs/reference/setup-tools/kubeadm/generated/kubeadm_version.md (#17145) * update zh /docs/reference/setup-tools/kubeadm/generated/kubeadm_upgrade_node.md (#17131) * update zh translation /reference/setup-tools/kubeadm/generated/kubeadm_init_phase_certs_front-proxy-client.md (#17081) * update zh translation /docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_kubeconfig.md (#17078) * add zh translation /docs/reference/setup-tools/kubeadm/generated/kubeadm_join_phase_control-plane-join_update-status.md (#17076) * update zh trans content/zh/docs/contribute/generate-ref-docs/kubectl.md (#17165) * update zh translation /reference/command-line-tools-reference/kube-proxy.md (#17107) * zh-trans:/docs/docs/concepts/workloads/pods/pod-topology-spread-const… (#16955) * zh-trans:/docs/docs/concepts/workloads/pods/pod-topology-spread-constraints.md * Update pod-topology-spread-constraints.md * zh-trans:/docs/concepts/configuration/scheduling-framework.md (#17088) * update zh translation /docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_upload-config_kubelet.md (#17079) * update zh translation /docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_control-plane_apiserver.md (#17077) * update zh translation /docs/reference/setup-tools/kubeadm/generated/kubeadm_join_phase_control-plane-join.md (#17075) * update zh translation /docs/reference/setup-tools/kubeadm/generated/kubeadm_token_delete.md (#17050) * update zh trans /docs/concepts/overview/working-with-objects/namespaces.md (#17205) * update zh trans /docs/concepts/overview/what-is-kubernetes.md (#17203) * pr_release-1.16_crictl (#17201) * update zh docs/tasks/administer-cluster/dns-debugging-resolution.md (#17186) * update zh trans content/zh/docs/concepts/overview/working-with-objects/field-selectors.md (#17191) * translate configure_upgrade_etcd (#17160) * translate kubeadm_upgrade_apply (#17159) * update zh /docs/tasks/job/coarse-parallel-processing-work-queue.md (#17155) * translate docs/setup/release/version-skew-policy.md to Chinese (#17142) * update zh trans content/zh/docs/tasks/access-application-cluster/create-external-load-balancer.md (#17124) * zh-trans replace the wrong translation (#17103) zh-trans replace the wrong translation * Merged 1.14~1.16 changes (#17117) * zh-trans:/docs/concepts/configuration/assign-pod-node.md (#17129) * update zh trans /docs/contribute/generate-ref-docs/kubernetes-api.md (#17161) * pr_release-1.16_basic-ss (#17169) * Add zh-trans of assign-cpu-resource.md (#17063) Signed-off-by: heqg <he.qingguo@zte.com.cn> Add zh-trans of assign-cpu-resource.md Signed-off-by: heqg <he.qingguo@zte.com.cn> Add zh-trans of assign-cpu-resource.md Signed-off-by: heqg <he.qingguo@zte.com.cn> Add zh-trans of assign-cpu-resource.md Signed-off-by: heqg <he.qingguo@zte.com.cn> Add zh-trans of assign-cpu-resource.md Signed-off-by: heqg <he.qingguo@zte.com.cn> * update zh trans content/zh/docs/concepts/overview/working-with-objects/common-labels.md (#17193) * update zh translation /docs/contribute/intermediate.md (#17041) * zh-trans:docs/setup/production-environment/turnkey/tencent.md (#17207) * pr_release-1.16_mysql-wordpress-pv (#17202) * pr_release-1.16_reconfig-kubelet (#17200) * zh-trans:/docs/docs/concepts/workloads/controllers/jobs-run-completio… (#17020) * zh-trans:/docs/docs/concepts/workloads/controllers/jobs-run-completion.md * Update jobs-run-completion.md * Update jobs-run-completion.md * update zh trans content/zh/docs/concepts/extend-kubernetes/extend-cluster.md (#17212) * update zh trans content/zh/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation.md (#17213) * add zh trans /docs/reference/setup-tools/kubeadm/generated/kubeadm_join_phase_control-plane-prepare_kubeconfig.md (#17220) kubeadm_join_phase_control-plane-prepare_download-certs.md * add zh trans /reference/setup-tools/kubeadm/generated/kubeadm_init_phase_certs.md and /reference/setup-tools/kubeadm/generated/kubeadm_join_phase_control-plane-prepare.md (#17219) * update zh trans content/zh/docs/concepts/containers/images.md (#17216) * ZH-trans: add _index.md (#17214) * ZH-trans: add _index.md * add _index.md file * add _index.md files * pr_release-1.16_crd-versions (#17198) * update zh translation /docs/reference/setup-tools/kubeadm/generated/kubeadm_config_images_pull.md (#17092) * zh-trans /reference/setup-tools/kubeadm/generated/kubeadm_config_images.md (#17094) * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_addon_kube-proxy.md and content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_certs_sa.md (#17222) * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_join_phase_control-plane-prepare_all.md content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_join_phase_control-plane-prepare_certs.md (#17221) * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_addon_all.md (#17223) * 013 /docs/concepts/services networking/ingress.md (#17185) * x * update zh trans content/zh/docs/concepts/services-networking/ingress.md * zh-trans:/reference/setup-tools/kubeadm/generated/kubeadm_completion.md and kubeadm_config.md (#17097) * add zh trans reference/glossary/pod-lifecycle (#17226) * update zh-translation document (#17096) Signed-off-by: yuxiaobo <yuxiaobogo@163.com> * update zh-translation:setup-ha-etcd-with-kubeadm.md (#17098) Signed-off-by: yuxiaobo <yuxiaobogo@163.com> * add zh trans /docs/reference/setup-tools/kubeadm/generated/kubeadm_alpha_selfhosting.md and /docs/reference/setup-tools/kubeadm/generated/kubeadm_alpha_kubelet_config_enable-dynamic.md (#17227) * add zh trans /docs/reference/setup-tools/kubeadm/generated/kubeadm_alpha_kubeconfig_user.md and /docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_upload-config_kubeadm.md (#17228) * zh-translation:content/zh/docs/tasks/extend-kubectl/kubectl-plugins.md (#17089) Signed-off-by: yuxiaobo <yuxiaobogo@163.com> * update zh translation /docs/reference/setup-tools/kubeadm/generated/kubeadm_join.md (#17080) * update zh translation /reference/setup-tools/kubeadm/generated/kubeadm_config_view.md (#17085) * zh-translation:troubleshooting-kubeadm.md (#17069) Signed-off-by: yuxiaobo <yuxiaobogo@163.com> * zh-trans: docs/concepts/scheduling/kube-scheduler.md (#17067) * Add Chinese translation for kube-scheduler Signed-off-by: GeorgeSen <wang.sen2@zte.com.cn> Add Chinese translation for kube-scheduler Signed-off-by: GeorgeSen <wang.sen2@zte.com.cn> Add Chinese translation for kube-scheduler Signed-off-by: GeorgeSen <wang.sen2@zte.com.cn> Add Chinese translation for kube-scheduler Signed-off-by: GeorgeSen <wang.sen2@zte.com.cn> Add Chinese translation for kube-scheduler Signed-off-by: GeorgeSen <wang.sen2@zte.com.cn> Add Chinese translation for kube-scheduler Signed-off-by: GeorgeSen <wang.sen2@zte.com.cn> Add Chinese translation for kube-scheduler Signed-off-by: GeorgeSen <wang.sen2@zte.com.cn> Add Chinese translation for kube-scheduler Signed-off-by: GeorgeSen <wang.sen2@zte.com.cn> * Update kube-scheduler.md * Add Chinese translation for kube-scheduler * Update kube-scheduler.md * Update kube-scheduler.md * Update kube-scheduler.md * translate pods.md and init-containers.md for branch release-1.16 (#17208) * update zh translation /docs/contribute/start.md (#17039) * zh-translation:2017-10-00-Five-Days-Of-Kubernetes-18.md (#17229) Signed-off-by: yuxiaobo <yuxiaobogo@163.com> * translate kubeadm-certs.md (#17090) * update the Illegal comment such as : (<!--、<--) (#17266) * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase.md and content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_certs_etcd-ca.md (#17268) * update zh /docs/concepts/architecture/cloud-controller.md (#17263) * update zh /docs/concepts/cluster-administration/logging.md (#17247) * modify the show of zh translation /concepts/overview/what-is-kubernetes.md /reference/setup-tools/kubeadm/generated/kubeadm_init.md /reference/setup-tools/kubeadm/kubeadm-init.md (#17246) * zh-translation:kubeadm_init_phase_control-plane_all.md (#17243) Signed-off-by: yuxiaobo <yuxiaobogo@163.com> * zh-translation:kubeadm_join_phase_control-plane-join_etcd.md (#17236) Signed-off-by: yuxiaobo <yuxiaobogo@163.com> * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_kubelet-start.md and content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_upload-certs.md (#17230) * add content/zh/docs/reference/glossary/container-runtime.md file fix-up to pass the ci and trans content/zh/docs/reference/glossary/container-runtime.md、content/zh/docs/concepts/overview/components.md (#17211) * zh-translation:mirror-pod.md (#17231) Signed-off-by: yuxiaobo <yuxiaobogo@163.com> * zh-translation:kubeadm_init_phase_upload-config.md (#17238) Signed-off-by: yuxiaobo <yuxiaobogo@163.com> * update zh /docs/concepts/workloads/pods/pod-overview.md (#17239) * update the format of zh translation content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_reset.md content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_upgrade.md content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_upgrade_apply.md content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_upgrade_plan.md content/zh/docs/reference/setup-tools/kubeadm/kubeadm-config.md content/zh/docs/reference/setup-tools/kubeadm/kubeadm-reset.md content/zh/docs/reference/setup-tools/kubeadm/kubeadm-token.md content/zh/docs/reference/setup-tools/kubeadm/kubeadm-upgrade.md (#17248) * Create advanced.md (#17256) * Create advanced.md * trans the advanced.md and fix the build bugs * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_control-plane.md and content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_control-plane_scheduler.md (#17269) * zh-translation:kubelet-integration.md (#17272) Signed-off-by: yuxiaobo <yuxiaobogo@163.com> * pr_release-1.16_out-of-resource (#17199) * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_certs_front-proxy-ca.md and content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_control-plane_controller-manager.md (#17267) * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_certs_etcd-peer.md and content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_kubeconfig_admin.md (#17271) * pr_release-1.16_ext-admission-ctl (#17196) * update zh translation /docs/contribute/advanced.md (#17042) * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_certs_apiserver-etcd-client.md and content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_certs_ca.md (#17275) * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_config_print.md update zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_config.md、content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_config_print_init-defaults.md (#17282) * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated… (#17287) * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_etcd.md content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_upload-config_all.md update zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_control-plane.md * Update kubeadm_init_phase_etcd.md * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/… (#17285) * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_alpha_certs_renew_etcd-server.md content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_alpha_kubelet.md update zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_alpha_certs_renew_apiserver.md * Update kubeadm_alpha_kubelet.md * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_alpha_certs_renew_all.md and content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_addon.md fix-up bad comment kubeadm_alpha_certs_renew.md、kubeadm_alpha_certs_renew_apiserver-etcd-client.md、kubeadm_init_phase_addon_all.md (#17276) * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/… (#17281) * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_etcd_local.md and content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_config_print_join-defaults.md * Update kubeadm_init_phase_etcd_local.md * zh trans update-daemon-set.md (#16872) * zh trans update-daemon-set.md * Update update-daemon-set.md * managing-tls-in-a-cluster.md (#16874) * update-api-object-kubectl-patch.md (#16875) * improve the zh trans /kubeadm/generated/kubeadm_init_phase_.* 1 (#17295) * improve the zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_config_.* (#17294) * modify the zh translation content/zh/docs/reference/setup-tools/kubea… (#17293) * modify the zh translation content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_alpha_.* * Update kubeadm_alpha.md * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_kubeconfig_all.md and content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_preflight.md (#17280) * add zh /docs/reference/glossary/cgroup.md (#17291) * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_alpha_kubelet_config.md、content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_certs_apiserver-kubelet-client.md (#17288) * improve zh trans of command in /kubeadm/generated/kubeadm_init_phase_.* files (#17297) * improve zh command translation /kubeadm/generated/kubeadm_init_.* files (#17298) * update zh trans in /kubeadm/generated/kubeadm_.* files (#17306) * add zh trans /reference/setup-tools/kubeadm/generated/kubeadm_alpha_certs_renew_etcd-healthcheck-client.md、/reference/setup-tools/kubeadm/generated/kubeadm_alpha_certs_renew_etcd-peer.md、/reference/setup-tools/kubeadm/generated/kubeadm_alpha_kubeconfig.md (#17308) * Improve previously translated documents (#17327) Signed-off-by: yuxiaobo <yuxiaobogo@163.com> * zh-trans: docs/setup/production-environment/turnkey/aws.md (#17320) * Update zh.toml * update zh trans /generated/kubeadm_join_phase_.* files (#17301) * Update zh.toml * add zh /docs/reference/glossary/pod-disruption-budget.md (#17344) * pr_release-1.16_config-aggregation-layer (#17197) * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_alpha_certs_renew_controller-manager.conf.md、content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_alpha_certs_renew_scheduler.conf.md (#17390) * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_kubeconfig_scheduler.md、content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_join_phase.md、content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_join_phase_control-plane-prepare_control-plane.md (#17381) * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_alpha_certs_renew_apiserver-kubelet-client.md、content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_join_phase_control-plane-join_mark-control-plane.md、content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_join_phase_kubelet-start.md (#17380) * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_addon_coredns.md、content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_bootstrap-token.md、content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_certs_apiserver.md (#17383) * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_alpha_certs_certificate-key.md、content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_reset_phase_preflight.md、content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_reset_phase_update-cluster-status.md (#17385) * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_alpha_certs_renew_admin.conf.md、content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_reset_phase.md、content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_reset_phase_cleanup-node.md (#17387) * add zh trans content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_alpha_certs_renew_apiserver-kubelet-client.md、content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_alpha_certs_renew_front-proxy-client.md、content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_alpha_selfhosting_pivot.md (#17384) * add zh /docs/reference/glossary/limitrange.md (#17324) * add zh trans content/zh/docs/setup/best-practices/cluster-large.md (#17321) * add zh trans content/zh/docs/setup/best-practices/cluster-large.md * Update cluster-large.md * add zh trans /docs/reference/setup-tools/kubeadm/kubeadm-alpha.md、/do… (#17403) * add zh trans /docs/reference/setup-tools/kubeadm/kubeadm-alpha.md、/docs/reference/setup-tools/kubeadm/generated/kubeadm_join_phase_preflight.md、/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_certs_etcd-server.md * Update kubeadm_init_phase_certs_etcd-server.md * add zh /docs/reference/glossary/cluster-operations.md (#17300) * add zh /docs/reference/glossary/applications.md (#17419) * update zh trans kubelet (#17379) * update zh trans kubelet * update the file according to feedback from reviewer tengqm * update 1000-1757 lines * update the advice zh trans * add zh /docs/reference/glossary/static-pod.md (#17418) * add zh /docs/reference/glossary/preemption.md (#17423) * add zh /docs/reference/glossary/pod-priority.md (#17421) * add zh /docs/reference/glossary/control-plane.md (#17425) * add zh /docs/reference/glossary/cluster-infrastructure.md (#17424) * pr_release-1.16_api-overview (#17444) * pr_release-1.16_daemonset (#17435) * pr_release-1.16_gc (#17445) * pr_release-1.16_qos-class (#17442) * fix QoS Class to QoS 类 (#17464) * pr_release-1.16-abac (#17427) * zh-trans:docs/setup/production-environment/turnkey/alibaba-cloud.md (#17345) * pr_release-1.16_endpoint-slice (#17468) * pr_release-1.16_taint (#17469) * pr_release-1.16_operator-pattern (#17467) * pr_release-1.16_ss (#17433) * pr_release-1.16_admission-controller (#17440) * pr_release-1.16_containerd (#17441) * pr_release-1.16_app-container (#17466) * add zh-trans content/zh/docs/setup/_index.md、content/zh/docs/setup/release/_index.md (#17503) * pr-release-1.16_enabling-endpoint-slices (#17504) * update zh trans content/zh/docs/reference/setup-tools/kubeadm/kubeadm… (#17495) * update zh trans content/zh/docs/reference/setup-tools/kubeadm/kubeadm-upgrade-phase.md、content/zh/docs/reference/setup-tools/kubeadm/kubeadm-init-phase.md * add content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_kubeconfig_kubelet.md * pr-release-1.16_logging (#17491) * pr-release-1.16_cri (#17486) * add zh-trans:docs/setup/production-environment/turnkey/azure.md (#17482) * pattern translate into 模式 (#17485) * fix zk affinity description in zh trans (#17393) * pr-release-1.16_ephemeral-container (#17487) * pr-release-1.16_data-plane (#17489) * pr-release-1.16_cncf (#17490) * zh-trans add content\zh\docs\tools\install-minikube.md (#16920) * zh-trans add content\zh\docs\tools\install-minikube.md * zh-trans update content\zh\docs\tools\install-minikube.md * zh-trans update content\zh\docs\tools\install-minikube.md * update \docs\tasks\tools\install-minikube.md * update docs\concepts\workloads\controllers\deployment.md * update deployment.md * pr-release-1.16_extensions (#17492) * pr-release-1.16_toleration (#17493) * Revert "update zh trans content/zh/docs/reference/setup-tools/kubeadm/kubeadm… (#17495)" (#17521) This reverts commit 1134c14e0a39bdc3d1a920ac9797139a6dcccf4b. * motidy extensions in content/zh/docs/reference/glossary/extensions (#17524) * motidy toleration in content/zh/docs/reference/glossary/toleration.md (#17523) * motidy toleration in content/zh/docs/reference/glossary/toleration.md * Update toleration.md * improve zh-trans in content/zh/docs/setup/_index.md (#17526) * add zh-trans /zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init_phase_kubeconfig_kubelet.md (#17527) * Broken Link (#17546) Issue available at https://kubernetes.io/zh/docs/concepts/containers/runtime-class/ and introduced by original English documentation (see #17543) * Update trans kubeadm_upgrade_plan.md (#17395) * Update kubeadm_upgrade_plan.md * Update kubeadm_upgrade_plan.md * Update kubeadm_upgrade_plan.md * Update kubeadm_upgrade_plan.md * Update kubeadm_upgrade_plan.md * Update kubeadm_upgrade_plan.md * update zh-trans of define-command-argument-container.md (#17022) Signed-off-by: Yixiang2019 <wang.yixiang@zte.com.cn> update zh-trans of define-command-argument-container.md Signed-off-by: Yixiang2019 <wang.yixiang@zte.com.cn> Add back the Original English Signed-off-by: Yixiang2019 <wang.yixiang@zte.com.cn> update title of define-command-argument-container.md Signed-off-by: Yixiang2019 <wang.yixiang@zte.com.cn> update table title and reference Signed-off-by: Yixiang2019 <wang.yixiang@zte.com.cn> update reference of define-command-argument-container.md Signed-off-by: Yixiang2019 <wang.yixiang@zte.com.cn> * ZH-trans: fix multiple jump links and update files (#17603) * ZH-trans: fix multiple jump links and update files * Update _index.html * update zh trans content/zh/docs/reference/setup-tools/kubeadm/kubeadm-init-phase.md (#17528) * update zh trans /doc/concepts/architecture/nodes.md (#17617) * update zh trans content/zh/docs/concepts/architecture/nodes.md * fix-up content/zh/docs/concepts/architecture/nodes.md * add zh-trans /docs/setup/release/notes.md (#17519) * add zh-trans /docs/setup/release/notes.md update-750 * fix-up 1575 line and udpate 2483 line * update to line 2980 * update to the last line 3160 * add zh-trans:docs/setup/production-environment/turnkey/icp.md (#17568) * zh-trans: /docs/setup/production-environment/container-runtimes.md (#17646) * zh-trs:container-runtimes.md Signed-off-by: yuxiaobo <yuxiaobogo@163.com> * Update container-runtimes.md * Translate /docs/concepts/workloads/controllers/ttlafterfinished.md into Chinese (#17791) * Translate /docs/concepts/cluster-administration/cloud-providers.md into Chinese * Translate /docs/concepts/workloads/controllers/ttlafterfinished.md into Chinese * Sorry, wrong commit, roll back... * Translate /docs/concepts/workloads/controllers/ttlafterfinished.md * Translate /docs/concepts/workloads/controllers/ttlafterfinished.md into Chinese * Translate /docs/concepts/workloads/controllers/ttlafterfinished.md into Chinese * Create trans kubeadm_upgrade_diff.md (#17392) * Update kubeadm_upgrade_diff.md * Update kubeadm_upgrade_diff.md * Update kubeadm_upgrade_diff.md * Create _index.md (#17831) * zh-trans zh-trans-/docs/reference/command-line-tools-reference/feature-gates.md (#17658) * Update volume-snapshots.md (#17829) * Update volume-snapshots.md * Update volume-snapshots.md * Update volume-snapshots.md * Create ovirt.md (#17849) * Create ovirt.md * Update ovirt.md * Translate /docs/concepts/cluster-administration/cloud-providers.md into Chinese (#17761) * Translate /docs/concepts/cluster-administration/cloud-providers.md into Chinese * Translate /docs/concepts/workloads/controllers/ttlafterfinished.md into Chinese * Sorry, wrong commit, roll back... * Update translation after tengqm's review. * Update cloud-providers.md * Update dual-stack.md (#17836) * Update dual-stack.md * Update dual-stack.md * Update dual-stack.md * Update dual-stack.md * Create validate-dual-stack.md (#17833) * Create validate-dual-stack.md * Update validate-dual-stack.md * translation content/zh/docs/reference/setup-tools/kubeadm/ kubeadm-join-phase、kubeadm-reset-phase (#17881) * zh-trans content/zh/docs/contribute/generate-ref-docs/contribute-upstream.md (#17882) * Chinese translation /docs/tasks/administer-cluster/highly-available-master.md (#17884) * Chinese translation /docs/tasks/administer-cluster/highly-available-master.md * Apply suggestions from code review Co-Authored-By: Qiming <tengqim@cn.ibm.com> * Fix format issue (#17921) * Create topology-manager.md (#17901) * Create topology-manager.md * Update topology-manager.md * add zh-trans:docs/setup/production-environment/windows/user-guide-windows-containers.md (#17876) * Update pod-overhead.md (#17931) * Update scheduler-perf-tuning.md (#17934) * Create dcos.md (#17932) * Create dcos.md * Update dcos.md * Update object-management.md (#17937) * zh-translation content/zh/docs/setup/production-environment/tools/kops.md (#17991) * Create imperative-config.md (#17956) * Create imperative-config.md * Update imperative-config.md * Create self-hosting.md (#17950) * Create resource-bin-packing.md (#17935) * Create nodelocaldns.md (#17938) * Update config.toml(release-1.16) for 1.17 (#18025) * Update config.toml(release-1.16) for 1.17 * Update config.toml * Remove ru language * Update the conflict and merge the two commits * add nginx-deployment.yaml file Co-authored-by: ZhongliangXiong <xiong.zhongliang@zte.com.cn> Co-authored-by: Yixiang Wang <wang.yixiang@zte.com.cn> Co-authored-by: li mengyang <hwdef97@gmail.com> Co-authored-by: PingWang <wang.ping5@zte.com.cn> Co-authored-by: chentanjun <tanjunchen20@gmail.com> Co-authored-by: Sophy417 <53026875+Sophy417@users.noreply.github.com> Co-authored-by: zhangx501 <zhang0000xun@gmail.com> Co-authored-by: Qiming <tengqim@cn.ibm.com> Co-authored-by: yuxiaobo96 <41496192+yuxiaobo96@users.noreply.github.com> Co-authored-by: senwang <wang.sen2@zte.com.cn> Co-authored-by: lichuqiang <lichuqiang@huawei.com> Co-authored-by: lpf7551321 <liupengfei20@huawei.com> Co-authored-by: Hongcai Ren <renhongcai@huawei.com> Co-authored-by: jiajie <jiaj12@chinaunicom.cn> Co-authored-by: heqg <56527988+heqg@users.noreply.github.com> Co-authored-by: IreneByron <zhangbingqing7@huawei.com> Co-authored-by: Wang Bing <wangbing.adam@gmail.com> Co-authored-by: Damini Satya <daminisatya@gmail.com> Co-authored-by: liufangwai <liufangwai@huawei.com> Co-authored-by: wangcong <congfairy2536@gmail.com> Co-authored-by: XuefeiWang2 <wangxuefei2@huawei.com> Co-authored-by: Kubernetes Prow Robot <k8s-ci-robot@users.noreply.github.com> Co-authored-by: Ziqiu Zhu <zzqshu@126.com> Co-authored-by: ten2ton <50288981+ten2ton@users.noreply.github.com> Co-authored-by: Oleg Butuzov <butuzov@users.noreply.github.com> Co-authored-by: jiazxjason <52809535+jiazxjason@users.noreply.github.com> Co-authored-by: Coffey Gao <coffiney@qq.com> Co-authored-by: Bingshen Wang <bingshen.wbs@alibaba-inc.com>
695 lines
29 KiB
Markdown
695 lines
29 KiB
Markdown
---
|
||
title: 在实时集群上重新配置节点的 Kubelet
|
||
content_template: templates/task
|
||
---
|
||
|
||
<!--
|
||
|
||
---
|
||
reviewers:
|
||
- mtaufen
|
||
- dawnchen
|
||
title: Reconfigure a Node's Kubelet in a Live Cluster
|
||
content_template: templates/task
|
||
---
|
||
|
||
-->
|
||
|
||
{{% capture overview %}}
|
||
|
||
{{< feature-state for_k8s_version="v1.11" state="beta" >}}
|
||
|
||
<!--
|
||
[Dynamic Kubelet Configuration](https://github.com/kubernetes/enhancements/issues/281)
|
||
allows you to change the configuration of each Kubelet in a live Kubernetes
|
||
cluster by deploying a ConfigMap and configuring each Node to use it.
|
||
-->
|
||
[动态Kubelet配置](https://github.com/kubernetes/enhancements/issues/281)
|
||
引导你在一个运行的 Kubernetes 集群上更改每一个 Kubelet 的配置,通过部署 ConfigMap 并配置每个节点来使用它。
|
||
|
||
{{< warning >}}
|
||
<!--
|
||
All Kubelet configuration parameters can be changed dynamically,
|
||
but this is unsafe for some parameters. Before deciding to change a parameter
|
||
dynamically, you need a strong understanding of how that change will affect your
|
||
cluster's behavior. Always carefully test configuration changes on a small set
|
||
of nodes before rolling them out cluster-wide. Advice on configuring specific
|
||
fields is available in the inline `KubeletConfiguration`
|
||
[type documentation](https://github.com/kubernetes/kubernetes/blob/release-1.11/pkg/kubelet/apis/kubeletconfig/v1beta1/types.go).
|
||
-->
|
||
**警告**:所有Kubelet配置参数都可以动态地更改,但这对某些参数来说是不安全的。在决定动态更改参数之前,你需要深刻理解这种变化将如何影响你的集群的行为。
|
||
在把一组节点推广到集群范围之前,都要仔细地测试这些节点上的配置变化。与配置相关的建议可以在具体的文件下找到,内联 `KubeletConfiguration`
|
||
[类型文档](https://github.com/kubernetes/kubernetes/blob/release-1.11/pkg/kubelet/apis/kubeletconfig/v1beta1/types.go)。
|
||
{{< /warning >}}
|
||
|
||
{{% /capture %}}
|
||
|
||
{{% capture prerequisites %}}
|
||
<!--
|
||
- Kubernetes v1.11 or higher on both the Master and the Nodes
|
||
- kubectl v1.11 or higher, configured to communicate with the cluster
|
||
- The Kubelet's `--dynamic-config-dir` flag must be set to a writable
|
||
directory on the Node.
|
||
-->
|
||
|
||
- Kubernetes v1.11 或者更高版本配置在主节点和节点上
|
||
- kubectl v1.11 或者更高版本和集群配置通信
|
||
- The Kubelet `--dynamic-config-dir` flag 必须设置在节点的可写目录上
|
||
|
||
{{% /capture %}}
|
||
|
||
{{% capture steps %}}
|
||
|
||
<!-- ## Reconfiguring the Kubelet on a Live Node in your Cluster -->
|
||
## 在你集群中的一个实时节点上配置Kubelet
|
||
|
||
<!-- ### Basic Workflow Overview -->
|
||
### 基本工作流程概述
|
||
|
||
<!--
|
||
The basic workflow for configuring a Kubelet in a live cluster is as follows:
|
||
|
||
1. Write a YAML or JSON configuration file containing the
|
||
Kubelet's configuration.
|
||
2. Wrap this file in a ConfigMap and save it to the Kubernetes control plane.
|
||
3. Update the Kubelet's corresponding Node object to use this ConfigMap.
|
||
-->
|
||
在实时集群中配置 Kubelet 的基本工作流程如下:
|
||
|
||
1. 编写一个 YAML 或 JSON 的配置文件包含 Kubelet 的配置。
|
||
2. 将此文件包装在 ConfigMap 中并将其保存到 Kubernetes 控制平面。
|
||
3. 更新 Kubelet 的相应节点对象以使用此 ConfigMap。
|
||
|
||
<!--
|
||
Each Kubelet watches a configuration reference on its respective Node object.
|
||
When this reference changes, the Kubelet downloads the new configuration,
|
||
updates a local reference to refer to the file, and exits.
|
||
For the feature to work correctly, you must be running an OS-level service
|
||
manager (such as systemd), which will restart the Kubelet if it exits. When the
|
||
Kubelet is restarted, it will begin using the new configuration.
|
||
-->
|
||
每个 Kubelet 都会在其各自的节点对象上查看配置引用。当此引用更改时,Kubelet 将下载新配置,
|
||
更新本地引用以引用该文件,然后退出。
|
||
要想使该功能正常地工作,您必须运行操作系统级别的服务管理器(如systemd),如果退出,将重启Kubelet。
|
||
当Kubelet重新启动时,它将开始使用新配置。
|
||
|
||
<!--
|
||
The new configuration completely overrides configuration provided by `--config`,
|
||
and is overridden by command-line flags. Unspecified values in the new configuration
|
||
will receive default values appropriate to the configuration version
|
||
(e.g. `kubelet.config.k8s.io/v1beta1`), unless overridden by flags.
|
||
-->
|
||
这个新配置完全地覆盖 `--config` 所提供的配置,并被命令行标志覆盖。新配置中未指定的值将收到适合配置版本的默认值
|
||
(e.g. `kubelet.config.k8s.io/v1beta1`),除非被标志覆盖。
|
||
|
||
<!--
|
||
The status of the Node's Kubelet configuration is reported via
|
||
`Node.Spec.Status.Config`. Once you have updated a Node to use the new
|
||
ConfigMap, you can observe this status to confirm that the Node is using the
|
||
intended configuration.
|
||
-->
|
||
这个节点的 Kubelet 配置状态通过命令 `Node.Spec.Status.Config` 获取。一旦您已经改变了一个节点去使用新的 ConfigMap ,
|
||
您就可以观察此状态以确认这个节点正在使用的预期配置。
|
||
|
||
<!--
|
||
This document describes editing Nodes using `kubectl edit`.
|
||
There are other ways to modify a Node's spec, including `kubectl patch`, for
|
||
example, which facilitate scripted workflows.
|
||
-->
|
||
这个文档描述编辑节点信息用命令 `kubectl edit`,还有一些其他的方式去修改节点的规范,包括命令 `kubectl patch`,
|
||
例如,哪一个更利于脚本化的工作流程。
|
||
|
||
<!--
|
||
This document only describes a single Node consuming each ConfigMap. Keep in
|
||
mind that it is also valid for multiple Nodes to consume the same ConfigMap.
|
||
-->
|
||
这个文档仅仅讲述了在单节点上使用每一个 ConfigMap。请注意对于多个节点使用相同的 ConfigMap 也是有效的。
|
||
|
||
{{< warning >}}
|
||
<!--
|
||
While it is *possible* to change the configuration by
|
||
updating the ConfigMap in-place, this causes all Kubelets configured with
|
||
that ConfigMap to update simultaneously. It is much safer to treat ConfigMaps
|
||
as immutable by convention, aided by `kubectl`'s `--append-hash` option,
|
||
and incrementally roll out updates to `Node.Spec.ConfigSource`.
|
||
-->
|
||
**警告**:通过更新本地的 ConfigMap *有可能* 会改变配置信息,这样会导致所有 Kubelets 所配置的 ConfigMap 同步更新。
|
||
它是更安全的去处理 ConfigMap 按照惯例不变,借助于 `kubectl`'s `--append-hash` 选项,并逐步把更新推广到 `Node.Spec.ConfigSource`。
|
||
{{< /warning >}}
|
||
|
||
<!-- ### Automatic RBAC rules for Node Authorizer -->
|
||
### 节点授权器的自动RBAC规则
|
||
|
||
<!--
|
||
Previously, you were required to manually create RBAC rules
|
||
to allow Nodes to access their assigned ConfigMaps. The Node Authorizer now
|
||
automatically configures these rules.
|
||
-->
|
||
以前,您需要手动创建RBAC规则允许节点访问其分配的ConfigMaps。 节点授权器现在
|
||
自动地配置这些规则。
|
||
|
||
<!-- ### Generating a file that contains the current configuration -->
|
||
### 生成包含当前配置的文件
|
||
|
||
<!--
|
||
The Dynamic Kubelet Configuration feature allows you to provide an override for
|
||
the entire configuration object, rather than a per-field overlay. This is a
|
||
simpler model that makes it easier to trace the source of configuration values
|
||
and debug issues. The compromise, however, is that you must start with knowledge
|
||
of the existing configuration to ensure that you only change the fields you
|
||
intend to change.
|
||
-->
|
||
动态 Kubelet 配置特性允许您提供覆盖对于整个配置对象,而不是每个字段的叠加。 这是一个
|
||
更简单的模型,可以更轻松地跟踪配置值的来源和调试问题。 然而,妥协是你必须从现有配置的认识开始,
|
||
以确保您只更改您打算修改的字段。
|
||
|
||
<!--
|
||
Ideally, the Kubelet would be bootstrapped from a file on disk
|
||
and you could edit this file (which could also be version-controlled),
|
||
to create the first Kubelet ConfigMap
|
||
(see [Set Kubelet parameters via a config file](/docs/tasks/administer-cluster/kubelet-config-file)),
|
||
Currently, the Kubelet is bootstrapped with **a combination of this file and command-line flags**
|
||
that can override the configuration in the file.
|
||
As a workaround, you can generate a config file containing a Node's current
|
||
configuration by accessing the Kubelet server's `configz` endpoint via the
|
||
kubectl proxy. This endpoint, in its current implementation, is intended to be
|
||
used only as a debugging aid. Do not rely on the of this endpoint for
|
||
production scenarios. The examples below use the `jq` command to streamline
|
||
working with JSON. To follow the tasks as written, you need to have `jq`
|
||
installed, but you can adapt the tasks if you prefer to extract the
|
||
`kubeletconfig` subobject manually.
|
||
-->
|
||
理想情况下,Kubelet 将被引导从磁盘上的一个文件,并且你可以编辑这个文件(也可以是版本控制的),
|
||
去创建第一个 Kubelet ConfigMap (参考文档 [通过配置文件设置Kubelet参数](/docs/tasks/administer-cluster/kubelet-config-file)),
|
||
目前,Kubelet 使用 **文件和命令行标志的组合** 进行引导来覆盖文件中的配置。
|
||
作为解决方法,您可以生成一个配置文件包含节点当前的组态,通过 kubectl 代理访问Kubelet服务器的 `configz` 端点。
|
||
该端点在其当前实现中,旨在被用来作为一个调试辅助工具。在生产环境下,不要依赖此端点的特性。
|
||
下面的例子使用 `jq` 命令来简化使用 JSON。按照所写的步骤,您需要安装 `jq` ,
|
||
但如果您喜欢手动提取 `kubeletconfig` 子对象,您也可以完成这个任务。
|
||
|
||
<!-- #### Generate the configuration file -->
|
||
#### 生成配置文件
|
||
|
||
<!--
|
||
1. Choose a Node to reconfigure. In this example, the name of this Node is
|
||
referred to as `NODE_NAME`.
|
||
2. Start the kubectl proxy in the background using the following command:
|
||
|
||
```bash
|
||
kubectl proxy --port=8001 &
|
||
```
|
||
|
||
3. Run the following command to download and unpack the configuration from the
|
||
`configz` endpoint. The command is long, so be careful when copying and
|
||
pasting. **If you use zsh**, note that common zsh configurations add backslashes
|
||
to escape the opening and closing curly braces around the variable name in the URL.
|
||
For example: `${NODE_NAME}` will be rewritten as `$\{NODE_NAME\}` during the paste.
|
||
You must remove the backslashes before running the command, or the command will fail.
|
||
|
||
```bash
|
||
NODE_NAME="the-name-of-the-node-you-are-reconfiguring"; curl -sSL "http://localhost:8001/api/v1/nodes/${NODE_NAME}/proxy/configz" | jq '.kubeletconfig|.kind="KubeletConfiguration"|.apiVersion="kubelet.config.k8s.io/v1beta1"' > kubelet_configz_${NODE_NAME}
|
||
```
|
||
-->
|
||
|
||
1. 选择一个节点去重新配置,在此示例中,此节点的名称为 `NODE_NAME`。
|
||
2. 使用以下命令在后台启动 kubectl 代理:
|
||
|
||
```bash
|
||
kubectl proxy --port=8001 &
|
||
```
|
||
|
||
3. 运行以下命令从 `configz` 端点中下载并解压配置。这个命令很长,因此在复制和黏贴时要小心。
|
||
**如果您使用 zsh**,请注意常见的 zsh 配置添加反斜杠转义 URL 中变量名称周围的大括号的开始和结束。
|
||
例如:在粘贴期间,`$ {NODE_NAME}` 将被重写为 `$\{NODE_NAME\}`。
|
||
您必须在运行命令之前删除反斜杠,否则命令将失败。
|
||
|
||
```bash
|
||
NODE_NAME="the-name-of-the-node-you-are-reconfiguring"; curl -sSL "http://localhost:8001/api/v1/nodes/${NODE_NAME}/proxy/configz" | jq '.kubeletconfig|.kind="KubeletConfiguration"|.apiVersion="kubelet.config.k8s.io/v1beta1"' > kubelet_configz_${NODE_NAME}
|
||
```
|
||
|
||
{{< note >}}
|
||
|
||
**注意**:You need to manually add the `kind` and `apiVersion` to the downloaded
|
||
object,because they are not reported by the `configz` endpoint。
|
||
您需要手动将 `kind` 和 `apiVersion` 添加到下载对象中,因为它们不是由 `configz` 端点报出的。
|
||
|
||
{{< /note >}}
|
||
|
||
<!-- #### Edit the configuration file -->
|
||
#### 修改配置文件
|
||
<!--
|
||
Using a text editor, change one of the parameters in the
|
||
file generated by the previous procedure. For example, you
|
||
might edit the QPS parameter `eventRecordQPS`.
|
||
-->
|
||
|
||
使用文本编辑器,在这个文件里,改变之前的程序生成的一个参数。例如,你或许会修改 QPS 参数 `eventRecordQPS`。
|
||
|
||
<!-- #### Push the configuration file to the control plane -->
|
||
#### 把配置文件推送到控制平面
|
||
|
||
<!--
|
||
Push the edited configuration file to the control plane with the
|
||
following command:
|
||
|
||
```bash
|
||
kubectl -n kube-system create configmap my-node-config --from-file=kubelet=kubelet_configz_${NODE_NAME} --append-hash -o yaml
|
||
```
|
||
-->
|
||
|
||
用以下命令把配置文件推送到控制平面:
|
||
|
||
```bash
|
||
kubectl -n kube-system create configmap my-node-config --from-file=kubelet=kubelet_configz_${NODE_NAME} --append-hash -o yaml
|
||
```
|
||
|
||
<!--
|
||
This is an example of a valid response:
|
||
|
||
```none
|
||
apiVersion: v1
|
||
kind: ConfigMap
|
||
metadata:
|
||
creationTimestamp: 2017-09-14T20:23:33Z
|
||
name: my-node-config-gkt4c2m4b2
|
||
namespace: kube-system
|
||
resourceVersion: "119980"
|
||
selfLink: /api/v1/namespaces/kube-system/configmaps/my-node-config-gkt4c2m4b2
|
||
uid: 946d785e-998a-11e7-a8dd-42010a800006
|
||
data:
|
||
kubelet: |
|
||
{...}
|
||
```
|
||
-->
|
||
这是一个有效响应的例子:
|
||
|
||
```none
|
||
apiVersion: v1
|
||
kind: ConfigMap
|
||
metadata:
|
||
creationTimestamp: 2017-09-14T20:23:33Z
|
||
name: my-node-config-gkt4c2m4b2
|
||
namespace: kube-system
|
||
resourceVersion: "119980"
|
||
selfLink: /api/v1/namespaces/kube-system/configmaps/my-node-config-gkt4c2m4b2
|
||
uid: 946d785e-998a-11e7-a8dd-42010a800006
|
||
data:
|
||
kubelet: |
|
||
{...}
|
||
```
|
||
|
||
<!--
|
||
The ConfigMap is created in the `kube-system` namespace because this
|
||
ConfigMap configures a Kubelet, which is Kubernetes system component.
|
||
-->
|
||
|
||
ConfigMap 是在 `kube-system` 命名空间中创建的,因为 ConfigMap 配置了 Kubelet,它是 Kubernetes 的系统组件。
|
||
|
||
<!--
|
||
The `--append-hash` option appends a short checksum of the ConfigMap contents
|
||
to the name. This is convenient for an edit-then-push workflow, because it
|
||
automatically, yet deterministically, generates new names for new ConfigMaps.
|
||
The name that includes this generated hash is referred to as `CONFIG_MAP_NAME`
|
||
in the following examples.
|
||
-->
|
||
|
||
`--append-hash` 选项给 ConfigMap 内容附加了一个简短校验和。这对于编辑然后推送工作流程很方便,因为它
|
||
自动并确定地为新 ConfigMaps 生成新的名称。在以下示例中,包含生成的哈希名称为 `CONFIG_MAP_NAME`。
|
||
|
||
<!-- #### Set the Node to use the new configuration -->
|
||
#### 用新配置创建新的节点
|
||
|
||
<!--
|
||
Edit the Node's reference to point to the new ConfigMap with the
|
||
following command:
|
||
|
||
```bash
|
||
kubectl edit node ${NODE_NAME}
|
||
```
|
||
|
||
In your text editor, add the following YAML under `spec`:
|
||
|
||
```yaml
|
||
configSource:
|
||
configMap:
|
||
name: CONFIG_MAP_NAME
|
||
namespace: kube-system
|
||
kubeletConfigKey: kubelet
|
||
```
|
||
-->
|
||
|
||
用下面的命令行编辑节点的参数来指向新的 ConfigMap:
|
||
|
||
```bash
|
||
kubectl edit node ${NODE_NAME}
|
||
```
|
||
|
||
<!-- In your text editor, add the following YAML under `spec`: -->
|
||
在您的文本编辑器中,在 `spec` 下增添以下 YAML:
|
||
|
||
```yaml
|
||
configSource:
|
||
configMap:
|
||
name: CONFIG_MAP_NAME
|
||
namespace: kube-system
|
||
kubeletConfigKey: kubelet
|
||
```
|
||
|
||
<!--
|
||
You must specify all three of `name`, `namespace`, and `kubeletConfigKey`.
|
||
The `kubeletConfigKey` parameter shows the Kubelet which key of the ConfigMap
|
||
contains its config.
|
||
-->
|
||
|
||
您必须指定这三个参数中的每一个`name`,`namespace`和`kubeletConfigKey`。
|
||
`kubeletConfigKey`这个参数显示出 Kubelet 上的哪个 key 包含了 ConfigMap 的配置。
|
||
|
||
<!-- #### Observe that the Node begins using the new configuration -->
|
||
#### 使用新配置监察节点
|
||
|
||
<!--
|
||
Retrieve the Node using the `kubectl get node ${NODE_NAME} -o yaml` command and inspect
|
||
`Node.Status.Config`. The config sources corresponding to the `active`,
|
||
`assigned`, and `lastKnownGood` configurations are reported in the status.
|
||
|
||
- The `active` configuration is the version the Kubelet is currently running with.
|
||
- The `assigned` configuration is the latest version the Kubelet has resolved based on
|
||
`Node.Spec.ConfigSource`.
|
||
- The `lastKnownGood` configuration is the version the
|
||
Kubelet will fall back to if an invalid config is assigned in `Node.Spec.ConfigSource`.
|
||
-->
|
||
|
||
用 `kubectl get node ${NODE_NAME} -o yaml` 命令回收节点并用命令 `Node.Status.Config` 检查节点状态配置。
|
||
在这个状态报告的配置里,对应这些配置源`active`,`assigned`和 `lastKnownGood`。
|
||
|
||
- `active` 是 Kubelet 当前运行的版本。
|
||
- `assigned` 参数是 Kubelet 基于 `Node.Spec.ConfigSource` 的最新版本。
|
||
- `lastKnownGood` 参数是 Kubelet 的回退版本,如果在 `Node.Spec.ConfigSource` 中分配了无效的配置。
|
||
|
||
<!--
|
||
The`lastKnownGood` configuration might not be present if it is set to its default value,
|
||
the local config deployed with the node. The status will update `lastKnownGood` to
|
||
match a valid `assigned` config after the Kubelet becomes comfortable with the config.
|
||
The details of how the Kubelet determines a config should become the `lastKnownGood` are
|
||
not guaranteed by the API, but is currently implemented as a 10-minute grace period.
|
||
-->
|
||
|
||
如果用本地的配置部署节点,使其设置成默认值,这个`lastKnownGood`配置可能不存在。
|
||
在 Kubelet 配置好后,将更新 `lastKnownGood` 去匹配一个有效的 `assigned` 配置。
|
||
判断如何配置 Kubelet 的细节是使`lastKnownGood`不受 API 限制,但目前实施为 10 分钟的宽限期。
|
||
|
||
<!--
|
||
You can use the following command (using `jq`) to filter down
|
||
to the config status:
|
||
|
||
```bash
|
||
kubectl get no ${NODE_NAME} -o json | jq '.status.config'
|
||
```
|
||
|
||
The following is an example response:
|
||
|
||
```json
|
||
{
|
||
"active": {
|
||
"configMap": {
|
||
"kubeletConfigKey": "kubelet",
|
||
"name": "my-node-config-9mbkccg2cc",
|
||
"namespace": "kube-system",
|
||
"resourceVersion": "1326",
|
||
"uid": "705ab4f5-6393-11e8-b7cc-42010a800002"
|
||
}
|
||
},
|
||
"assigned": {
|
||
"configMap": {
|
||
"kubeletConfigKey": "kubelet",
|
||
"name": "my-node-config-9mbkccg2cc",
|
||
"namespace": "kube-system",
|
||
"resourceVersion": "1326",
|
||
"uid": "705ab4f5-6393-11e8-b7cc-42010a800002"
|
||
}
|
||
},
|
||
"lastKnownGood": {
|
||
"configMap": {
|
||
"kubeletConfigKey": "kubelet",
|
||
"name": "my-node-config-9mbkccg2cc",
|
||
"namespace": "kube-system",
|
||
"resourceVersion": "1326",
|
||
"uid": "705ab4f5-6393-11e8-b7cc-42010a800002"
|
||
}
|
||
}
|
||
}
|
||
|
||
```
|
||
-->
|
||
您可以使用以下命令(using `jq`)过滤到配置状态:
|
||
|
||
```bash
|
||
kubectl get no ${NODE_NAME} -o json | jq '.status.config'
|
||
```
|
||
|
||
以下是一个响应示例:
|
||
|
||
```json
|
||
{
|
||
"active": {
|
||
"configMap": {
|
||
"kubeletConfigKey": "kubelet",
|
||
"name": "my-node-config-9mbkccg2cc",
|
||
"namespace": "kube-system",
|
||
"resourceVersion": "1326",
|
||
"uid": "705ab4f5-6393-11e8-b7cc-42010a800002"
|
||
}
|
||
},
|
||
"assigned": {
|
||
"configMap": {
|
||
"kubeletConfigKey": "kubelet",
|
||
"name": "my-node-config-9mbkccg2cc",
|
||
"namespace": "kube-system",
|
||
"resourceVersion": "1326",
|
||
"uid": "705ab4f5-6393-11e8-b7cc-42010a800002"
|
||
}
|
||
},
|
||
"lastKnownGood": {
|
||
"configMap": {
|
||
"kubeletConfigKey": "kubelet",
|
||
"name": "my-node-config-9mbkccg2cc",
|
||
"namespace": "kube-system",
|
||
"resourceVersion": "1326",
|
||
"uid": "705ab4f5-6393-11e8-b7cc-42010a800002"
|
||
}
|
||
}
|
||
}
|
||
|
||
```
|
||
|
||
<!--
|
||
If an error occurs, the Kubelet reports it in the `Node.Status.Config.Error`
|
||
structure. Possible errors are listed in
|
||
[Understanding Node.Status.Config.Error messages](#understanding-node-status-config-error-messages).
|
||
You can search for the identical text in the Kubelet log for additional details
|
||
and context about the error.
|
||
-->
|
||
|
||
如果发生错误,Kubelet 会在 `Node.Status.Config.Error` 中显示出它的结构体。可能的错误列在 [了解节点配置错误信息](#了解节点配置错误信息)。
|
||
您可以在 Kubelet 日志中搜索相同的文本以获取更多详细信息和有关错误的上下文。
|
||
|
||
<!-- #### Make more changes -->
|
||
#### 做出更多的改变
|
||
|
||
<!--
|
||
Follow the workflow above to make more changes and push them again. Each time
|
||
you push a ConfigMap with new contents, the --append-hash kubectl option creates
|
||
the ConfigMap with a new name. The safest rollout strategy is to first create a
|
||
new ConfigMap, and then update the Node to use the new ConfigMap.
|
||
-->
|
||
|
||
按照下面的工作流程做出更多的改变并再次推送它们。你每次推送一个 ConfigMap 的新内容时,--append-hash kubectl 选项都会给 ConfigMap 创建一个新的名称。
|
||
最安全的推出策略是首先创建一个新的 ConfigMap,然后更新 节点 以使用新的 ConfigMap。
|
||
|
||
<!-- #### Reset the Node to use its local default configuration -->
|
||
#### 重置节点以使用其本地默认配置
|
||
|
||
<!--
|
||
To reset the Node to use the configuration it was provisioned with, edit the
|
||
Node using `kubectl edit node ${NODE_NAME}` and remove the
|
||
`Node.Spec.ConfigSource` field.
|
||
-->
|
||
重置节点去使用已经配好的的配置,用 `kubectl edit node $ {NODE_NAME}` 命令编辑节点,并删除
|
||
`Node.Spec.ConfigSource` 字段。
|
||
|
||
<!-- #### Observe that the Node is using its local default configuration -->
|
||
#### 监察正在使用本地默认配置的节点
|
||
|
||
<!--
|
||
After removing this subfield, `Node.Status.Config` eventually becomes
|
||
empty, since all config sources have been reset to `nil`, which indicates that
|
||
the local default config is `assigned`, `active`, and `lastKnownGood`, and no
|
||
error is reported.
|
||
-->
|
||
在删除此字段后,`Node.Status.Config` 最终变成空,所有配置源都已重置为 `nil`,这表示
|
||
本地默认配置是`assigned`,`active` 和 `lastKnownGood`这三个参数,没有报告错误。
|
||
|
||
{{% /capture %}}
|
||
|
||
{{% capture discussion %}}
|
||
|
||
<!-- ## Kubectl Patch Example -->
|
||
## Kubectl 补丁示例
|
||
|
||
<!--
|
||
You can change a Node's configSource using several different mechanisms.
|
||
This example uses `kubectl patch`:
|
||
|
||
```bash
|
||
kubectl patch node ${NODE_NAME} -p "{\"spec\":{\"configSource\":{\"configMap\":{\"name\":\"${CONFIG_MAP_NAME}\",\"namespace\":\"kube-system\",\"kubeletConfigKey\":\"kubelet\"}}}}"
|
||
```
|
||
-->
|
||
|
||
您可以使用几种不同的机制来更改节点的 configSource。
|
||
这个例子使用`kubectl patch`:
|
||
|
||
```bash
|
||
kubectl patch node ${NODE_NAME} -p "{\"spec\":{\"configSource\":{\"configMap\":{\"name\":\"${CONFIG_MAP_NAME}\",\"namespace\":\"kube-system\",\"kubeletConfigKey\":\"kubelet\"}}}}"
|
||
```
|
||
|
||
<!-- ## Understanding how the Kubelet checkpoints config -->
|
||
|
||
## 了解 Kubelet 检查点的配置方式
|
||
|
||
<!--
|
||
When a new config is assigned to the Node, the Kubelet downloads and unpacks the
|
||
config payload as a set of files on the local disk. The Kubelet also records metadata
|
||
that locally tracks the assigned and last-known-good config sources, so that the
|
||
Kubelet knows which config to use across restarts, even if the API server becomes
|
||
unavailable. After checkpointing a config and the relevant metadata, the Kubelet
|
||
exits if it detects that the assigned config has changed. When the Kubelet is
|
||
restarted by the OS-level service manager (such as `systemd`), it reads the new
|
||
metadata and uses the new config.
|
||
-->
|
||
|
||
当为节点分配新配置时,Kubelet 会在本地磁盘上,下载并解压配置负载为一组文件。Kubelet 还记录元数据
|
||
在本地跟踪已分配和最后已知良好的配置源,以便 Kubelet 知道在重新启动时使用哪个配置,即使 API 服务器变为不可用。在检查点配置和相关元数据之后,如果检测到已分配的配置改变了,则 Kubelet 退出。当 Kubelet 被 OS 级服务管理器(例如`systemd`)重新启动时,它会读取新的元数据并使用新配置。
|
||
|
||
<!--
|
||
The recorded metadata is fully resolved, meaning that it contains all necessary
|
||
information to choose a specific config version - typically a `UID` and `ResourceVersion`.
|
||
This is in contrast to `Node.Spec.ConfigSource`, where the intended config is declared
|
||
via the idempotent `namespace/name` that identifies the target ConfigMap; the Kubelet
|
||
tries to use the latest version of this ConfigMap.
|
||
-->
|
||
当记录的元数据已被完全解析时,意味着它包含的所有必需的信息去选择一个指定的
|
||
配置版本通常是`UID`和`ResourceVersion`。与`Node.Spec.ConfigSource`形成对比,
|
||
通过幂等`namespace/name`预期声明配置来标识目标 ConfigMap;Kubelet 尝试使用此 ConfigMap 的最新版本。
|
||
|
||
<!--
|
||
When you are debugging problems on a node, you can inspect the Kubelet's config
|
||
metadata and checkpoints. The structure of the Kubelet's checkpointing directory is:
|
||
|
||
```none
|
||
- --dynamic-config-dir (root for managing dynamic config)
|
||
| - meta
|
||
| - assigned (encoded kubeletconfig/v1beta1.SerializedNodeConfigSource object, indicating the assigned config)
|
||
| - last-known-good (encoded kubeletconfig/v1beta1.SerializedNodeConfigSource object, indicating the last-known-good config)
|
||
| - checkpoints
|
||
| - uid1 (dir for versions of object identified by uid1)
|
||
| - resourceVersion1 (dir for unpacked files from resourceVersion1 of object with uid1)
|
||
| - ...
|
||
| - ...
|
||
```
|
||
-->
|
||
|
||
当您在节点上调试问题时,可以检查 Kubelet 的配置元数据和检查点。Kubelet 的检查点目录结构是:
|
||
|
||
```none
|
||
- --dynamic-config-dir (root for managing dynamic config)
|
||
| - meta
|
||
| - assigned (encoded kubeletconfig/v1beta1.SerializedNodeConfigSource object, indicating the assigned config)
|
||
| - last-known-good (encoded kubeletconfig/v1beta1.SerializedNodeConfigSource object, indicating the last-known-good config)
|
||
| - checkpoints
|
||
| - uid1 (dir for versions of object identified by uid1)
|
||
| - resourceVersion1 (dir for unpacked files from resourceVersion1 of object with uid1)
|
||
| - ...
|
||
| - ...
|
||
```
|
||
|
||
<!-- ## Understanding Node.Status.Config.Error messages -->
|
||
|
||
## 了解节点配置错误信息
|
||
|
||
<!--
|
||
The following table describes error messages that can occur
|
||
when using Dynamic Kubelet Config. You can search for the identical text
|
||
in the Kubelet log for additional details and context about the error.
|
||
-->
|
||
|
||
下表描述了使用 Dynamic Kubelet 配置时可能发生的错误消息。您可以在 Kubelet 日志中搜索相同的文本
|
||
来获取有关错误的其他详细信息和上下文。
|
||
|
||
<!--
|
||
<table>
|
||
<table align="left">
|
||
<tr>
|
||
<th>Error Message</th>
|
||
<th>Possible Causes</th>
|
||
</tr>
|
||
<tr>
|
||
<td><p>failed to load config, see Kubelet log for details</p></td>
|
||
<td><p>The Kubelet likely could not parse the downloaded config payload, or encountered a filesystem error attempting to load the payload from disk.</p></td>
|
||
</tr>
|
||
<tr>
|
||
<td><p>failed to validate config, see Kubelet log for details</p></td>
|
||
<td><p>The configuration in the payload, combined with any command-line flag overrides, and the sum of feature gates from flags, the config file, and the remote payload, was determined to be invalid by the Kubelet.</p></td>
|
||
</tr>
|
||
<tr>
|
||
<td><p>invalid NodeConfigSource, exactly one subfield must be non-nil, but all were nil</p></td>
|
||
<td><p>Since Node.Spec.ConfigSource is validated by the API server to contain at least one non-nil subfield, this likely means that the Kubelet is older than the API server and does not recognize a newer source type.</p></td>
|
||
</tr>
|
||
<tr>
|
||
<td><p>failed to sync: failed to download config, see Kubelet log for details</p></td>
|
||
<td><p>The Kubelet could not download the config. It is possible that Node.Spec.ConfigSource could not be resolved to a concrete API object, or that network errors disrupted the download attempt. The Kubelet will retry the download when in this error state.</p></td>
|
||
</tr>
|
||
<tr>
|
||
<td><p>failed to sync: internal failure, see Kubelet log for details</p></td>
|
||
<td><p>The Kubelet encountered some internal problem and failed to update its config as a result. Examples include filesystem errors and reading objects from the internal informer cache.</p></td>
|
||
</tr>
|
||
<tr>
|
||
<td><p>internal failure, see Kubelet log for details</p></td>
|
||
<td><p>The Kubelet encountered some internal problem while manipulating config, outside of the configuration sync loop.</p></td>
|
||
</tr>
|
||
</table>
|
||
-->
|
||
<table>
|
||
<table align="left">
|
||
<tr>
|
||
<th>错误信息</th>
|
||
<th>可能的原因</th>
|
||
</tr>
|
||
<tr>
|
||
<td><p>无法加载配置,请参阅 Kubelet 日志了解详细信息</p></td>
|
||
<td><p>Kubelet可能无法解析下载配置的有效负载,或者当尝试从磁盘中加载有效负载时,遇到文件系统错误。</p></td>
|
||
</tr>
|
||
<tr>
|
||
<td><p>无法验证配置,请参阅 Kubelet 日志了解详细信息</p></td>
|
||
<td><p>有效负载中的配置将任何命令行标志所覆盖的和这些标志的特性们合并,包括配置文件和远程有效负载,
|
||
它们一起被 Kubelet 确定为无效。</p></td>
|
||
</tr>
|
||
<tr>
|
||
<td><p>无效的 NodeConfigSource,理应刚好一个子字段必须是非空的,但这些字段都是空的</p></td>
|
||
<td><p>由 API 服务器验证 Node.Spec.ConfigSource 是否包含至少一个非空子字段,可能原因是 Kubelet 比 API 服务器版本低,不识别更新的源类型。</p></td>
|
||
</tr>
|
||
<tr>
|
||
<td><p>无法同步:无法下载配置,请参阅 Kubelet 日志了解详细信息</p></td>
|
||
<td><p>Kubelet 无法下载配置。可能是 Node.Spec.ConfigSource 无法解析为具体的 API 对象,或者网络错误中断了下载。 当处于此错误状态时,Kubelet 将重新下载。</p></td>
|
||
</tr>
|
||
<tr>
|
||
<td><p>无法同步:内部故障,请参阅 Kubelet 日志了解详细信息</p></td>
|
||
<td><p>Kubelet遇到了一些内部问题,因此无法更新其配置。 例如包括文件系统错误和从内部函数缓存中读取对象。</p></td>
|
||
</tr>
|
||
<tr>
|
||
<td><p>内部故障,请参阅 Kubelet 日志了解详细信息</p></td>
|
||
<td><p>在配置同步循环之外操作配置时,Kubelet 遇到了一些内部问题。</p></td>
|
||
</tr>
|
||
</table>
|
||
|
||
{{% /capture %}}
|