fabric8io / fabric8-console

Angular 1.x console for fabric8
28 stars 27 forks source link

"There are no teams currently available." in fabric8-console with kubernetes #267

Closed tlytg456 closed 6 years ago

tlytg456 commented 7 years ago

Thanks all first, I install kubernetes in 3 VMs and I want to install the fabric8 via gofabric8. But now the gogs cannot start correctly. root@opt1:~# kubectl get pods

NAME                                       READY     STATUS             RESTARTS   AGE
configmapcontroller-5494c4f9c4-fssfz       1/1       Running            1          19h
exposecontroller-6f8fc9f67-pljzc           1/1       Running            18         18h
fabric8-7b6f4bf584-znwrw                   2/2       Running            2          19h
fabric8-docker-registry-6996457b46-4vn4c   1/1       Running            1          19h
fabric8-forge-86868586bd-8b2pf             1/1       Running            1          19h
gogs-649cb66d55-796w4                      0/1       Terminating        5          17h
gogs-649cb66d55-cnvwv                      0/1       CrashLoopBackOff   168        14h
gogs-649cb66d55-v5qm7                      0/1       Terminating        39         17h
ingress-nginx-687bc4bf65-dgqbv             1/1       Running            1          19h
jenkins-945b6ccd-7prhp                     1/1       Running            1          19h
nexus-78575b469b-l5696                     1/1       Running            1          19h

And I search log get:

root@opt1:~# kubectl logs gogs-649cb66d55-cnvwv 
mkdir: cannot create directory '/app/gogs/data/git': Permission denied
mkdir: cannot create directory '/app/gogs/data/ssh/': Permission denied
/opt/gogs/start.sh: line 24: cd: /app/gogs/data/ssh/: No such file or directory
panic: open gogs.rsa: permission denied

goroutine 1 [running]:
panic(0x519120, 0xc4200ef710)
    /usr/local/go/src/runtime/panic.go:500 +0x1a1
main.main()
    /home/jdyson/go/src/github.com/fabric8io/docker-gogs/cmds/ssh-hostkeygen/ssh-hostkeygen.go:41 +0x2c1
2017/10/26 00:54:03 Creating admin user:  true
2017/10/26 00:54:03 [T] Custom path: /opt/gogs/custom
2017/10/26 00:54:03 [T] Log path: /app/gogs/data/logs
2017/10/26 00:54:03 [I] Gogs: Go Git Service 
2017/10/26 00:54:03 [.../gogs/models/repo.go:121 NewRepoContext()] [E] Fail to set git user.name(exit status 255): error: could not lock config file /app/gogs/data/.gitconfig: Permission denied

I can not run the 'gofabric8 service fabric8 --url', and it would not show the url, so I find the fabic8 service is run, and use nodePort to pose the url to see the web, I get "There are no teams currently available."

I do not know where should I fix, and I searched that problem be happened on minikube.#189

I am look for ward to your reply. Thanks.

fcmfcm01 commented 6 years ago

need to bind service account default to cluster-admin role

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: default
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
- kind: ServiceAccount
  name: default
tlytg456 commented 6 years ago

@fcmfcm01 Thanks sir, I have closed the issue