google-kubernetes-engine

Difference between Google App Engine Flexible and Google Container Engine?

不羁的心 提交于 2019-12-03 10:52:19
问题 Specific to Docker based deployment, what are the differences between those two? Since Google App Engine Flexible now also supports Dockerfile based deployment and it is also fully-managed service, seems it's more preferred option rather than configuring Kubernetes deployment on Container Engine, isn't it? What are the use cases where it's more preferred to use Google Container Engine over App Engine Flexible? 回答1: They are different things. App Engine Flexible is focused on application

403 “Request had insufficient authentication scopes” during gcloud container cluster get-credentials

寵の児 提交于 2019-12-03 10:47:44
问题 From a VM in GCE, I did the following gcloud auth activate-service-account --key-file <blah> # "blah" is a service account key file (JSON) I generated from the web interface gcloud config set project <project-name> gcloud config set compute/zone <zone-name> gcloud set container/cluster <cluster-name> Then when I tried to run gcloud container clusters get-credentials <cluster-name> and it failed with the error message: Error message: "ERROR: (gcloud.container.clusters.get-credentials)

How do I add a nameserver to all pods in Google Container Engine [GKE]?

假装没事ソ 提交于 2019-12-03 09:51:39
问题 I am attempting to migrate my on premises cluster to GKE. In order to facilitate this transition I need to be able to resolve the names of legacy services. Assume that the networking/VPN is a solved problem. Is there are way to do this with GKE currently? Effectively I am attempting to add a NS to every /etc/resolv.conf 回答1: I want to add to what Eric said, and mutate it a bit. One of the realizations we had during the kubernetes 1.1 "settling period" is that there are not really specs for

Is there a way to add arbitrary records to kube-dns?

别说谁变了你拦得住时间么 提交于 2019-12-03 09:24:52
问题 I will use a very specific way to explain my problem, but I think this is better to be specific than explain in an abstract way... Say, there is a MongoDB replica set outside of a Kubernetes cluster but in a network. The ip addresses of all members of the replica set were resolved by /etc/hosts in app servers and db servers. In an experiment/transition phase, I need to access those mongo db servers from kubernetes pods. However, kubernetes doesn't seem to allow adding custom entries to /etc

Recommended way to persistently change kube-env variables

ε祈祈猫儿з 提交于 2019-12-03 09:05:07
We are using elasticsearch/kibana instead of gcp for logging (based on what is described here ). To have fluentd-elsticsearch pod's launched we've set LOGGING_DESTINATION=elasticsearch and ENABLE_NODE_LOGGING="true" in the "Compute Instance Template" -> "Custom metadata" -> "kube-env". While this works fine when done manually it gets overwritten with every gcloud container clusters upgrade as a new Instance Template with defaults ( LOGGING_DESTINATION=gcp ...) is created. My question is: How do I persist this kind of configuration for GKE/GCE? I thought about adding a k8s-user-startup-script

How can you publish a Kubernetes Service without using the type LoadBalancer (on GCP)

吃可爱长大的小学妹 提交于 2019-12-03 03:52:24
I would like to avoid using type: "LoadBalancer" for a certain Kubernetes Service, but still to be able to publish it on the Internet. I am using Google Cloud Platform (GCP) to run a Kubernetes cluster currently running on a single node. I tried to us the externalIPs Service configuration and to give at turns, the IPs of: the instance hosting the Kubernetes cluster (External IP; which also conincides with the IP address of the Kubernetes node as reported by kubernetes describe node ) the Kubernetes cluster endpoint (as reported by the Google Cloud Console in the details of the cluster) the

403 “Request had insufficient authentication scopes” during gcloud container cluster get-credentials

末鹿安然 提交于 2019-12-03 01:17:24
From a VM in GCE, I did the following gcloud auth activate-service-account --key-file <blah> # "blah" is a service account key file (JSON) I generated from the web interface gcloud config set project <project-name> gcloud config set compute/zone <zone-name> gcloud set container/cluster <cluster-name> Then when I tried to run gcloud container clusters get-credentials <cluster-name> and it failed with the error message: Error message: "ERROR: (gcloud.container.clusters.get-credentials) ResponseError: code=403, message=Request had insufficient authentication scopes." The VM is on the same network

Error from server (Forbidden): error when creating .. : clusterroles.rbac.authorization.k8s.io …: attempt to grant extra privileges:

你。 提交于 2019-12-02 22:23:29
Failed to create clusterroles. <> already assigned as the roles of "container engine admin" & "container engine cluster admin" Error from server (Forbidden): error when creating "prometheus- operator/prometheus-operator-cluster-role.yaml": clusterroles.rbac.authorization.k8s.io "prometheus-operator" is forbidden: attempt to grant extra privileges: [{[create] [extensions] [thirdpartyresources] [] []} {[*] [monitoring.coreos.com] [alertmanagers] [] []} {[*] [monitoring.coreos.com] [prometheuses] [] []} {[*] [monitoring.coreos.com] [servicemonitors] [] []} {[*] [apps] [statefulsets] [] []} {[*] [

Dynamic wildcard subdomain ingress for Kubernetes

柔情痞子 提交于 2019-12-02 20:42:47
I'm currently using Kubernetes on GKE to serve the various parts of my product on different subdomains with the Ingress resource. For example: api.mydomain.com , console.mydomain.com , etc. ingress.yml (current) : apiVersion: extensions/v1beta1 kind: Ingress metadata: name: ingress spec: rules: - host: api.mydomain.com http: paths: - backend: serviceName: api-service servicePort: 80 - host: console.mydomain.com http: paths: - backend: serviceName: console-service servicePort: 80 That works wonderfully, with the L7 GCE load balancer routing to the appropriate places. What I would like to do,

GCE + K8S - Accessing referral IP address

廉价感情. 提交于 2019-12-02 19:03:11
问题 With a standard Kubernetes deployment on Google Container Engine, to include services configured with the Kubernetes load balancer settings which creates network load balancers, is it possible to access the user's (or referring) IP address in an application? In the case of PHP, checking common headers in the $_SERVER superglobal only results in the server and internal network addresses being available. 回答1: Not yet. Services go through kube_proxy, which answers the client connection and