2017-10-26 1 views
2

GKE上のロードバランサに静的な外部IPを設定しようとしていますが、運がありません。ここにKubernetesのサービス設定ファイルがあります:GKE上のロードバランサのスタティック外部IPを設定します。

kind: Service 
apiVersion: v1 
metadata: 
    name: myAppService 
spec: 
    selector: 
    app: myApp 
    ports: 
    - protocol: TCP 
    port: 3001 
    targetPort: 3001 
    type: LoadBalancer 
    loadBalancerIP: ********* 

これは動作しません。私は*********私の外部IPを見ることを期待しますが、それだけで保留言う:

➜ git:(master) kubectl get services 
NAME   CLUSTER-IP EXTERNAL-IP PORT(S)   AGE 
kubernetes ********* <none>  443/TCP   5m 
myAppService ********* <pending>  3001:30126/TCP 5m 

詳細:

➜ git:(master) kubectl describe services 
Name:   kubernetes 
Namespace:  default 
Labels:   component=apiserver 
      provider=kubernetes 
Annotations:  <none> 
Selector:  <none> 
Type:   ClusterIP 
IP:   ********* 
Port:   https 443/TCP 
Endpoints:  ********* 
Session Affinity: ClientIP 
Events:   <none> 


Name:   myAppService 
Namespace:  default 
Labels:   <none> 
Annotations:  <none> 
Selector:  app=myApp 
Type:   LoadBalancer 
IP:   ********* 
Port:   <unset> 3001/TCP 
NodePort:  <unset> 30126/TCP 
Endpoints: 
Session Affinity: None 
Events: 
    FirstSeen LastSeen Count From   SubObjectPath Type  Reason    Message 
    --------- -------- ----- ----   ------------- -------- ------    ------- 
    5m  20s  7 service-controller   Normal  CreatingLoadBalancer  Creating load balancer 
    5m  19s  7 service-controller   Warning  CreatingLoadBalancerFailed Error creating load balancer (will retry): Failed to create load balancer for service default/myAppService: Cannot EnsureLoadBalancer() with no hosts 

任意のアイデア? 404エラーをリンクhttp://terrenceryan.com/blog/index.php/making-kubernetes-ip-addresses-static-on-google-container-engine/

答えて

0

は不必要に複雑で長いドキュメントを通じ、時間がかかり、検索した後、このシンプルなブログは私の問題を解決しました。あなたは何をしましたか?
+0

: – koehn

関連する問題