作者: Ju4t
Kompose 是什么?它是一个转换工具,可将 compose (即 Docker Compose)所组装的所有内容转换成容器编排器(Kubernetes 或 OpenShift)可识别的形式。
Kompose 通过 GitHub 发布,发布周期为三星期。 你可以在 GitHub 发布页面上看到所有当前版本。
# macOS
curl -L https://github.com/kubernetes/kompose/releases/download/v1.26.0/kompose-darwin-amd64 -o kompose
chmod +x kompose
sudo mv ./kompose /usr/local/bin/kompose
kompose convert
WARN Unsupported depends_on key - ignoring
WARN Volume mount on the host "./.docker/redis" isn't supported - ignoring path on the host
INFO Kubernetes file "ace-admin-service.yaml" created
INFO Kubernetes file "ace-auth-service.yaml" created
INFO Kubernetes file "ace-gate-service.yaml" created
INFO Kubernetes file "eureka-service.yaml" created
INFO Kubernetes file "redis-service.yaml" created
INFO Kubernetes file "ace-admin-deployment.yaml" created
INFO Kubernetes file "ace-auth-deployment.yaml" created
INFO Kubernetes file "ace-gate-deployment.yaml" created
INFO Kubernetes file "eureka-deployment.yaml" created
INFO Kubernetes file "redis-deployment.yaml" created
INFO Kubernetes file "redis-claim0-persistentvolumeclaim.yaml" created
https://kubernetes.io/zh-cn/docs/tasks/configure-pod-container/translate-compose-kubernetes/