下载文件https://github.com/openshift/origin/blob/master/examples/hello-openshift/hello-pod.json并执行以下命令:
oc cluster up
oc create -f hello-pod.json
oc get pod hello-openshift -o yaml |grep podIP
它将返回IP地址,假设:
podIP: 172.17.0.6
执行命令:
curl 172.17.0.6:8080
它将返回 curl:(7)无法连接到172.17.0.6端口8080:操作超时
信息:
oc v3.10.0+dd10d17
kubernetes v1.10.0+b81c8f8
features: Basic-Auth
Server https://127.0.0.1:8443
openshift v3.10.0+e3465d0-44
kubernetes v1.10.0+b81c8f8