<p>I am trying to set a react app to a kubernetes cluster. All my kubernetes files resides in k8s/ folder. In k8s/ folder I have a deployment.yaml and service.yaml file.</p>
<p>The below is my cloudbuild.yaml file which resides in the root folder. This part <code>gcr.io/cloud-builders/kubectl</code> Stage 3 is failing. I get the below error</p>
<pre><code>build step 2 &quot;gcr.io/cloud-builders/kubectl&quot; failed: step exited with non-zero status: 1
</code></pre>
<pre><code>steps:

# Build the image - Stage 1
- name: 'gcr.io/cloud-builders/docker'
  args: ['build','-t','gcr.io/${_PROJECT}/${_CONTAINERNAME}:${_VERSION}','.']
  timeout: 1500s

# Push the image - Stage 2
- name: 'gcr.io/cloud-builders/docker'
  args: ['push','gcr.io/${_PROJECT}/${_CONTAINERNAME}:${_VERSION}']
  
# Deploy changes to kubernetes config files - Stage 3
- name: &quot;gcr.io/cloud-builders/kubectl&quot;
  args: [&quot;apply&quot;, &quot;-f&quot;, &quot;k8s/&quot;]
  env:
  - 'CLOUDSDK_COMPUTE_ZONE=${_ZONE}'
  - 'CLOUDSDK_CONTAINER_CLUSTER=${_GKE_CLUSTER}'

# These are variable substitutions  
substitutions:
    #GCP Specific configuration. Please DON'T change anything
    _PROJECT: my-projects-121212
    _ZONE: us-central1-c
    _GKE_CLUSTER: cluster-1
    
    #Repository Specific configuration. DevOps can change this settings
    _DEPLOYMENTNAME: react
    _CONTAINERNAME: react    
    _REPO_NAME: react-app
    
    # Developers ONLY change
    _VERSION: v1.0
    
options:
    substitution_option: 'ALLOW_LOOSE'
    machineType: 'N1_HIGHCPU_8' 
timeout: 2500s
</code></pre>

jeril
<p>In step 3, there are double quotes <code>name: &quot;gcr.io/cloud-builders/kubectl&quot;</code></p>
<p>If you replace them with single quotes, the issue should be fixed.</p>
