google-kubernetes-engine

kubernetes petset on google cloud

耗尽温柔 提交于 2019-12-10 17:14:06
问题 I am running a kubernetes cluster on google cloud(version 1.3.5) . I found a redis.yaml that uses petset to create a redis cluster but when i run kubectl create -f redis.yaml i get the following error : error validating "redis.yaml": error validating data: the server could not find the requested resource (get .apps); if you choose to ignore these errors, turn validation off with --validate=false i cant find why i get this error or how to solve this. 回答1: PetSet is currently an alpha feature

Google container engine : pod creation stuck in 'Pending' status

早过忘川 提交于 2019-12-10 15:38:22
问题 Tried to recreate the GKE cluster to try on Kubernetes 1.2.0 Cluster came up correctly, yet the firs pod deployment is stuck in 'Pending': []# kubectl get pods NAME READY STATUS RESTARTS AGE operation-daily 0/1 Pending 0 6m Have been following the same script that was used for 1.1.8 (successfully). Tried a few times - no luck. How could I diagnose the issue? Would it be possible to go back to 1.1.8 version? us-central-1f 回答1: The output of kubectl get events should have some clues for you. 来源

GKE Ingress Basic Authentication (ingress.kubernetes.io/auth-type)

十年热恋 提交于 2019-12-10 15:23:25
问题 I'm trying to get a GKE ingress to require basic auth like this example from github. The ingress works fine. It routes to the service. But the authentication isn't working. Allows all traffic right through. Has GKE not rolled this feature out yet? Something obviously wrong in my specs? Here's the ingress: apiVersion: extensions/v1beta1 kind: Ingress metadata: name: super-ingress annotations: ingress.kubernetes.io/auth-type: basic ingress.kubernetes.io/auth-secret: basic-auth ingress

How do I find out the external IP of a Load Balancer service?

99封情书 提交于 2019-12-10 14:28:52
问题 I am using Kubernetes Engine on the Google Cloud Platform. I have a pod running a process in a Docker scratch container. I also have a load balancer service that gives me access to the pod from the outside world. The process running in the pod needs to know what its external IP address is. How can I get this? Prior to using Kubernetes Engine I was using Compute Engine and could find the external IP address by the following: curl -H "Metadata-Flavor: Google" http://metadata/computeMetadata/v1

Error “certificate signed by unknown authority” after switching GCP project

不问归期 提交于 2019-12-10 13:49:15
问题 After switching gcloud projects using ... gcloud init ... and then try to do some kubectl command, like this for instance: kubectl get rc ... I get this error: error: couldn't read version from server: Get https://130.211.59.254/api: x509: certificate signed by unknown authority Why is this and how can I solve it? 回答1: This is because the keys to your old cluster is cached. I'm not sure why they are not updated by the gcloud init command (that's what one would intuitively expect, or at least

Google Container Engine with external IP, without load balancer

萝らか妹 提交于 2019-12-10 13:26:18
问题 I am able to connect to the app running in my pod in Kubernetes, but that was with a load balancer gateway, based on the documentation here: https://cloud.google.com/container-engine/docs/tutorials/http-balancer Is there any way to run a web server on Google Container Engine without having to pay $18/month for a separate load balancer? 回答1: Try using type: Nodeport for the service. This will open a port on all your nodes. You can use then direct traffic to that port. Refer: https://kubernetes

GCE Ingress not picking up health check from readiness probe

我的未来我决定 提交于 2019-12-10 13:17:19
问题 When I create a GCE ingress, Google Load Balancer does not set the health check from the readiness probe. According to the docs (Ingress GCE health checks) it should pick it up. Expose an arbitrary URL as a readiness probe on the pods backing the Service. Any ideas why? Deployment: apiVersion: extensions/v1beta1 kind: Deployment metadata: name: frontend-prod labels: app: frontend-prod spec: selector: matchLabels: app: frontend-prod replicas: 3 strategy: rollingUpdate: maxSurge: 1

Stackdriver Error reporting for Ruby, running on GKE

不打扰是莪最后的温柔 提交于 2019-12-10 13:16:15
问题 Which steps are required to collect errors from a Rails app running on GKE? I have added the stackdriver gem to my Rails app and I have created a custom role with the errorreporting.errorEvents.create permission. That role is given to the Compute Engine default service account I interpret the docs that one does not have to do the following setup when running on GKE: # Add this to config/environments/*.rb Rails.application.configure do |config| # Stackdriver Error Reporting specific parameters

GKE Load Balancer - Ingress - Service - Session Affinity (Sticky Session)

放肆的年华 提交于 2019-12-10 13:00:55
问题 I had sticky session working in my dev environment with minibike with following configurations: Ingress: apiVersion: extensions/v1beta1 kind: Ingress metadata: name: gl-ingress annotations: nginx.ingress.kubernetes.io/affinity: cookie kubernetes.io/ingress.class: "gce" kubernetes.io/ingress.global-static-ip-name: "projects/oceanic-isotope-199421/global/addresses/web-static-ip" spec: backend: serviceName: gl-ui-service servicePort: 80 rules: - http: paths: - path: /api/* backend: serviceName:

GCP load balancer backend status unknown

允我心安 提交于 2019-12-10 12:58:03
问题 I'm flabbergasted. I have a staging and production environment. Both environments have the same deployments, services, ingress, firewall rules, and both serve a 200 on / . However, after turning on the staging environment and provisioning the same ingress, the staging service fails with Some backend services are in UNKNOWN state . Production is still live. Both the frontend and backend pods are ready on GKE. I've manually tested the health checks and they pass when I visit / . I see nothing