kubelet证书需要在端口10250.它并不需要签署证书的HTTPS服务器,所以CA:TRUE是多余的。不知道为什么这样创建。
IIRC,kube-apiserver信任任何证书,如果它运行时没有设置--tls-ca-file
。我记得一些较老的k8s教程没有强制执行TLS。
另外,任何人/任何东西都可以无限制地访问kubelet,直到您打开kubelet authentication。
在任何情况下,如果以这种方式运行您的k8s集群是不安全的。我建议使用kargo,kops,kubeadm或任何一种知名工具来提升群集。这些解决方案构建适当的证书层次结构作为安装过程的一部从kubelet's docs
额外信息:
--cert-dir string The directory where the TLS certs are located (by default /var/run/kubernetes). If --tls-cert-file and --tls-private-key-file are provided, this flag will be ignored. (default "/var/run/kubernetes")
--tls-cert-file string File containing x509 Certificate for HTTPS. (CA cert, if any, concatenated after server cert). If --tls-cert-file and --tls-private-key-file are not provided, a self-signed certificate and key are generated for the public address and saved to the directory passed to --cert-dir.
--port int32 The port for the Kubelet to serve on. (default 10250)
集群与kubeadm创建。从你的链接看来,授权是通过默认kubelet配置给予apiserver的。感谢您的帮助。 – cristi