google-kubernetes-engine

Difficulty configuring Horizontal Pod Autoscaler with external metric

守給你的承諾、 提交于 2019-12-24 10:21:54
问题 I'm attempting to configure a Horizontal Pod Autoscaler to scale a deployment based on the duty cycle of attached GPUs. I'm using GKE, and my Kubernetes master version is 1.10.7-gke.6 . I'm working off the tutorial at https://cloud.google.com/kubernetes-engine/docs/tutorials/external-metrics-autoscaling . In particular, I ran the following command to set up custom metrics: kubectl create -f https://raw.githubusercontent.com/GoogleCloudPlatform/k8s-stackdriver/master/custom-metrics-stackdriver

Get visitors real IP in PHP app running behind Kubernetes LoadBalancer service in GCE

半城伤御伤魂 提交于 2019-12-24 07:45:49
问题 I am having issues getting the visitors real IP in my PHP app. I have Kubernetes running in Google Container Engine (master: 1.4.8, node: 1.4.7). Service definition: apiVersion: v1 kind: Service metadata: name: app-service spec: type: LoadBalancer # spawning google loadbalancer selector: name: app # running simple php/nginx container ports: - port: 80 targetPort: 80 How can it be that the X-Forwarded-For headers etc. don't get passed through to my php app? I am only getting back the source ip

Mount local SSD drive in container

本秂侑毒 提交于 2019-12-24 07:17:08
问题 With GKE 117.0.0, local SSDs are supported with the --local-ssd-count option when creating clusters. Having tried this option I can see the additional SSD volume mounted in the nodes, but how can I access it from the containers? I was looking for a corresponding value to the Volumes.emptyDir.medium attribute, or something similar, but I haven't found anything in the docs. 回答1: As described in Overview of Local SSD support you can access the local SSD using a hostPath volume. 来源: https:/

Which backends are consuming Google Container Engine Kubernetes Quotas

落爺英雄遲暮 提交于 2019-12-24 06:41:32
问题 I am trying to setup an Ingress on Kubernetes on Google Container Engine and am getting quota exceeded errors (see abbrieviated output below). Name: my-ingress Address: Default backend: default-http-backend:80 (10.0.2.2:8080) Rules: Host Path Backends ---- ---- -------- * service1 service1:7010 (<none>) service2 service2:6884 (<none>) Annotations: ssl-redirect: false Events: FirstSeen LastSeen Count From Type Reason Message --------- -------- ----- ---- -------- ------ ------- 21s 21s 1

Permissions on GKE cluster

人走茶凉 提交于 2019-12-24 03:23:45
问题 After creation of a standard GKE cluster in the Google Cloud Platform Console I find when I click on the cluster and look at the clusters' setting s a 'Permissions' setting, which looks like this: what I don't understand is that I have allowed API access on a lot of these service I believe, so why does only 'Cloud Platform' show 'enabled'? Is this what is enabled at creation of the cluster maybe?! When selecting 'edit' you can not 'enable' these services from here..., so what exactly are

horizontal autoscaler in a GKE cluster

北城以北 提交于 2019-12-24 02:56:10
问题 I have horizontal pod autoscaler running on GKE. It works but its slow to respond to increases in workload, so I would like to try modifying a couple of the kube-controller-manager parameters, specifically: --horizontal-pod-autoscaler-upscale-delay --horizontal-pod-autoscaler-downscale-delay But the only CLI available seems to be kubectl. I have scoured docs and the client API but can find no way to do it, in fact this link suggested it may not be possible on GKE: change the horizontal-pod

Kubernetes 1.7 on Google Cloud: FailedSync Error syncing pod, SandboxChanged Pod sandbox changed, it will be killed and re-created

孤街浪徒 提交于 2019-12-24 01:25:03
问题 My Kubernetes pods and containers are not starting. They are stuck in with the status ContainerCreating . I ran the command kubectl describe po PODNAME , which lists the events and I see the following error: Type Reason Message Warning FailedSync Error syncing pod Normal SandboxChanged Pod sandbox changed, it will be killed and re-created. The Count column indicates that these errors are being repeated over and over again, roughly once a second. The full output is below from this command is

GKE: ingress loadbalancer does not use configured static IP

☆樱花仙子☆ 提交于 2019-12-24 00:25:37
问题 I've created a global static IP Address using terraform in GCP. However, when I try to assign it to an ingress controller inside a GKE cluster, it gets ignored: Here's my kubernetes configuration: apiVersion: extensions/v1beta1 kind: Ingress metadata: name: homefully-ingress annotations: kubernetes.io/ingress.global-static-ip-name: "homefully-ingress-root" labels: app: homefully-ingress spec: # ... the IP address referenced here looks like this: NAME REGION ADDRESS STATUS homefully-ingress

How to disable swapping in Elasticsearch on Kubernetes?

喜欢而已 提交于 2019-12-23 23:09:50
问题 As per the official es docs, disabling swapping is one of the best performance boosts available to Elasticsearch. However, it's proving to be difficult to configure. I've spent a number of hours researching and attempting different methods to disable swapping using the official ES docker image on Kubernetes. When setting bootstrap.memory_lock: true as an env variable, the image fails to boot up with the error: Unable to lock JVM Memory: error=12, reason=Cannot allocate memory. This can result

Cloud SQL Proxy and Insufficient Permission

故事扮演 提交于 2019-12-23 19:31:50
问题 I'm trying to deploy my Spring Boot/JHipster app on Google's Container Engine (GKE). I've figured out most things, but I'm having a problem with my database instance (a PostgreSQL instance running on Google Cloud SQL, with the Google SQL Proxy). I've followed the instructions here and here to set up my app. I've set up my PostreSQL instance in cloud, and created my app's database and user. I've created an SQL service with Cloud SQL Client role -- I grabbed the JSON key, and used it to create