Kubernetes Azure管理的K8s群集使用的kubelet命令行是什么?
我正在阅读自述,并立即看到以下段落:Kubernetes Azure管理的K8s群集使用的kubelet命令行是什么?,kubernetes,Kubernetes,我正在阅读自述,并立即看到以下段落: > This means the kubelet configuration must contain these flags: > > --authentication-token-webhook=true This flag enables, that a ServiceAccount token can be used to authenticate against the >
> This means the kubelet configuration must contain these flags:
>
> --authentication-token-webhook=true This flag enables, that a ServiceAccount token can be used to authenticate against the
> kubelet(s). This can also be enabled by setting the kubelet
> configuration value authentication.webhook.enabled to true.
> --authorization-mode=Webhook This flag enables, that the kubelet will perform an RBAC request with the API to determine, whether the
> requesting entity (Prometheus in this case) is allow to access a
> resource, in specific for this project the /metrics endpoint. This can
> also be enabled by setting the kubelet configuration value
> authorization.mode to Webhook.
这让我想知道——我们怎么知道K8s用来运行kubelets的命令行?我在这里可能错了,并不是K8s集群旋转kubelets,而是负责管理K8s集群的AKS基础设施。但问题仍然存在——我们如何才能看到命令行?我们能影响它吗
编辑1
发现
似乎很相关。虽然它没有真正提供命令行或告诉如何更改它,但它确实提供了kubelet配置,同一页解释了如何修改它
基本上,要获得kubelet配置,我们需要做两件事:
kubectl proxy --port=8001 &
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}
然后kubelet\u configz\u${NODE\u NAME}
将kubelet配置为YAML