我在Kubernetes中使用GlusterFS运行单独的GitLab,Redis和PostgreSQL容器以实现持久性。所有Kubernetes节点都有RancherOS。所有节点都有1个核心和4.5 GB RAM。所有节点上的Docker版本都是1.12.6
,以确保与Kubernetes的兼容性。
GitLab服务:
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: {}
当我在Kubernetes中启动GitLab容器时,here是日志。我能够telnet到GitLab pod正在运行的端口80上的主机,但不知何故GitLab页面没有打开。点击公共网址(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.
我尝试使用this页面中描述的某些命令进行调查,但rake命令失败。
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>'
任何指针?
答案 0 :(得分:1)
https://pastebin.com/nXF45Scf第93行显示了正在发生的事情:
prompt for facebook login or fetch data
表示Service及其群集内IP地址仅对群集的其他成员可用。如果您希望它出现在任何类型的公共IP上,您需要type: LoadBalancer 正如所描述的in the concepts document