google-kubernetes-engine

Inject code/files directly into a container in Kubernetes on Google Cloud Engine

余生长醉 提交于 2019-12-12 10:38:57
问题 How can I inject code/files directly into a container in Kubernetes on Google Cloud Engine, similar to the way that you can mount host files / directories with Docker, e.g. docker run -d --name nginx -p 443:443 -v "/nginx.ssl.conf:/etc/nginx/conf.d/default.conf" Thanks 回答1: I'm not sure you can do that exactly. Kubernetes does things quite differently than docker, and isn't really ideal for interacting with the 'host' you are probably used to with docker. A few alternative possibilities come

kubernetes dns lookup of microservice

此生再无相见时 提交于 2019-12-12 10:13:00
问题 i have a question on the kubernetes DNS lookup, if i am using in my services deployment "dns" instead of "env", Can my microservice using another microservices in the cluster get the dns names of all the microservices? I get this piece of code, if I use env then I get the the info of host from env. but if I am using dns what format and how do I get the dns names, is there a DNS object I can query on the client side? if (isset($_GET['cmd']) === true) { $host = 'redis-master'; if (getenv('GET

Can Google Cloud Build be triggered by new Docker image in Container Registry?

[亡魂溺海] 提交于 2019-12-12 09:49:54
问题 I'm setting up a CI/CD using Google's cloud tools, and was expecting to have a trigger condition "when new image is uploaded to Container Registry". The use case is separating deployment from source (repo). Source would push Docker images and deployment would deploy them to a test stage. But Cloud Build only provides me a trigger choice between three source repos. link What would you use for test, QA and production deployment of Docker images, in a GKE context? 回答1: Meanwhile, there is a

Kubernetes load balancer SSL termination in google container engine?

早过忘川 提交于 2019-12-12 09:37:00
问题 Background: I'm pretty new to the Google's Cloud platform so I want to make sure that I'm not is missing anything obvious. We're experimenting with GKE and Kubernetes and we'd like to expose some services over https. I've read the documentation for http(s) load-balancing which seem to suggest that you should maintain your own nginx instance that does SSL terminal and load balancing. To me this looks quite complex (I'm used to working on AWS and its load-balancer (ELB) which has supported SSL

Why is prometheus operator not able to start

一曲冷凌霜 提交于 2019-12-12 09:13:43
问题 I'm trying to create prometheus with operator in fresh new k8s cluster I use the following files , I’m creating a namespace monitoring Apply this file , which works ok apiVersion: apps/v1beta2 kind: Deployment metadata: labels: k8s-app: prometheus-operator name: prometheus-operator namespace: monitoring spec: replicas: 2 selector: matchLabels: k8s-app: prometheus-operator template: metadata: labels: k8s-app: prometheus-operator spec: priorityClassName: "operator-critical" tolerations: - key:

GKE Cluster can't pull (ErrImagePull) from GCR Registry in same project (GitLab Kubernetes Integration): Why?

╄→гoц情女王★ 提交于 2019-12-12 08:04:05
问题 So after googling a little bit (which is polluted by people having trouble with Pull Secrets) I am posting this here — and to GCP Support (will update as I hear). I created a Cluster from GitLab Kubernetes integration (docs: https://about.gitlab.com/solutions/kubernetes) within the same project as my GCR registry / images. When I add a new service / deployment to this Cluster using Kubectl (which relies on a private image within the GCR Registry in this project) the pods in the GitLab created

What is the difference between kubernetes and GKE?

蹲街弑〆低调 提交于 2019-12-12 07:54:28
问题 I know that GKE is driven by kubernetes underneath. But I don't seem to still get is that what part is taken care by GKE and what by k8s in the layering? The main purpose of both, as it appears to me is to manage containers in a cluster. Basically, I am looking for a simpler explanation with an example. 回答1: in short GKE is a managed/hosted Kubernetes (i.e. it is managed for you so you can concentrate on running your pods/containers applications) Kubernetes does handle: running pods,

Cross-region load balancing + routing on Google Container Engine

爷,独闯天下 提交于 2019-12-12 07:32:48
问题 How do I achieve cross-region load balancing on Google Container Engine? I will have one Kubernetes cluster per region in several regions and I need to route traffic from a single domain name to the geographically closest cluster. Some options I've investigated: Kubernetes LoadBalancers seem to be restricted to one cluster. I'm not sure how you get Kubernetes Ingress to talk to different clusters. (It sounds like this object is backed by Compute Engine HTTP load balancers though.) Compute

Access HTTP service running in GKE from Google Dataflow

跟風遠走 提交于 2019-12-12 07:15:47
问题 I have an HTTP service running on a Google Container Engine cluster (behind a kubernetes service). My goal is to access that service from a Dataflow job running on the same GCP project using a fixed name (in the same way services can be reached from inside GKE using DNS). Any idea? Most solutions I have read on stackoverflow relies on having kube-proxy installed on the machines trying to reach the service. As far as I know, it is not possible to reliably set up that service on every worker

Provide authentication for heapster to connect to secured kube API server in GKE

房东的猫 提交于 2019-12-12 06:16:53
问题 I am trying to deploy heapster in a cluster and collect metrics and store it in Influxdb . I can provide sink for Influxdb . But I am not sure how to provide the value for --source flag to connect to the secured kube API server . Can someone help me to find out this. Note: I am trying to deploy heapster in the same cluster where the kube API server is running. Thanks in advance. 回答1: I use heapster with parameter --source=kubernetes:http://kubernetes.default?inClusterConfig=false&insecure