Kubernetes service external ip pending

后端 未结 20 1922
你的背包
你的背包 2020-11-28 02:38

I am trying to deploy nginx on kubernetes, kubernetes version is v1.5.2, I have deployed nginx with 3 replica, YAML file is below,

apiVersion: extensions/v1be         


        
20条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-28 03:19

    You can patch the IP of Node where pods are hosted ( Private IP of Node ) , this is the easy workaround .

    Taking reference with above posts , Following worked for me :

    kubectl patch service my-loadbalancer-service-name \ -n lb-service-namespace \ -p '{"spec": {"type": "LoadBalancer", "externalIPs":["xxx.xxx.xxx.xxx Private IP of Physical Server - Node - where deployment is done "]}}'

提交回复
热议问题