Kubernetes节点重启后 master节点kube-apiserver启不来了


kube-apiserver 服务一直处于stop状态
kube-apiserver 日志中
No cloud provider specified.
Invalid Authentication Config: open /tmp/kube-serviceaccount.key: no such file or directory
已邀请:

wulonghui - PaaS工程师

赞同来自:


要使用ServiceAccount,在启动Kubernetes的时候,首先生成key:
$ openssl genrsa -out /tmp/kube-serviceaccount.key 2048

启动API Server增加service_account_key_file:
$ ./kube-apiserver ... --service_account_key_file=/tmp/kube-serviceaccount.key ...

启动Controller Manager增加service_account_private_key_file:
$ ./kube-controller-manager ... --service_account_private_key_file=/tmp/kube-serviceaccount.key...

wulonghui - PaaS工程师

赞同来自:


创建key,然后在启动参数里面配置就可以了

要回复问题请先登录注册