尝试使用 helm 在 debian 上设置 kubernetes 时出错

Getting error while trying to setup kubernetes on debian using helm

在 运行 宁 helm init 我收到一个错误:

Error: error installing: the server could not find the requested resource (post deployments.extensions)

但是我通过 运行ning 解决了它:

helm init --client-only

但是当我运行:

helm upgrade --install --namespace demo demo-databases-ephemeral charts/databases-ephemeral --wait

我得到:

Error: serializer for text/html; charset=utf-8 doesn't exist

我没有发现任何令人信服的解决方案,我无法继续进行设置。

如有任何帮助,我们将不胜感激。

显然,您的 kube-dns pod 无法找到 api 服务器,因此 returns text/html,而不是 JSON

1) 除了 Error: serializer for text/html; charset=utf-8 doesn't exist

之外,检查 dns 容器中的错误
kubectl logs <kube-dns-pod> -n kube-system kubedns

2) 使用以下标志更新您的 dns pod 配置:

--kubecfg-file=~/.kube/config <-- path to your kube-config file
--kube-master-url=https://0.0.0.0:3000 <--address to your master node

检查您的 ~/.kube/config 是否存在并且设置正确。如果没有,运行以下命令:

sudo cp -i /etc/kubernetes/admin.config ~/.kube/config

现在使用以下命令检查 kubectl 是否正确设置:

kubectl version

此答案特定于您遇到的问题。如果这不能解决问题,请提供更多错误日志。