google-kubernetes-engine

Duplicate log entries with Google Cloud Stackdriver logging of Python code on Kubernetes Engine

大兔子大兔子 提交于 2020-05-25 04:28:43
问题 I have a simple Python app running in a container on Google Kubernetes Engine. I am trying to connect the standard Python logging to Google Stackdriver logging using this guide. I have almost succeeded, but I am getting duplicate log entries with one always at the 'error' level... Screenshot of Stackdriver logs showing duplicate entries This is my python code that set's up the logging according to the above guide: import webapp2 from paste import httpserver import rpc # Imports the Google

How do I make sure my cronjob job does NOT retry on failure?

拈花ヽ惹草 提交于 2020-05-17 06:39:26
问题 I have a Kubernetes Cronjob that runs on GKE and runs Cucumber JVM tests. In case a Step fails due to assertion failure, some resource being unavailable, etc., Cucumber rightly throws an exception which leads the Cronjob job to fail and the Kubernetes pod's status changes to ERROR . This leads to creation of a new pod that tries to run the same Cucumber tests again, which fails again and retries again. I don't want any of these retries to happen. If a Cronjob job fails, I want it to remain in

Using https ssl url of Artifactory while connecting from Jfrog xray

非 Y 不嫁゛ 提交于 2020-05-16 09:01:02
问题 I Just installed Jfrog Xray using Helm chart on our GKE cluster. The Artifactory Instance I want to connect to has SSL enabled (https://jfrog.<>/artifactory) and Xray is not able to connect to artifactory. I understand that artifactory cert needs to be installed on the Xray server container. My question is, should I directly install the certificate of artifactory and what is the process to do so. Also, if i'm using a different cert for Xray later, how can i install it on my server container

Using https ssl url of Artifactory while connecting from Jfrog xray

陌路散爱 提交于 2020-05-16 09:00:01
问题 I Just installed Jfrog Xray using Helm chart on our GKE cluster. The Artifactory Instance I want to connect to has SSL enabled (https://jfrog.<>/artifactory) and Xray is not able to connect to artifactory. I understand that artifactory cert needs to be installed on the Xray server container. My question is, should I directly install the certificate of artifactory and what is the process to do so. Also, if i'm using a different cert for Xray later, how can i install it on my server container

Are hitless rolling updates possible on GKE with externalTrafficPolicy: Local?

倾然丶 夕夏残阳落幕 提交于 2020-05-14 02:24:06
问题 I have a GKE cluster (1.12.10-gke.17). I'm running the nginx-ingress-controller with type: LoadBalancer . I've set externalTrafficPolicy: Local to preserve the source ip. Everything works great, except during rolling updates. I have maxSurge: 1 and maxUnavailable: 0 . My problem is that during a rolling update, I start getting request timeouts. I suspect the Google load balancer is still sending requests to the node where the pod is Terminating even though the health checks are failing. This

Kubernetes: ERR_NAME_NOT_RESOLVED

戏子无情 提交于 2020-05-13 07:40:08
问题 I have deployed a mongo db, Spring Boot BE, Angular app within GKE. My FE service is a load balancer, it needs to connect with my BE to get data but I'm getting an console error in my browser: GET http://contactbe.default.svc.cluster.local/contacts net::ERR_NAME_NOT_RESOLVED . My FE needs to consume /contacts endpoint to get data. I'm using DNS from my BE service (contactbe.default.svc.cluster.local) within my Angular app. It is my yml file that I used to create my deployment: apiVersion: v1

Kubernetes: ERR_NAME_NOT_RESOLVED

时光毁灭记忆、已成空白 提交于 2020-05-13 07:40:08
问题 I have deployed a mongo db, Spring Boot BE, Angular app within GKE. My FE service is a load balancer, it needs to connect with my BE to get data but I'm getting an console error in my browser: GET http://contactbe.default.svc.cluster.local/contacts net::ERR_NAME_NOT_RESOLVED . My FE needs to consume /contacts endpoint to get data. I'm using DNS from my BE service (contactbe.default.svc.cluster.local) within my Angular app. It is my yml file that I used to create my deployment: apiVersion: v1

Why does Google Cloud show an error when using ClusterIP

浪子不回头ぞ 提交于 2020-05-10 06:58:31
问题 In my gcloud console it shows the following error for my defined ingresses: Error during sync: error while evaluating the ingress spec: service "monitoring/kube-prometheus" is type "ClusterIP", expected "NodePort" or "LoadBalancer" I am using traefik as reverse proxy (instead of nginx) and therefore I define an ingress using a ClusterIP. As far as I understand the process all traffic is proxied through the traefik service (which has a Loadbalancer ingress defined) and therefore all my other

Get YAML for deployed Kubernetes services?

℡╲_俬逩灬. 提交于 2020-05-09 18:00:33
问题 I am trying to deploy my app to Kubernetes running in Google Container Engine . The app can be found at: https://github.com/Industrial/docker-znc. The Dockerfile is built into an image on Google Container Registry . I have deployed the app in Kubernetes via the + button. I don't have the YAML for this. I have inserted a Secret in Kubernetes for the PEM file required by the app. How do I get the YAML for the Deployment , Service and Pod created by Kubernetes by filling in the form? How do I

How do I delete clusters and contexts from kubectl config?

旧巷老猫 提交于 2020-05-09 17:42:04
问题 kubectl config view shows contexts and clusters corresponding to clusters that I have deleted. How can I remove those entries? The command kubectl config unset clusters appears to delete all clusters. Is there a way to selectively delete cluster entries? What about contexts? 回答1: kubectl config unset takes a dot-delimited path. You can delete cluster/context/user entries by name. E.g. kubectl config unset users.gke_project_zone_name kubectl config unset contexts.aws_cluster1-kubernetes