kubeadm 生产准备好了吗?

Is kubeadm production ready now?

我是来了解 kubeadm 的。我计划在我的生产环境中使用 kubeadm 创建 kubernetes 集群。所以,我想知道 kubeadm production 是否准备好部署到我的产品中?

POST 2019 年编辑 以反映当前情况。

2018年,根据K8S文档here

The cluster created here has a single master, with a single etcd database running on it. This means that if the master fails, your cluster may lose data and may need to be recreated from scratch. Adding HA support (multiple etcd servers, multiple API servers, etc) to kubeadm is still a work-in-progress.

2019 年 11 月:

The cluster created here has a single control-plane node, with a single etcd database running on it. This means that if the control-plane node fails, your cluster may lose data and may need to be recreated from scratch.

Workarounds:

Regularly back up etcd. The etcd data directory configured by kubeadm is at /var/lib/etcd on the control-plane node.

Use multiple control-plane nodes by completing the HA setup instead

因此,kubeadm 是在 2018 年,kubernetes 是 WIP,尚未准备好生产。对于开发和测试,kubeadm 应该足够好了。寻找 here 其他解决方案。

2019 年,此可用性问题已得到修复。

官方尚未准备好生产,但我已成功设置 1.10 及更高版本的集群,没有任何问题。

如果你想创建一个有多个 master 的 HA 集群,还有一个 kubeadm 指南 here。但使用它需要您自担风险。

此外,请记住,如果您的 master(s) 宕机,您的工作量将保持 运行,您将无法进行更改或安排新的 pods,直到 master( s) 回来了。

您还可以根据您的环境使用任何其他解决方案,正如此处其他答案中所指出的那样。

好消息!

这是now.We有生产版本,

we’re excited to announce that it has now graduated from beta to stable and generally available (GA)!

https://kubernetes.io/blog/2018/12/04/production-ready-kubernetes-cluster-creation-with-kubeadm/