191145686 发表于 2018-1-5 10:17:10

Kubernetes用户指南(二)

$ kubectl get svc nginxsvc -o json | grep -i nodeport -C 5  {
  "name": "http",
  "protocol": "TCP",
  "port": 80,
  "targetPort": 80,
  "nodePort": 32188
  },
  {
  "name": "https",
  "protocol": "TCP",
  "port": 443,
  "targetPort": 443,
  "nodePort": 30645
  }
  $ kubectl get nodes -o json | grep ExternalIP -C 2
  {
  "type": "ExternalIP",
  "address": "104.197.63.17"
  }
  --
  },
  {
  "type": "ExternalIP",
  "address": "104.154.89.170"
  }
  $ curl https://104.197.63.17:30645 -k
  ...
  <h1>Welcome to nginx!</h1>
页: [1]
查看完整版本: Kubernetes用户指南(二)