google-kubernetes-engine

Debugging a container in a crash loop on Kubernetes

故事扮演 提交于 2019-12-10 12:58:00
问题 In GKE, I have a pod with two containers. They use the same image, and the only difference is that I am passing them slightly different flags. One runs fine, the other goes in a crash loop. How can I debug the reason for the failure? My pod definition is apiVersion: v1 kind: ReplicationController metadata: name: doorman-client spec: replicas: 10 selector: app: doorman-client template: metadata: name: doorman-client labels: app: doorman-client spec: containers: - name: doorman-client

GKE traefik fails to create rbac permissions

大兔子大兔子 提交于 2019-12-10 10:19:27
问题 I am trying to install traefik as an ingress controller on GKE (google cloud kubernetes engine) and when I try: kubectl apply -f https://raw.githubusercontent.com/containous/traefik/master/examples/k8s/traefik-rbac.yaml I have this error: Error from server (Forbidden): error when creating "https://raw.githubusercontent.com/containous/traefik/master/examples/k8s/traefik-rbac.yaml": clusterroles.rbac.authorization.k8s.io "traefik-ingress-controller" is forbidden: attempt to grant extra

cannot fetch token error when using cloudsql-proxy with GKE

狂风中的少年 提交于 2019-12-10 09:31:38
问题 I am using GKE with istio add-on enabled. Myapp somehow gives 503 errors using when using websocket. I am starting to think that maybe the websocket is working but the database connection is not and that causes 503's, as the cloudsql-proxy logs give errors: $ kubectl logs myapp-54d6696fb4-bmp5m cloudsql-proxy 2019/01/04 21:56:47 using credential file for authentication; email=proxy-user@myproject.iam.gserviceaccount.com 2019/01/04 21:56:47 Listening on 127.0.0.1:5432 for myproject:europe

GKE kubernetes delayed_job pod logs

巧了我就是萌 提交于 2019-12-10 03:54:21
问题 I have a deployment object with the following rake jobs:work command: apiVersion: extensions/v1beta1 kind: Deployment metadata: name: staging-delayed-job-deployment namespace: staging spec: template: metadata: labels: env: staging name: delayed-job spec: containers: - name: job image: gcr.io/ej-gc-dev/redacted:<%= ENV['IMAGE_TAG'] %> command: ["/bin/bash", "-l", "-c"] args: ["RAILS_ENV=production bundle exec rake jobs:work"] When I run kubectl logs I get nothing. How do I get the rake jobs

How to backup a Postgres database in Kubernetes on Google Cloud?

♀尐吖头ヾ 提交于 2019-12-10 02:50:02
问题 What is the best practice for backing up a Postgres database running on Google Cloud Container Engine? My thought is working towards storing the backups in Google Cloud Storage, but I am unsure of how to connect the Disk/Pod to a Storage Bucket. I am running Postgres in a Kubernetes cluster using the following configuration: apiVersion: extensions/v1beta1 kind: Deployment metadata: name: postgres-deployment spec: replicas: 1 template: metadata: labels: app: postgres spec: containers: - image:

How to list the published container images in the Google Container Registry using gcloud or another CLI

落花浮王杯 提交于 2019-12-10 02:06:35
问题 Is there a gcloud API or other command line interface (CLI) to access the list of published container images in the private Google Container Registry? (That is the container registry inside a Google Cloud Platform project) gcloud container does not seem to help: $ gcloud container Usage: gcloud container [optional flags] <group | command> group may be clusters | operations command may be get-server-config Deploy and manage clusters of machines for running containers. flags: --zone ZONE, -z

How do you set a static IP address for a Google Container Engine (GKE) service?

♀尐吖头ヾ 提交于 2019-12-09 17:53:58
问题 A little bit of background: I have a Go service that uses gRPC to communicate with client apps. gRPC uses HTTP2, so I can't use Google App Engine or the Google Cloud HTTP Load Balancer. I need raw TCP load balancing from the internet to my Go application. I went through the GKE tutorials and read the various docs and I can't find any way to give my application a static IP address. So how do you get a static IP attached to something running in GKE? 回答1: This is not supported in kubernetes v1.0

ImagePullBackOff error Google Kubernetes Engine

北城余情 提交于 2019-12-09 11:56:33
问题 I know a lot of people already had similar question, i read a few of them, but found nothing what actualy helped me so far. I have a gitlab with private repo enabled, I also use Google Kubernetes Engine. I have a few Docker container in my private repo, and I want to deploy one of them to the Kubernetes Engine. I have created a secret with kubectl create secret generic db-user-pass --from-file=./username.txt --from-file=./password.txt I also tried kubectl create secret docker-registry name -

Disabling cronjob in Kubernetes

女生的网名这么多〃 提交于 2019-12-09 07:57:07
问题 I have scheduled an application to run as Cronjob in Kubernetes. When there is code change, I'm changing image in CronJob. I'm looking for an option where I can disable currently running CronJob and deploy new CronJob with newly created Image. How to disable a Cronjob in Kubernetes without deleting yaml? 回答1: If you want to suspend cronjob via patch, use: kubectl patch cronjobs <job-name> -p '{"spec" : {"suspend" : true }}' 回答2: You can use something which will be valid with respect to Cron

Logging using Stackdriver API on Kubernetes / Google Container Engine (GKE)

做~自己de王妃 提交于 2019-12-09 03:54:36
问题 I have a go application that leverages Google Cloud Logging API. The relevant code is the same as this sample from their documentation: https://github.com/GoogleCloudPlatform/golang-samples/blob/master/logging/logging_quickstart/main.go After checking it works with minikube (my payload appears in the Global category of my logs viewer), I deploy the app on Google Container Engine (GKE). Once deployed there, I can no longer see the logs the app sends through the logging API. The logs written to