I am running separate GitLab, Redis and PostgreSQL containers in Kubernetes with GlusterFS for persistence. All Kubernetes nodes are having RancherOS. All nodes have 1 core and 4.5 GB RAM. Docker version on all nodes is 1.12.6
to ensure compatibility with Kubernetes.
GitLab service:
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
io.kompose.service: gitlab
name: gitlab
spec:
ports:
- name: "443"
port: 443
targetPort: 443
- name: "80"
port: 80
targetPort: 80
- name: "10022"
port: 10022
targetPort: 22
selector:
io.kompose.service: gitlab
status:
loadBalancer: {}
When i start GitLab container in Kubernetes, here is the log. I am able to telnet to the host on port 80 where the GitLab pod is running but somehow the GitLab page is not opening up. I get the following error when i hit the public URL (http://35.xxx.yyy.zz/):
Network Error (tcp_error)
A communication error occurred: "Connection refused"
The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.
For assistance, contact your network support team.
I was trying to investigate using some commands described in this page but rake command is failing.
root@gitlab-748072774-chztb:/home/git/gitlab# rake
rake rake2.3
root@gitlab-748072774-chztb:/home/git/gitlab# which rake2.3
/usr/bin/rake2.3
root@gitlab-748072774-chztb:/home/git/gitlab# rake gitlab:check
/usr/lib/ruby/2.3.0/rubygems.rb:241:in `bin_path': can't find gem rake (>= 0.a) (Gem::GemNotFoundException)
from /usr/bin/rake:22:in `<main>'
root@gitlab-748072774-chztb:/home/git/gitlab# rake2.3 gitlab:check
/usr/lib/ruby/2.3.0/rubygems.rb:241:in `bin_path': can't find gem rake (>= 0.a) (Gem::GemNotFoundException)
from /usr/bin/rake2.3:22:in `<main>'
Any pointers?
Line 93 of https://pastebin.com/nXF45Scf shows what's going on:
type: ClusterIP
Means that Service, and its in-cluster IP address, are only available to other members of the cluster. If you were expecting it to show up on any kind of public IP, you would want type: LoadBalancer as described in the concepts document