<p>I have a docker image in my local machine which I have pushed to Google Cloud Containers.
Now I want to deploy this image in Google Kubernetes Engine.</p>
<p>I am following the steps in below link -</p>
<p><a href="https://cloud.google.com/cloud-build/docs/deploying-builds/deploy-gke#deploying_a_pre-built_container_image" rel="nofollow noreferrer">https://cloud.google.com/cloud-build/docs/deploying-builds/deploy-gke#deploying_a_pre-built_container_image</a></p>
<p>I will create a YAML deployment config file.</p>
<p>My problem is where Do I need to keep this file in google cloud so that it can be used for deployment.
Also, in YAML file what is nginx - I have used the default one. Where do I need to keep this YAML config file.
ms_aggregator is name of my image</p>
<pre><code> apiVersion: &quot;apps/v1&quot;
kind: &quot;Deployment&quot;
metadata:
  name: &quot;deployment-aggregator&quot;
spec:
  replicas: 1
  selector:
    matchLabels:
      app: &quot;nginx-1&quot;
  template:
    metadata:
      labels:
        app: &quot;nginx-1&quot;
    spec:
      containers:
      - name: &quot;nginx-1&quot;
        image: &quot;ms_aggregator&quot;
</code></pre>

Hershika Sharma
<p>You are mixing two things. The docs which you are referring is of GKE deploy builder which is a wrapper around kubectl. This will deploy the built image using Google Cloud's recommended  deployment mechanism and you do not need a Kubernetes deployment yaml file. This is more of CI/CD a style.</p>
<p>Now if you want to deploy the pre built image using a Kubernetes deployment yaml that you have already you do not need GKE deploy and you can configure and use kubectl directly for this.</p>
<p>Following this guide <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl" rel="nofollow noreferrer">here</a> configure <code>kubectl</code> to access GKE cluster.</p>
<p>After that you can do <code>kubectl apply -f deployment.yaml</code> to deploy the image as a container in GKE. The <code>deployment.yaml</code> file can be anywhere in the system where you are configuring <code>kubectl</code></p>
