在我的本地openshift集群上配置路由器后,我遇到了一个问题。
[root @ yangyang〜]#oc获取pod -n默认值
NAME READY STATUS RESTARTS AGE
docker-registry-1-v9wq2 1/1 Running 2 23h
hello-openshift-1-2lvnm 1/1 Running 2 23h
router-1-wclfm 1/1 Running 1 33m
[root @ yangyang〜]#oc获取路线
NAME HOST/PORT
PATH SERVICES PORT TERMINATION WILDCARD
hello-openshift hello-openshift-default.router.default.svc.cluster.local
hello-openshift 8080-tcp None
[root @ yangyang〜]#oc get svc | grep hello
hello-openshift 172.30.122.129 <none> 8080/TCP,8888/TCP 23h
[root @ yangyang〜]#curl 172.30.122.129:8080
Hello OpenShift!
[root @ yangyang〜]#curl hello-openshift-default.router.default.svc.cluster.local
curl: (6) Could not resolve host: hello-openshift-
default.router.default.svc.cluster.local; Name or service not known
问题:给我“名称或服务未知”错误,可以给我帮助吗?