Reputation: 1164
I'm trying to deploy GitLab on Kubernetes using minikube through this tutorial, but I don't know what values to put in the fields global.hosts.domain
, global.hosts.externalIP
and certmanager-issuer.email
.
The tutorial is very poor in explanations. I'm stuck in this step. Can someone tell me what are this fields and what should I put on them?
Upvotes: 4
Views: 4024
Reputation: 114
# values-minikube.yaml
# This example intended as baseline to use Minikube for the deployment of GitLab
# - Services that are not compatible with how Minikube runs are disabled
# - Configured to use 192.168.49.2, and nip.io for the domain
# Minimal settings
global:
ingress:
configureCertmanager: false
class: "nginx"
tls:
external: true
hosts:
domain: local.com
externalIP: 192.168.49.2
shell:
# Configure the clone link in the UI to include the high-numbered NodePort
# value from below (`gitlab.gitlab-shell.service.nodePort`)
port: 32022
# Don't use certmanager, we'll self-sign
certmanager:
install: false
# Use the `ingress` addon, not our Ingress (can't map 22/80/443)
nginx-ingress:
enabled: false
# Map gitlab-shell to a high-numbered NodePort cloning over SSH since
# Minikube takes port 22.
gitlab:
gitlab-shell:
service:
type: NodePort
nodePort: 32022
# Provide gitlab-runner with secret object containing self-signed certificate chain
gitlab-runner:
certsSecretName: gitlab-wildcard-tls-chain
/etc/hosts
file. In your custom-values.yaml you can also add global.hosts.domain=192.168.49.2.nip.iosudo gedit /etc/hosts
# ==== MINIKUBE ====
192.168.49.2 gitlab.local.com
# Add gitlab repo
helm repo add gitlab https://charts.gitlab.io/
# Update helm repo
helm repo update
# Auflisten der verfügbaren Helm Chart Versionen
helm search repo gitlab --versions
# This will download the gitlab helm chart to the folder ./gitlab/Chart
cd ~/Projects/minikube
mkdir -p ./gitlab/Chart
helm pull gitlab/gitlab --version 8.1.2 --untar --untardir ./tmp
cp -r ./tmp/gitlab/* ./gitlab/Chart
rm -rf ./tmp
# Create custom-values.yaml
touch ./gitlab/custom-values.yaml
# Change context
kubectl config use-context minikube
# Install
helm install gitlab-dev ./gitlab/Chart --namespace dev -f ./gitlab/custom-values.yaml
kubectl config use-context minikube
helm upgrade gitlab-dev ./gitlab/Chart --namespace dev -f ./gitlab/custom-values.yaml --atomic
kubectl config use-context minikube
helm --namespace dev delete gitlab-dev
kubectl get ingress -lrelease=gitlab-dev -n dev
kubectl get -n dev secret gitlab-dev-gitlab-initial-root-password -ojsonpath='{.data.password}' | base64 --decode ; echo
kubectl describe ingress gitlab-dev-webservice-default -n dev
Upvotes: 0
Reputation: 33158
I'm trying to deploy GitLab on Kubernetes using minikube through this tutorial, but I don't know what values to put in the fields
global.hosts.domain
,global.hosts.externalIP
andcertmanager-issuer.email
.
For the domain, you can likely use whatever you'd like, just be aware that when gitlab generates links that are designed to point to itself they won't resolve. You can work-around that with something like dnsmasq
or editing /etc/hosts
, if it's important to you
For the externalIP, that will be what minikube ip
emits, and is the IP through which you will communicate with gitlab (since you will not be able to use the Pod's IP addresses outside of minikube). If gitlab does not use a Service
of type NodePort
, you're in for some more hoop-jumping to expose those ports via minikube's IP
The certmanager-issuer.email
you can just forget about, because it 100% will not issue you a Let's Encrypt cert running on minikube unless they have fixed cermanager to use the dns01 protocol. In order for Let's Encrypt to issue you a cert, they have to connect to the webserver for which they are issuing the cert, and (as you might guess) they will not be able to connect to your minikube IP. If you want to experience SSL on your gitlab instance, then issue the instance a self-signed cert and call it a draw.
The tutorial is very poor in explanations.
That's because what you are trying to do is perilous; minikube is not designed to run an entire gitlab instance, for the above and tens of other reasons. Google Cloud Platform offers generous credits to kick the tires on kubernetes, and will almost certainly have all the things you would need to make that stuff work.
Upvotes: 2