[英]Kubernetes Ingress Skaffold Documentation
我正在嘗試將入口添加到我的 Kubernetes 文檔中。 我能夠添加 ingress.yaml 文件,並且有大量關於 ingress.yaml 的文檔,但我使用的是 skaffold.yaml 來處理 Kubernetes 部署的細節。 而且我找不到任何有關為 ingress 創建 skaffold 文件的文檔。 (僅使用 googleCloudBuild、buildpacks 和 minikube)我遇到的所有文檔都是針對 NGINX 的。
我的項目如下所示:
kubernetes-manifests:
--- frontend_service.deployment.yaml
--- frontend_service.service.yaml
--- ingress.yaml
--- login_service.deployment.yaml
--- login_service.service.yaml
--- recipes_service.deployment.yaml
--- recipes_service.service.yaml
我當前的腳手架文件如下:
apiVersion: skaffold/v2beta4
kind: Config
build:
tagPolicy:
sha256: {}
# defines where to find the code at build time and where to push the resulting image
artifacts:
- image: frontend-service
context: src/frontend
- image: login-service
context: src/login
- image: recipes-service
context: src/recipes
# defines the Kubernetes manifests to deploy on each run
deploy:
kubectl:
manifests:
- ./kubernetes-manifests/*.service.yaml
- ./kubernetes-manifests/*.deployment.yaml
profiles:
# use the cloudbuild profile to build images using Google Cloud Build
- name: cloudbuild
build:
googleCloudBuild: {}
- name: buildpacks
build:
artifacts:
- image: frontend-service
context: src/frontend
buildpack:
builder: "gcr.io/buildpacks/builder:v1"
- image: login-service
context: src/login
buildpack:
builder: "gcr.io/buildpacks/builder:v1"
- image: recipes-service
context: src/recipes
buildpack:
builder: "gcr.io/buildpacks/builder:v1"
當前的 skaffold 文件沒有部署在入口架構中,它使用后端和前端層。
Ingress 定義只是 Kubernetes 資源,因此您只需將ingress.yaml
添加到要部署的清單中:
deploy:
kubectl:
manifests:
- ./kubernetes-manifests/ingress.yaml
- ./kubernetes-manifests/*.service.yaml
- ./kubernetes-manifests/*.deployment.yaml
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.