我是kubernetes的新手,需要您的帮助。 我按照page上的安装说明进行操作,一切正常。以下是安装后的一些信息:
~ > kubectl version
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.1", GitCommit:"eec55b9ba98609a46fee712359c7b5b365bdd920", GitTreeState:"clean", BuildDate:"2018-12-13T19:44:10Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.4", GitCommit:"f49fa022dbe63faafd0da106ef7e05a29721d3f1", GitTreeState:"clean", BuildDate:"2018-12-14T06:59:37Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"}
~ > kubectl cluster-info
Kubernetes master is running at https://192.168.99.101:8443
~ > minikube ip
192.168.99.101
然后,我尝试运行一个简单的hello world服务:
~ > minikube start
~ > kubectl get nodes
NAME STATUS ROLES AGE VERSION
minikube Ready <none> 18h v1.12.4
~ > kubectl run hw --image=karthequian/helloworld --port=80
kubectl run --generator=deployment/apps.v1 is DEPRECATED and will be removed in a future version. Use kubectl run --generator=run-pod/v1 or kubectl create instead.
deployment.apps/hw created
~ > kubectl get deployments
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
hw 1 1 1 1 21s
~ > kubectl get rs
NAME DESIRED CURRENT READY AGE
hw-854c64787 1 1 1 71s
~ > kubectl get pods
NAME READY STATUS RESTARTS AGE
hw-854c64787-8xhw6 1/1 Running 0 59s
~ > kubectl expose deployment hw --type=NodePort
service/hw exposed
~> kubectl get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
hw NodePort 10.106.4.194 <none> 80:31269/TCP 6m23s
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 20h
~ > minikube service hw
Opening kubernetes service default/hw in default browser...
我做错了吗?有什么我没有配置好的吗?谢谢。