Dynamic wildcard subdomain ingress for Kubernetes

前端 未结 2 1248
萌比男神i
萌比男神i 2020-12-28 15:32

I\'m currently using Kubernetes on GKE to serve the various parts of my product on different subdomains with the Ingress resource. For example: api.mydomain.com

2条回答
  •  死守一世寂寞
    2020-12-28 16:01

    There certainly isn't anything like wildcard domains available in kubernetes, but you might be able to get want you want using Helm

    With helm, you can template variables inside your manifests, so you can have the name of your branch be in the helm values file

    From there, you can have gitlab-ci do the helm installation in a build pipeline and if you configure your chart correctly, you can specify a helm argument of the pipeline name.

    There's a great blog post about this kind of workflow here - hopefully this'll get your where you need to go.

提交回复
热议问题