<p>Currently I'm using Kubernetes version 1.11.+. Previously I'm always using the following command for my <em>cloud build</em> scripts:</p>

<pre><code>- name: 'gcr.io/cloud-builders/kubectl'
  id: 'deploy'
  args:
  - 'apply'
  - '-f'
  - 'k8s'
  - '--recursive'
  env:
  - 'CLOUDSDK_COMPUTE_ZONE=${_REGION}'
  - 'CLOUDSDK_CONTAINER_CLUSTER=${_CLUSTER_NAME}'
</code></pre>

<p>And the commands just working as expected, at that time I'm using k8s version 1.10.+. However recently I got the following error:</p>

<blockquote>
  <ul>
  <li>spec.clusterIP: Invalid value: "": field is immutable</li>
  <li>metadata.resourceVersion: Invalid value: "": must be specified for an update</li>
  </ul>
</blockquote>

<p>So I'm wondering if this is an expected behavior for Service resources?</p>

<p>Here's my YAML config for my service:</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: {name}
  namespace: {namespace}
  annotations:
    beta.cloud.google.com/backend-config: '{"default": "{backend-config-name}"}'
spec:
  ports:
   - port: {port-num}
     targetPort: {port-num}
  selector:
    app: {label}
    environment: {env}
type: NodePort
</code></pre>

<p>This is due to <a href="https://github.com/kubernetes/kubernetes/issues/71042" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/71042</a></p>

<p><a href="https://github.com/kubernetes/kubernetes/pull/66602" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/pull/66602</a> should be picked to 1.11</p>
