google-kubernetes-engine

502 Server Error when creating http load balancer in google/GKE

喜你入骨 提交于 2021-02-05 11:48:55
问题 My application consists of play web application deployed using GKE. The application was running fine (using Deployment and Loadbalancer service) and then I decided to use Ingress . I made the following changes which has made the application unreachable. I get 502 error when I try to connect with the application using ingress IP. The application is of kind Deployment . apiVersion: apps/v1 kind: Deployment metadata: name: webapp spec: replicas: 2 selector: matchLabels: app: webapp It has a

502 Server Error when creating http load balancer in google/GKE

蓝咒 提交于 2021-02-05 11:48:00
问题 My application consists of play web application deployed using GKE. The application was running fine (using Deployment and Loadbalancer service) and then I decided to use Ingress . I made the following changes which has made the application unreachable. I get 502 error when I try to connect with the application using ingress IP. The application is of kind Deployment . apiVersion: apps/v1 kind: Deployment metadata: name: webapp spec: replicas: 2 selector: matchLabels: app: webapp It has a

unexpected behavior using zip-stream NPM on Google k8s

允我心安 提交于 2021-02-04 08:33:30
问题 I am working on creating a zip of multiple files on the server and stream it to the client while creating. Initially, I was using ArchiverJs It was working fine if I was appending buffer to it but it fails when I need to add streams into it. Then after having some discussion on Github, I switched to Node zip-stream which started working fine thanks to jntesteves . But as I deploy the code on GKE k8s I Started getting Network Failed errors for huge files. Here is my sample code : const

Gcloud - cloud run deployment fails for deployment to GKE

房东的猫 提交于 2021-01-29 21:32:07
问题 I am trying to deploy a sample angular app to GKE. I created a sample cluster enabling cloud run and istio services in it gcloud beta container clusters create new-cluster \ --addons=HorizontalPodAutoscaling,HttpLoadBalancing,Istio,CloudRun \ --machine-type=n1-standard-2 \ --cluster-version=latest \ --zone=us-east1-b \ --enable-stackdriver-kubernetes --enable-ip-alias \ --scopes cloud-platform --num-nodes 4 --disk-size "10" --image-type "COS" Following is my cloudbuild.yaml file steps: #

Gcloud - cloud run deployment fails for deployment to GKE

╄→尐↘猪︶ㄣ 提交于 2021-01-29 19:23:07
问题 I am trying to deploy a sample angular app to GKE. I created a sample cluster enabling cloud run and istio services in it gcloud beta container clusters create new-cluster \ --addons=HorizontalPodAutoscaling,HttpLoadBalancing,Istio,CloudRun \ --machine-type=n1-standard-2 \ --cluster-version=latest \ --zone=us-east1-b \ --enable-stackdriver-kubernetes --enable-ip-alias \ --scopes cloud-platform --num-nodes 4 --disk-size "10" --image-type "COS" Following is my cloudbuild.yaml file steps: #

Getting 403 error while trying to create Pods using Custom Service Account

偶尔善良 提交于 2021-01-29 17:32:42
问题 I created following objects in k8s cluster. Namespace ( testpsp ) Custom ServiceAccount ( testuser ) Role and RoleBindings via. Manifest files Please see below the yaml files for Role and RoleBinding resources. $ cat developer.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: developer namespace: testpsp rules: - apiGroups: - "" resources: - pods verbs: - get - create - apiGroups: - extensions - apps resources: - deployments - replicasets verbs: - '*' $ cat developer

Terraform google_container_cluster adjust maximum retry budget

孤者浪人 提交于 2021-01-29 17:30:59
问题 I keep getting "Retry budget exhausted (80 attempts)", which takes about 10 minutes. Is there a way to reduce the maximum retry budget so I can iterate my configurations faster? Using https://registry.terraform.io/modules/terraform-google-modules/kubernetes-engine/google/7.3.0 回答1: Unfortunately maximum retry budget is not adjustable at the moment. You can take a look at the closely related issue registered on Google's issue tracker . If you're interested in this functionality I would

How to set ingress-nginx custom errors

只谈情不闲聊 提交于 2021-01-29 13:49:10
问题 I use the kubernetes ingress-nginx controller and a set custom errors on GKE but I have some problems. Goal: If a 50x error occurs in something-web-app , I'll return the HTTP status code 200 and JSON {"status":200, "message":"ok"} Problems: I have read the custom-errors document but there is no example of how to customize the default-backend . I do not understand the difference between ConfigMap and Annotation. How does ingress-nginx controller work in the first place. 回答1: You can do it

adding a new kubernetes node pool to existing cluster with regular channel as release channel

不打扰是莪最后的温柔 提交于 2021-01-29 13:02:19
问题 I'm trying to add a new node pool into an existing GKE cluster. Failing with the below error. Node pool version cannot be set to 1.14.6-gke.1 when releaseChannel REGULAR is set. Any advice on how i can get around this? EDIT: I finally managed to create a new pool but only after my master was auto-updated. looks like for auto-updated clusters this is a limitation. the new node being created seems to default to the version of the master and if the master is on a deprecated version and is

Kubernetes secret with Flux and Terraform

拥有回忆 提交于 2021-01-29 12:38:14
问题 I am new to terraform and devops in general. First I need to get ssh key from url to known host to later use for Flux. data "helm_repository" "fluxcd" { name = "fluxcd" url = "https://charts.fluxcd.io" } resource "helm_release" "flux" { name = "flux" namespace = "flux" repository = data.helm_repository.fluxcd.metadata[0].name chart = "flux" set { name = "git.url" value = "git.project" } set { name = "git.secretName" value = "flux-git-deploy" } set { name = "syncGarbageCollection.enabled"