-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question : Can it be used for cicd ? #31
Comments
yeah, that should work out of the box. As soon as you define an Ingress, this plugin will return the IP of your ingress controller for every unique hostname of your Ingresses. |
How can I do that ? For now I only have one version and it’s in the default namespace. like
Here the list of my services. Kong is my ingress controller
I have 2 applications
For those 2 applications, I want to deploy them in dev, qa… namespaces and modify the ingress rules for that.and I need to access those applications from outside my cluster, like
I’m looking to reproduce that setup on bare-metal with kubernetes 1.20 configured with kubeadm. |
I try this but it didn't work
and I obtain this
|
first of all, the domain you specify in second, you must make sure your domain has been delegated correctly. what you're trying to do with example.org will never work since you don't own this domain(unless you modify your DNS resolver). Basically, you need to make sure that a DNS query ends up hitting 192.168.50.202. the right way to test would be to:
|
thanks. The final setup will be in a closed network. No internet. So to make it work, I need to create a entry on each local computer in /etc/hosts example.org -> 192.168.50.200 or add that entry into our company dns server.
is it possible to setup a private DNS server in kubernetes, that I could use in vagrant, to simulate that it works. If you have a name of a opensource dns that could do that, just let me know. and thanks again for your help and time |
yes, you can use standard coredns for that. for example, you can use a |
@networkop I made lot of progress this weekend. I started from scratch. I found a section on Kubernetes docs about "virtual host". We need to pass the "Host" header here are my ingress in a namespace dev.
if I want to call gateway endpoint, I have to do that
my last problem is HOW to access the UI . When I use only one namespace and no host.. It's simple
but now, I could have the UI deployed in QA, DEV, staging... I need to find how to pass the header when I try to access to UI. Maybe I could have a different ingress for the UI. I put the prefix in the url like :
|
You pass the right header when it's in your URL. So
Assuming you've got DNS zone delegation setup for |
The reason they all have the same host name it' because it will look like that
and I don't have a dns server for now and I don't want to play with the hosts file on Windows on each computer. I think it could work like that for a "DEV" setup. and for production.. I'll have to come back to check how to setup the dns zone delegation. for now, I'll add this entry in my /etc/hosts 10.1.34.55 dev.kubernetes.comact.com and test from a browser and try with command line too :
thanks for your help. Hope that discussion will be able to help others |
I think my next step is to install a DNS Server and automatically push the new domain names into that DNS Server. I'm on ubuntu 20.04 if you have any suggestions. there is a tutorial that I could follow ?
I'll willing to help to write one, but it's the first time playing with dns like that. |
I followed this guide : https://www.linuxtechi.com/install-configure-bind-9-dns-server-ubuntu-debian/ from the first tutorial I replaced : linuxtechi.local by cluster114.local node name : node114 I added on another node the DNS : 10.1.1.34.14 and the netplan and I'm able to reach my domain name from node4 curl http://dev.cluster114.local and I received a response (host matched in ingress) Now.. if I add a new ingress for a new host.. like qa.cluster114.local can that information to forwarded to BIND9 dns server automatically ? |
for any dynamic behaviour you need to delegate to
Once you have the domain delegation set up, k8s_gateway will do the rest for you. It will resolve any domain under cluster114.local, e.g. qa.cluster114.local or dev.cluster114.local based on the current state IPs assigned to those ingresses in your cluster. |
Here the procedure that I try to apply to add k8s_gateway to handle the domain names. It doesn't work so far. I copied cluster114.local configuration to cluster111.local and try to redirect cluster111.local -> k8s_gateway IP. I installed k8s_gateway
Here are the list of my loadbalancer
Here are my 2 ingress
Here my ingress file for production-wui in qa namespace
If I try to connect to the applications (dev.cluster114.local works)
My node information
BIND configuration I modified the file : named.conf.local (I didn't include a reserve lookup for cluster111.local because I can't have 2 zones with the same name.. I didn't find how to fix that)
Content of the file : forward.cluster114.local
Content of the file : reverse.cluster114.local
Here it's the content of forward.cluster111.local
What I missed ? Here k8s_gateway logs
The generated config map look like this
I changed to configmap and did a forward, like in the example, but it didn't work, but the Loop error is not present. I also active Bind logs and did 2 query. One for cluster114 and one for cluster111
|
I try with dig to see the difference
|
I played a little bit
I added a new host in ingress, and the domain started with .qa are still not resolved.
|
I think you've misconfigured you BIND. You need to configure any zone delegation in the parent zone, which in your case is
What you've done instead is defined the |
here my usecase. I want to deploy my applications on multiple namespaces
my services could look like that
chuck-service:8080
quote-service:8080
I'm on premise with nginx-ingress and with metallb as loadbalancer
I'll expose nginx-controler as daemonset with a external IP : 10.1.10.123
for ingress
/chuck -> chuck-service:8080
/quote -> quote-service:8080
I want to have those applications to be accessible for from outside on 10.1.10.123 (I can't expose new IP)
the domain (inside-my-company.com) name it not register in external DNS
ex :
dev.inside-my-company.com/chuck
dev.inside-my-company.com/quote
qa.inside-my-company.com/chuck
qa.inside-my-company.com/quote
....
The text was updated successfully, but these errors were encountered: