[英]Kubernetes Ingress Skaffold Documentation
I am trying to add ingress to my Kubernetes documentation.我正在尝试将入口添加到我的 Kubernetes 文档中。 I was able to add the ingress.yaml file, and there is plenty of documentation on ingress.yaml, but I am using a skaffold.yaml to handle the nitty-gritty of the Kubernetes deployment.我能够添加 ingress.yaml 文件,并且有大量关于 ingress.yaml 的文档,但我使用的是 skaffold.yaml 来处理 Kubernetes 部署的细节。 And I cannot find any documentation on creating a skaffold file for ingress.而且我找不到任何有关为 ingress 创建 skaffold 文件的文档。 ( that simply uses googleCloudBuild, buildpacks, and minikube ) all the documentation I come across is for NGINX. (仅使用 googleCloudBuild、buildpacks 和 minikube)我遇到的所有文档都是针对 NGINX 的。
My project looks like the following:我的项目如下所示:
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
and my current skaffold file is the following:我当前的脚手架文件如下:
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"
This current skaffold file does not deploy in an ingress architecture, it uses a backend and a frontend tier.当前的 skaffold 文件没有部署在入口架构中,它使用后端和前端层。
Ingress definitions are just Kubernetes Resources, so you just add your ingress.yaml
into the manifests to be deployed: 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.