Dynamic wildcard subdomain ingress for Kubernetes

柔情痞子 提交于 2019-12-02 20:42:47

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.

Services are available locally as

my-svc.svc.cluster.local

You can write a simple NGINX proxy which can forward which can parse the subdomain and proxy pass it to http://$service as long as the subdomain and service name matches as in this case.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!