【发布时间】:2020-03-21 17:10:42
【问题描述】:
我在使用在 minikube 中运行的 che 应用程序时遇到问题。有谁知道解决这个问题的简单方法?
我想我已经运行了:
al@cougar:~$ kubectl -n che get pod
NAME READY STATUS RESTARTS AGE
che-9644775cc-mgrn6 1/1 Running 0 38m
devfile-registry-696845fc9f-ps62l 1/1 Running 0 38m
plugin-registry-7b94d46db7-4fhhd 1/1 Running 0 38m
我以为 chectl 会暴露它,但似乎不是这样:
al@cougar:~$ minikube service list
|--------------|----------------------|--------------|-----|
| NAMESPACE | NAME | TARGET PORT | URL |
|--------------|----------------------|--------------|-----|
| cert-manager | cert-manager | No node port |
| cert-manager | cert-manager-webhook | No node port |
| che | che-host | No node port |
| che | devfile-registry | No node port |
| che | plugin-registry | No node port |
| default | kubernetes | No node port |
| kube-system | kube-dns | No node port |
|--------------|----------------------|--------------|-----|
我想我可以看到 che-host 暴露的端口,我需要设置负载均衡器吗?:
al@cougar:~$ kubectl get services --namespace=che
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
che-host ClusterIP 10.105.232.58 <none> 8080/TCP,8087/TCP 55m
devfile-registry ClusterIP 10.101.12.68 <none> 8080/TCP 55m
plugin-registry ClusterIP 10.99.88.115 <none> 8080/TCP 55m
它看起来是在容器上的 8080 上运行的:
al@cougar:~$ kubectl get svc che-host --namespace=che
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
che-host ClusterIP 10.105.232.58 <none> 8080/TCP,8087/TCP 79m
我也看过“Kubectl edit”,8080 被称为 http,8087 被称为指标。
【问题讨论】: