0

am trying to create a GKE job by following the instructions in the official documentation.

I am doing it though via Cloud Shell. I have created the yaml file, however when I run the command:

kubectl apply -f config.yaml

I am getting the following error:

Unable to connect to the server: context deadline exceeded

What is the problem and what exactly is a context deadline?

I have made sure to enable the GKE API.

I wondered whether I needed to create a cluster first before submitting the job, but the tutorial makes no mention of creating a cluster.

2bon2b
  • 1
  • 1
  • 1
    Yes you need to create a cluster and you need to use this [gcloud command](https://cloud.google.com/sdk/gcloud/reference/container/clusters/get-credentials) to have access to the control plane (will create the kubeconfig file that kubectl tool needs to reach the endpoint). Curious which tutorial you are implementing ? – Fady Jun 10 '21 at 01:54
  • thanks @Fady it was from the gke documentation: https://cloud.google.com/kubernetes-engine/docs/how-to/jobs – 2bon2b Jun 10 '21 at 18:46
  • You might have missed it, but it was stated in the [Overview](https://cloud.google.com/kubernetes-engine/docs/how-to/deploying-workloads-overview) of the documentation ¨These controller objects represent the applications, daemons, and batch jobs running on your clusters.¨ – Alex G Jun 10 '21 at 20:35

0 Answers0