Gitlab DNS Entry For Kubernetes Setup? - dns

I have a n00b question about setting up gitlab on a kubernetes. I'm running a basic minkube cluster on my home machine and I want to install gitlab onto it. The setup instructions note the following prequesite:
The ability to point a DNS entry or URL at your GitLab install
How do I do this? What is the basic mechanism for setting up a "DNS entry" on a home machine running minikube? There example shows:
externalUrl: 'http://gitlab.example.com'
If I own a domain how would I set this up? Why does the setup need an external URL?
Thank you in advance for you consideration and response.

You'll be setting it up with a nodeport and can access it normally through that. If you really want a DNS entry you can just add one in your hosts file at /etc/hosts:
[minikube ip] myfakelocalgitlabendpoint.com
You can get minikube's IP by running minikube ip.

Related

Bridge to Kubernetes doesnt add entries in /etc/hosts

I need help with the Bridge to Kubernetes setup in my Linux(WSL) environment.
The debug starts as expected but it doesn't change my /etc/hosts, hence I can't connect to the other services in the cluster.
I believe the issue can be related to not having enough permissions, and I can't find endpointManager running in Linux.
https://learn.microsoft.com/en-us/visualstudio/bridge/overview-bridge-to-kubernetes#additional-configuration
Any idea what this could be related to?

Run gitlab on subdomain in local network?

I installed gitlab on a raspberry pi 4 in my local network and will use it only locally. When I configure in /etc/gitlab/gitlab.rb the external_url 'http://rpi4.local' (and execute sudo gitlab-ctl reconfigure afterwards) it works. I can even configure a different port here.
But the configuration external_url 'http://gitlab.rpi4.local' does not work. Do I need to configure something else, like my /etc/hosts file ?
You will need to make the name valid in DNS through some mechanism. There are multiple ways depending on your needs and your options for DNS.
As you mentioned, you can add the name to your /etc/hosts file. This should be done both on the GitLab server and on any workstation you wish to have access to GitLab (assuming Linux-based machines. The process differs for Mac or Windows).
Use a valid DNS name and add it to your DNS. Use a name such as gitlab.<a-domain-you-own> and add it to DNS. Many domain registrars offer DNS for free or you could use a dynamic DNS service if your Raspi has a dynamic internal address. The advantage of using this method is you won't have to modify any /etc/hosts files and all workstations will know how to access your GitLab instances without any changes.

Connecting Centos VMs to each other for K8s

Im trying to set up kubernetes on my centos VMs using virtualbox. I prefer to use the kubeadm method, so that I can join slave nodes with a join token.
My issue is that I think I am lacking understanding of how to connect my VMs to one another beforehand. This is the resource I am using for the Kubernetes installation:
https://www.profiq.com/kubernetes-cluster-setup-using-virtual-machines/
When I create VMs and run ifconfig, they all have the same IPs listed, even if they are new VMs and not just a copy of the original. I must be doing something wrong.
Anyway, Im just wondering if anyone would be so kind as to give me some steps to get my VMs talking to each other, just to be sure Im doing it correctly. Im following the article I posted, and can ping each VM from the other, but then ran ifconfig and, since each machine has the same 10.0.2.15 IP, I feel like its just pinging itself and not the master from slave, etc
Did you perform the step after the cloning and before you load kubernetes to change the IP addresses of the 2nd and 3rd VM?
from the instructions you are following, I see:
Now create a linked clone machines from kubemaster machines created before. Once you’re done, boot into machine and change following things to match infrastructure:
Set IP address 192.168.99.21 (or 22 for second slave) for host only network.
Set hostname hostnamectl set-hostname kubeslave1 (or kubeslave2 for second slave) Everything else is already configured.

Can't connect remotely to Jenkins being run on a Debian 8 VM

I've recently set up a Debian 8 Jessie VM on Google Cloud. I've installed Jenkins and have the service up and running(verified by "sudo service jenkins status"), yet I can't connect to the VM's external IP from another machine. I used to run Jenkins from my personal computer until I decided I needed a dedicated server to run it continuously. When I was running it on my personal machine I would just access localhost:8080 and the Jenkins dashboard would load fairly quickly. However, upon trying to access the external IP address of the VM running Jenkins, I'm usually greeted with "Connection refused" in my web browser.
At the suggestion of most posts I've seen regarding such issues, I've lifted all firewalls on the VM and have tried to ensure that the VM is listening at the correct IP address, but nothing seems to be able to change the outcome presented by my browser. Where does the issue most likely reside: the VM, Google Cloud, or Jenkins? I'm at a loss.
My first guess is a connection/firewall issue. To test this, you could try a port forward using SSH: SSH into your server with a local port forward: ssh -L 8080:localhost:8080 yourserver. You should then be able to direct your web browser at http://localhost:8080/ and your packets flow through the SSH connection. If that makes it work, have a good look at
How to open a specific port such as 9090 in Google Compute Engine . Or better yet, if you are the only one to use that Jenkins server, just keep using the SSH tunnel. It's much more secure than opening jenkins to the public world.
Have you tried installing tcpdump on the VM and doing a packet capture? That way you can determine where the traffic is being dropped. If you don't see any traffic, then it is being dropped somewhere in the cloud before it gets to your VM. If you are seeing traffic, then you need to determine is it Jenkins or some agent on the host (perhaps a firewall but you mentioned you cleared all the rules) ... I would suggest stopping the Jenkins service and then trying to access it again. Do you get the same "Connection Refused" message? If so, then it is something on the VM. If not, then it something at the application layer, i.e. Jenkins.
Happy hunting!!!

Passthrough proxy to a different IP address

We run a multi site platform and customers configure their domains to point to our entry server IP for domain routing using an A record.
We are looking at migrating to a whole new setup that's more scalable.
However we don't have the ability to control everyone's DNS settings.
How can we setup a passthrough proxy or reverse proxy on our ubuntu box? Maybe Nginx? We currently have apache running.
Thanks!
Run DNS server on your ubuntu box and rewrite A records for domains you want to point to new server. I am using DNS manager software from ispSystems for the same reason.

Resources