<p>I am trying to learn Google Cloud and very new to it.</p>
<p>I created 1 project in GCP: <strong>project1</strong>.</p>
<p>And I created a Kubernetes cluster in project1 with the name <strong>p1-cluster1</strong>. In this cluster, I click on the <strong>Connect</strong> button and a terminal is opened on GCP page. I created a new directory with the name <strong>development</strong> under <strong>/home/me</strong>. And I have developed a personal project under <strong>/home/me/development</strong> so that I now have a bunch of code here.</p>
<p>I decided to develop a second personal project. For this purpose, I created a new project with the name <strong>project2</strong> in GCP. And then created a new Kubernetes cluster with the name <strong>p2-cluster2</strong>. And when I connect to this cluster, a terminal window opens, and I automatically end up in my home folder <strong>/home/me</strong>. I expect to see an empty folder but I instead see the <strong>development</strong> folder that I created in <strong>project1</strong> in <strong>p1-cluster1</strong>.</p>
<p>Why do I see contents/files of another project (and another cluster) in a different project (and cluster)? Am I doing something wrong? If this is normal, what is the benefit of creating different projects?</p>
<p>I can create a new folder with the name <strong>development_2</strong>. But what if I accidentally ruin things (i.e. operative system) when working under <strong>development</strong> folder..? Do I also ruin things for the project under the <strong>development_2</strong> folder?</p>
<p>And also, if I simultaneously run 2 tasks in 2 different projects, will they be competing with each other for the system resources (i.e. memory and CPU)?</p>
<p>This is extremely confusing and I could not make it clear to me by looking at documentation. I would really appreciate help of more experienced people in this specific domain.</p>

edn
<p>I suppose you use Cloud shell to &quot;connect&quot; to the clusters. This is just a convenient way instead of using your own machine's shell. You get a machine which can be used for development instead of your local machine.</p>
<p>Therefore you have the same files and the some directory. It is not on the GKE Cluster, but a &quot;local&quot; machine from the perspective of GKE.</p>
<p>In order to actually execute something on the cluster you have to use <code>kubectl</code> which has a concept of kube contexts. If you have multiple clusters, then you need multiple kube contexts.</p>
<p>So if you &quot;Connect&quot; that from p1-cluster1 your kube-context will be set to that cluster.</p>
<p>See these articles for more detail:</p>
<p><a href="https://cloud.google.com/kubernetes-engine/docs/quickstart#launch" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/quickstart#launch</a></p>
<p><a href="https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl</a></p>
<p>EDIT:</p>
<p>So when you do</p>
<pre><code>gcloud container clusters get-credentials p1-cluster1
</code></pre>
<p>on your local machine, you can the context to call</p>
<pre><code>kubectl get pods
</code></pre>
<p>on that cluster. Only that command is executed on the cluster.</p>
