2017-04-01 91 views
2

我正在運行kubernetes v1.5(API參考here)。字段service.spec.loadBalancerIp應該存在,但當我嘗試設置它時,我不斷收到以下錯誤。爲什麼kubernetes v1.5不能識別service.spec.loadBalancerIp?

error: error validating ".../service.yaml": error validating data: found invalid field loadBalancerIp for v1.ServiceSpec; if you choose to ignore these errors, turn validation off with --validate=false

service.yaml:

kind: Service 
apiVersion: v1 
metadata: 
    name: some-service 
spec: 
    type: LoadBalancer 
    loadBalancerIp: xx.xx.xx.xx 
    selector: 
    deployment: some-deployment 
    ports: 
    - protocol: TCP 
     port: 80 

kubectl版本輸出:

Client Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.4", GitCommit:"7243c69eb523aa4377bce883e7c0dd76b84709a1", GitTreeState:"clean", BuildDate:"2017-03-07T23:53:09Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"darwin/amd64"} 
Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.4", GitCommit:"7243c69eb523aa4377bce883e7c0dd76b84709a1", GitTreeState:"clean", BuildDate:"2017-03-07T23:34:32Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"} 

我跑我的羣集上GKE。

有什麼想法?

回答

2

您的規格有拼寫錯誤。它應該是loadBalancerIP,而不是loadBalancerIp。注意大寫P

+1

哇。不能相信我錯過了這一點。萬分感謝。 –