免费 · 开发
Kubernetes 清单生成器.
生成 Kubernetes 的 Deployment、Service 和 Ingress:副本数、端口、环境变量、资源、健康检查和 TLS。
Loading the calculator…
为单个应用生成 Kubernetes YAML
- 输入应用名称、容器镜像和副本数。
- 添加端口、环境变量、资源请求与限制,以及健康检查路径。
- 如需公网访问,可填写带 TLS 的 Ingress 主机名。
- 复制 YAML,用 kubectl apply -f 部署。
示例:nginx:1.27 应用,2 个副本、端口 80、主机 web.example.com,会生成一个 Deployment、一个 ClusterIP Service 和一个带 TLS 的 Ingress。
清单包含的内容
- 标签把三个对象关联起来(app: 名称),让 Service 和 Ingress 找到正确的 Pod。
- 就绪探针和存活探针对健康检查路径发起 HTTP GET 请求;资源使用您填写的 requests 和 limits。
- 名称按 Kubernetes 的 DNS 标签规则检查(小写字母、数字和连字符)。
- 每个 Deployment 一个容器。上线前请检查镜像的安全设置,例如运行用户和文件系统。准备环境变量请使用 .env 文件转换器;本地开发请使用 Docker Compose 生成器。
限制与支持格式
输入内容在您的设备上处理。
英语技术说明
One container per Deployment; review security settings for your image. Everything is calculated in your browser; nothing you type is uploaded.
Labels tie the three objects together (app: name). Probes use HTTP GET on the health path; resources use the requests/limits you enter; names are checked against Kubernetes DNS-label rules.
An nginx:1.27 app with 2 replicas, port 80 and a host web.example.com gives a Deployment, a ClusterIP Service and an Ingress with TLS.
常见问题
一定需要 Ingress 吗?
只有在通过主机名对集群外暴露应用时才需要。没有它,ClusterIP Service 只能在集群内部访问。
requests 和 limits 是什么?
requests 是调度器为 Pod 预留的 CPU 和内存;limits 是 Pod 可使用的上限。
我的配置会被发送到集群吗?
不会。YAML 在您的浏览器中生成,由您自行部署。