google-kubernetes-engine

Unable to connect to the server: dial tcp accounts.google.com :443: getsockopt: operation timed out

百般思念 提交于 2019-12-13 03:43:57
问题 I'm trying to get the pods list from the gcloud project. The gcloud project I've created in the gcp using different laptop. Now I'm using different machine but logged into same gcp account and using same project. When I run the command kubectl get pods I get the below error. Unable to connect to the server: dial tcp a.b.c.d:443: getsockopt: operation timed out I tried to add an argument --verbose but that doesn't seems to be valid. How can I further proceed in resolving this error. 回答1:

Terraform: How to create named_port after google_container_cluster resource?

二次信任 提交于 2019-12-12 20:33:31
问题 I created a google_container_cluster ... resource "google_container_cluster" "primary" { name = "primary" # rest of the config ... } ... and now want to add a named_port to the managed instance group that is created on the fly by the google cloud platform. The google_container_cluster resource returns instance_group_urls. But I don't know how to use this output in order to create a named port. 回答1: This is not clear from your question, but I'm presuming you're using Google Container Engine

Terraform: How to create a Kubernetes cluster on Google Cloud (GKE) with namespaces?

北慕城南 提交于 2019-12-12 20:19:54
问题 I'm after an example that would do the following: Create a Kubernetes cluster on GKE via Terraform's google_container_cluster ... and continue creating namespaces in it, I suppose via kubernetes_namespace The thing I'm not sure about is how to connect the newly created cluster and the namespace definition. For example, when adding google_container_node_pool , I can do something like cluster = "${google_container_cluster.hosting.name}" but I don't see anything similar for kubernetes_namespace

Autoscaling based on GPU utilization?

给你一囗甜甜゛ 提交于 2019-12-12 20:18:03
问题 Autoscaling automatically adds/removes instances to my instance group based on CPU utilization. Is the same possible with GPU utilization instead? 回答1: You forgot to mention if it is for the Cluster Autoscaler or the Horizontal Pod Autoscaler . You also forgot to mention if it's in GKE or GCE. 1 - In GKE, there are two types of Autoscalers: a - The Cluster Autoscaler which adds nodes when new nodes are required: The Cluster Autoscaler scales the node-pool in the Cluster. In this situation,

How to mount volume into the source code of the app?

醉酒当歌 提交于 2019-12-12 18:18:08
问题 I have kubernetes pod where I am mounting my app source code as git volume. I tried various setups for how to put the source code into the pod and git volume was the one I ended up with in the end. But now I have an issue with data. My app has a files directory in it(empty) and I need to mount a volume(fuse) in there. But since the destination is located on the git volume I cannot do this. So I am wondering how should I redesign my app? Should I build the app's source code directly into the

how to solve EADDRINUSE in GKE container?

放肆的年华 提交于 2019-12-12 16:44:57
问题 I am new to containers and using GKE. I used to run my node server app with npm run debug and am trying to do this as well on GKE using the shell of my container. When I log into the shell of myapp container and do this I get: > api_server@0.0.0 start /usr/src/app > node src/ events.js:167 throw er; // Unhandled 'error' event ^ Error: listen EADDRINUSE :::8089 Normally I deal with this using something like killall -9 node but when I do this it looks like I am kicked out of my shell and the

How to differentiate whether the code is running in an emulator or in GKE when working with GCP's Datastore

时光毁灭记忆、已成空白 提交于 2019-12-12 16:41:22
问题 I am not sure whether I am missing any, after following the instructions given in https://cloud.google.com/datastore/docs/tools/datastore-emulator I was not able to connect to local emulator unless I create Datastore explicitly using DataStoreClient. DatastoreDb db = DatastoreDb.Create(projectId, string.Empty, new DatastoreClientImpl( new Datastore.DatastoreClient( new Channel("localhost", 8081, ChannelCredentials.Insecure)), new DatastoreSettings())); instead of just DatastoreDb.Create

Using Google Container Registry from GKE in another project

巧了我就是萌 提交于 2019-12-12 16:26:44
问题 How can a GKE cluster pull container images from a Container Registry hosted in another project? I have a GKE cluster in project <reader-project> trying to access a GCR image in project <registry-project> . I've tried adding the GCE service account email for <reader-project> as a User with Reader access on the storage bucket in <registry-project> , but I'm still getting the error: <Error><Code>AccessDenied</Code> <Message>Access denied.</Message> <Details>Caller does not have storage.objects

What are the relationships between Kubernetes services and clusters and Google Compute Engine objects?

孤人 提交于 2019-12-12 13:41:27
问题 I am setting a couple of services running on Google Container Engine, with traffic coming in through a Google HTTP Load Balancer, using path mapping. There is a good Google tutorial on setting up content-based load-balancing here, but it is all in terms of plain Google Compute objects like instance groups and backend services. I, however, have Kubernetes services, pods and clusters. What is the relationship between the Kubernetes objects and the Google Compute resources? How do I map between

Cannot create a deployment that requests more than 2Gi memory

巧了我就是萌 提交于 2019-12-12 11:16:51
问题 My deployment pod was evicted due to memory consumption: Type Reason Age From Message ---- ------ ---- ---- ------- Warning Evicted 1h kubelet, gke-XXX-default-pool-XXX The node was low on resource: memory. Container my-container was using 1700040Ki, which exceeds its request of 0. Normal Killing 1h kubelet, gke-XXX-default-pool-XXX Killing container with id docker://my-container:Need to kill Pod I tried to grant it more memory by adding the following to my deployment yaml : apiVersion: apps