google-kubernetes-engine

How to verify ownership of Google Cloud Endpoints service URL?

孤人 提交于 2019-12-07 02:11:39
问题 I already set up Google Cloud Endpoints project and can invoke http/https requests. Endpoints gives me MY_API.endpoints.MY_PROJECT.cloud.goog domain name that I can use. I'm using gRPC Cloud Endpoints with HTTP/JSON to gRPC transcoding feature. It is deployed on Google Kubernetes Engine (deployment yaml script attached at the end). When I'm trying to create push subscription with that URL I getting next error: "The supplied HTTP URL is not registered in the subscription's parent project (url=

How to send alerts based on Kubernetes / Docker events?

China☆狼群 提交于 2019-12-07 01:37:11
问题 Is it possible to somehow send alerts (to email / slack) based on events that occur within a Kubernetes cluster? In particular, it would be useful to get an alert if a pod has restarted unexpectedly or if a pod cannot start. Similarly it would be useful to know if a pod's CPU usage was over a certain threshold and get an alert. We have Heapster (with InfluxDB / Grafana backend) installed. While this gives useful data, it unfortunately does not provide us with alerting. 回答1: Both sysdig and

Does GKE support nginx-ingress with static ip?

元气小坏坏 提交于 2019-12-06 23:45:52
问题 I have been using the Google Cloud ingress. Also deployed the nginx-ingress and trying to setup using static-ip address in GKE. Can we use both Google Cloud ingress and nginx-ingress in same cluster? How can we use the nginx-ingress with static-ip? Thanks 回答1: First question As Radek 'Goblin' Pieczonka already pointed you out it is possible to do so. I just wanted to link you to the official documentation regarding this matter: If you have multiple Ingress controllers in a single cluster, you

Shiny app docker container not loading in browser

微笑、不失礼 提交于 2019-12-06 16:36:04
I containerised a shiny app and attempted to deploy it on GCP using Kubernetes but each time I obtain the external IP address and load it in the browser, I get the "this site cannot be reached connection refused" error. So I have attempted to run the container on my localhost to troubleshoot and now I get the "127.0.0.1 didn’t send any data. ERR_EMPTY_RESPONSE" error. I searched tirelessly online for a solution but nothing seems to work for me. Plus none of the solutions on are for a shiny app docker container. Many of the fixes mention the port but I am still stuck. I have xampp installed on

How to access the Kubernetes API in Go and run kubectl commands

我的未来我决定 提交于 2019-12-06 14:02:20
问题 I want to access my Kubernetes cluster API in Go to run kubectl command to get available namespaces in my k8s cluster which is running on google cloud. My sole purpose is to get namespaces available in my cluster by running kubectl command: kindly let me know if there is any alternative. 回答1: You can start with kubernetes/client-go, the Go client for Kubernetes, made for talking to a kubernetes cluster. (not through kubectl though: directly through the Kubernetes API) It includes a

How to vertically scale google cloud instance without stopping running app

▼魔方 西西 提交于 2019-12-06 13:35:55
问题 I have a Node.js app that provides a service which cannot be interrupted. However the load to the app varies overtime and to save cost I would like the vm instance machine type to autoscale in function of the load (ie when over 80% CPU utilisation, scale up from 1 vCPU(3.75 GB memory, n1-standard-1) to 2vCPU(7.5 GB memory, n1-standard-2)) Is this possible? PS: I have looked at using the container engine and kubernetes but due to how the app operates, the app cannot be replicated to multiple

Distributed Programming on Google Cloud Engine using Python (mpi4py)

早过忘川 提交于 2019-12-06 13:35:32
问题 I want to do distributed programming with python using the mpi4py package. For testing reasons, I set up a 5-node cluster via Google container engine, and changed my code accordingly. But now, what are my next steps? How do I get my code running and working on all 5 VMs? I tried to just ssh-connect into one VM from my cluster and run the code, but it was obvious that the code was not getting distributed, but instead stayed on the same machine :( [see example below] . Code: from mpi4py import

Setting cache-control headers for nginx ingress controller on kubernetes GKE

拟墨画扇 提交于 2019-12-06 11:45:15
问题 I have an ingress-nginx controller handling traffic to my Kubernetes cluster hosted on GKE. I set it up using helm installation instructions from docs: Docs here For the most part everything is working, but if I try to set cache related parameters via a server-snippet annotation, all of the served content that should get the cache-control headers comes back as a 404 . Here's my ingress-service.yaml file: apiVersion: extensions/v1beta1 kind: Ingress metadata: name: ingress-service annotations:

How to set a minimum scale for Cloud Run on GKE services?

房东的猫 提交于 2019-12-06 11:42:16
问题 I'm using Cloud Run on Google Kubernetes Engine and I'm able to deploy and access services without a problem. But since I'm running on GKE and paying for the cluster 24/7 it makes no sense to scale a deployment to zero and always have a cold start for the first request. I've found that's it's possible to set minScale for the Knative autoscaler to disable scale to zero here, here and here, but I have no idea where to put it. There are a lot of configurations, services and workloads inside GKE

Google Cloud Jenkins gcloud push access denied

倾然丶 夕夏残阳落幕 提交于 2019-12-06 10:48:43
I'm trying via Jenkins to push an image to the container repository. It was working at first, but now, I got "access denied" docker -- push gcr.io/xxxxxxx-yyyyy-138623/myApp:master.1 The push refers to a repository [gcr.io/xxxxxxx-yyyyy-138623/myApp] bdc3ba7fdb96: Preparing 5632c278a6dc: Waiting denied: Access denied. the Jenkinsfile look like : sh("gcloud docker --authorize-only") sh("docker -- push gcr.io/xxxxxxx-yyyyy-138623/hotelpro4u:master.1") Remarks: Jenkins is running in Google Cloud If I try in Google Shell or from my computer, it's working I followed this tutorial : https://github