Kubernetes Helm with Gitlab Charts in AWS - how to configure the serviceType

6/18/2019

I"m new to Kubernetes and AWS, treat me like a noob.

I've got Kubernetes running in AWS with the following names:

>  kube kubectl get pods --all-namespaces
NAMESPACE       NAME                                                                READY   STATUS    RESTARTS   AGE
ingress-nginx   nginx-ingress-controller-76c86d76c4-s6kvk                           1/1     Running   0          28h
kube-system     calico-node-xxzzz                                                   1/1     Running   0          28h
kube-system     dns-controller-5czzzzzzfbd-t7pf8                                    1/1     Running   0          28h
kube-system     etcd-manager-main-ip-11-11-11-11.eu-west-1.compute.internal         1/1     Running   0          28h
kube-system     kube-apiserver-ip-11-11-11-11.eu-west-1.compute.internal            1/1     Running   2          28h
kube-system     kube-controller-manager-ip-11-11-11-11.eu-west-1.compute.internal   1/1     Running   0          28h
kube-system     kube-dns-111116bb49-pbt2l                                           3/3     Running   0          28h
kube-system     kube-dns-autoscaler-11111111-x8                                     1/1     Running   0          28h
kube-system     kube-proxy-ip-11-11-11-11.eu-west-1.compute.internal                1/1     Running   0          28h
kube-system     kube-scheduler-ip-10-84-37-60.eu-west-1.compute.internal            1/1     Running   0          28h

My goal is to install Gitlab via Charts on Kubernetes. However, the issue i'm up against is the routing. Here it states I need to set a serviceType field in a file.

But how can I determine the correct value specified in that file? Do I need to create a loadbalancer in AWS? Or is it already present somewhere, e.g. is the nginx Ingress controller?

I can install Gitlab via helm

helm upgrade --install gitlab gitlab/gitlab \
  --timeout 600 \
  --set global.hosts.domain=my_domain.com \
  --set global.hosts.externalIP=1.2.3.4 \
  --set certmanager-issuer.email=an_email@email.com \
  --namespace=gitlab \
  --debug

However, the domain I've provided is not reachable via my browser, because I didn't provide an serviceType for the loadbalancer. Also, I'm uncertain if my external IP is correct.

-- Kevin C
amazon-web-services
gitlab
kubernetes
kubernetes-helm

1 Answer

6/19/2019

You have an nginx ingress controller running already. Is it working? If so, you should probably use that instead of a new load balancer.

1) Configure your domain so that it is pointing to your ingress load balancer. If you are using route53, you can set a wildcard A Record so that *.mydomain.com goes to the load balancer.

2) Add the appropriate ingress section to your values.yaml: https://gitlab.doc.ic.ac.uk/help/install/kubernetes/gitlab_chart.md#ingress-routing

3) Use serviceType=ClusterIP.

If you can't or don't want to use that Ingress Controller, then yes, serviceType=LoadBalancer is appropriate. It will create an AWS ELB for you. You'll need to add an A record for your domain pointing to that ELB.

-- frankd
Source: StackOverflow