大网数据广告活动
服务器运维问答

Securing Kubernetes API port

· 52CE 我爱测

We have a Kubernetes cluster (kube-)sprayed over 4 nodes running CoreOS. Our most important services will run in this Kubernetes environment and we are trying to do everything we can to make it as secure as possible, however we p…

问题原文

原帖链接 · barney.balazs · CC BY-SA 4.0

We have a Kubernetes cluster (kube-)sprayed over 4 nodes running CoreOS. Our most important services will run in this Kubernetes environment and we are trying to do everything we can to make it as secure as possible, however we plant to expose the API port (6443) to the internet.

Is that considered safe to do?

We did the following so far:

  • We disabled anonymous access (with the --anonymous-auth=false flag).

  • Certificate checking seems to work fine, without providing client-certificate-data, I can't access anything on the cluster.

  • We are planning to use RBAC authorization.

  • We currently have the latest version of kubernetes installed (and we plan to update quickly as new fixes release).

  • We have a firewall with rate-limiting set up to mitigate brute force attacks.

  • The switch we bought for the server support DDoS protection.

Are there any further steps we could take to make that exposed port secure? Or is it completely ill-advised to do so?

已采纳解答

原帖链接 · A_Suh · CC BY-SA 4.0

The steps you have taken seem to be sufficient for securing api port

The only thing to verify is, if you are using K8s prior v1.10 you can disable insecure port by setting --insecure-port=0, so only encrypted traffic will be allowed.

Sometimes it's not possible, because of health check configuration or bootstrapping mechanisms. If that's the case firewall the port from public and internal access. This flag is deprecated since v1.10.

This article might be also helpful in terms of security best practices

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-03-30)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。