google-kubernetes-engine

Google Container Engine - How to auto-scale an instance group based on HTTP load?

半世苍凉 提交于 2019-12-12 04:59:08
问题 In Google Container Engine, when using an L7 ingress, what’s the correct way to auto-scale an instance group based on HTTP load? When I try to enable auto-scaling for my instance group, I get the warning that I must add the instance group the L7 ingress’ backend service. However, the backend service is already using a k8-ig group, which I cannot enable auto-scaling for. 回答1: Autoscaling based on HTTP load is not currently supported through the Ingress. You can of course grow the size of you

Kubernetes deployment cannot mount volume despite equivalent gcloud/mnt works fine [closed]

最后都变了- 提交于 2019-12-12 03:44:07
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I have a Kubernetes deployment where a pod should mount a PD. Under spec.template.spec.containers.[*] I have this: volumeMounts: - name: app-volume mountPath: /mnt/disk/app-pd and under spec.template.spec that: volumes: - name: app-volume gcePersistentDisk: pdName: app-pd fsType: ext4 app-pd is a GCE persistent

kubectl oauth2 authentication with container engine fails

随声附和 提交于 2019-12-12 03:37:34
问题 I use the following commands in my deployment pipeline to set up kubectl for use with container engine gcloud auth activate-service-account ***@***.iam.gserviceaccount.com --key-file /var/go/.gcloud/***.json gcloud config set account ***@***.iam.gserviceaccount.com gcloud config set project gcloud-projectx gcloud container clusters get-credentials gke-cluster --zone europe-west1-c Since a recent gcloud update when running kubectl version this fails with the following error Client Version:

Submit jobs using API Client Library for Python?

夙愿已清 提交于 2019-12-12 02:43:27
问题 Does API Client Library for Python support creation and deletion of pods and jobs on google container engine? 回答1: Given that Kubernetes comes with a Swagger spec (1.2, not the latest version), you can use swagger-codegen to generate an Python API client for it. Here is an example to generate Python API client using https://generator.swagger.io: curl -X POST -H "content-type:application/json" -d '{"swaggerUrl":"https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/swagger-spec/v1

Expose database to deployment on GKE

拟墨画扇 提交于 2019-12-11 21:12:51
问题 I have a deployment running a pod that needs access to a postgres database I am running in the same cluster as the kubernetes cluster. How do I create a service that selects the deployment such that it has access. My pods keep restarting as the connection times out. I have created firewall rules in the vpc subnet to allow internal communication and have modified pg_hba.conf and postgresql.conf My deployment definition is given below: apiVersion: apps/v1 kind: Deployment metadata: name: api

Ingress on GKE remains in status “Backend unhealthy”

徘徊边缘 提交于 2019-12-11 17:55:51
问题 Given: a simple pod running an nginx a nodeport service an ingress When calling the pod from within the cluster we get a 200 response code When calling the service from within the cluster we get a 200 response code The ingress shows as annotation: ingress.kubernetes.io/backends: '{"k8s-be-30606--559b9972f521fd4f":"UNHEALTHY"}' To top things of, we have a different kubernetes cluster with the exact same configuration (apart from the namespace dev vs qa & timestamps & assigned ips & ports)

Jetstack cert-manager and GKE private cluster (failed to verify ACME account)

非 Y 不嫁゛ 提交于 2019-12-11 16:29:19
问题 I have installed the Jetstack cert-manager within my private GKE cluster. That all went well, but I can't get a certificate issued. The error that I get is: E1101 03:45:15.754642 1 sync.go:184] cert-manager/controller/challenges "msg"="propagation check failed" "error"="wrong status code '404', expected '200'" "dnsName"="[snip]" "resource_kind"="Challenge" "resource_name"="[snip]-certificate-2096248848-189663135-2951658629" "resource_namespace"="default" "type"="http-01" I1101 03:45:15.755017

Unable to communicate between 2 node,js apps in Istio enabled GKE cluster

我怕爱的太早我们不能终老 提交于 2019-12-11 15:52:39
问题 I have created a GKE cluster and deployed two node.js basic apps in it named nodeservice1 and nodeservice2 where only nodeservice1 is open to world (Allow unauthenticated calls=true) . My nodeservice1 is internally calling nodeservice2 via restcall and returning what nodeservice2 returns. I am able to call nodeservice1 via curl command, it works fine. When I hit endpoint ../restcall (Which actually calls nodeservice2 internally), it doesn't return anything but HTTPS 200 OK . Note: Both of the

How to change time-to-live of GKE cluster events (from default 1h0m0s)?

那年仲夏 提交于 2019-12-11 15:32:06
问题 I am running GKE k8s deployments/jobs that take a long time to execute - from days to weeks (Machine Learning). Default GKE Events expire after 1h, which is not enough to debug problems that can occur during training, like OOMKilling, etc. kube-apiserver isn't exposed in GKE, so I'd like to find a way to access and change a property like event-ttl . How can I change event-ttl for an already launched cluster, or how to specify event-ttl at a cluster creation? For example if I would like all my

Insufficient Oauth scope when trying to deploy Jenkins click to deploy on an existing Google Kubernetes Engine cluster

放肆的年华 提交于 2019-12-11 15:01:10
问题 I have an existing Google Kubernetes Engine cluster where I want to deploy a Jenkins server. GKE offers a marketplace with a click to deploy Jenkins image that I wanted to use but when I try to select my cluster it is marked as ineligible cluster with the message insufficient Oauth scope . How can I work around this? 回答1: You get this error because of the node pool if your cluster doesn't have the right scopes to deploy the Jenkins server, Unfortunately you cannot stop the nodes to change