kubernetes-ingress

Is it possible to access the Kubernetes API via https ingress?

牧云@^-^@ 提交于 2019-12-06 22:56:27
I was trying unsuccessfully access Kubernetes API via HTTPS ingress and now started to wonder if that is possible at all? Any working detailed guide for a direct remote access (without using ssh -> kubectl proxy to avoid user management on Kubernetes node) would be appreciated. :) UPDATE: Just to make more clear. This is bare metal on premise deployment (NO GCE, AWZ, Azure or any other) and there is intension that some environments will be totally offline (which will add additional issues with getting the install packages). Intention is to be able to use kubectl on client host with

Setting cache-control headers for nginx ingress controller on kubernetes GKE

拟墨画扇 提交于 2019-12-06 11:45:15
问题 I have an ingress-nginx controller handling traffic to my Kubernetes cluster hosted on GKE. I set it up using helm installation instructions from docs: Docs here For the most part everything is working, but if I try to set cache related parameters via a server-snippet annotation, all of the served content that should get the cache-control headers comes back as a 404 . Here's my ingress-service.yaml file: apiVersion: extensions/v1beta1 kind: Ingress metadata: name: ingress-service annotations:

K8s Ingress rule for multiple paths in same backend service

馋奶兔 提交于 2019-12-06 06:29:53
问题 I am trying to setup ingress load balancer. Basically, I have a single backend service with multiple paths. Let's say my backend NodePort service name is hello-app. The pod associated with this service exposes multiple paths like /foo and /bar. Below is the example NodePort service and associated deployment apiVersion: v1 kind: Service metadata: name: hello-app spec: selector: app: hello-app type: NodePort ports: - protocol: "TCP" port: 7799 targetPort: 7799 --- apiVersion: apps/v1 kind:

How does Traffic Flow inside a Kubernetes Cluster?

末鹿安然 提交于 2019-12-06 05:40:27
(While learning Kubernetes I never really found any good resources explaining this) Scenario: I own mywebsite1.com and mywebsite2.com and I want to host them both inside a Kubernetes Cluster. I deploy a generic cloud ingress controller according to the following website with 2 kubectl apply -f < url > commands. (mandatory.yaml and generic ingress.yaml) https://kubernetes.github.io/ingress-nginx/deploy/ So the question is what does that architecture look like? and how does the data flow into the Cluster? I convert 2 certificates to 2 .key and 2 .crt files I use those files to make 2 TLS secrets

kubernetes ingress with multiple target-rewrite

对着背影说爱祢 提交于 2019-12-06 02:33:59
问题 Usually ingress rewrite target works as follows: nginx.ingress.kubernetes.io/rewrite-target: / This will rewrite the target of your service names as they are in the root directory. So if I have this: apiVersion: extensions/v1beta1 kind: Ingress metadata: name: demo-ingress annotations: nginx.ingress.kubernetes.io/rewrite-target: / spec: tls: rules: http: paths: - path: / backend: serviceName: front-main servicePort: 80 - path: /api backend: serviceName: back-main servicePort: 80 My services

Kubernetes to find Pod IP from another Pod

末鹿安然 提交于 2019-12-05 09:55:27
I have the following pods hello-abc and hello-def . And I want to send data from hello-abc to hello-def . How would pod hello-abc know the IP address of hello-def ? And I want to do this programmatically. What's the easiest way for hello-abc to find where hello-def ? --- apiVersion: extensions/v1beta1 kind: Deployment metadata: name: hello-abc-deployment spec: replicas: 1 template: metadata: labels: app: hello-abc spec: containers: - name: hello-abc image: hello-abc:v0.0.1 imagePullPolicy: Always args: ["/hello-abc"] ports: - containerPort: 5000 --- apiVersion: extensions/v1beta1 kind:

Does GKE support nginx-ingress with static ip?

穿精又带淫゛_ 提交于 2019-12-05 05:27:17
I have been using the Google Cloud ingress. Also deployed the nginx-ingress and trying to setup using static-ip address in GKE. Can we use both Google Cloud ingress and nginx-ingress in same cluster? How can we use the nginx-ingress with static-ip? Thanks GalloCedrone First question As Radek 'Goblin' Pieczonka already pointed you out it is possible to do so. I just wanted to link you to the official documentation regarding this matter: If you have multiple Ingress controllers in a single cluster, you can pick one by specifying the ingress.class annotation, eg creating an Ingress with an

Simple ingress from host with microk8s?

拜拜、爱过 提交于 2019-12-04 21:59:55
问题 I would like to do two things with MicroK8s: Route the host machine (Ubuntu 18.04) ports 80/443 to Microk8s Use something like the simple ingress defined in the kubernetes.io docs My end goal is to create a single node Kubernetes cluster that sits on the Ubuntu host, then using ingress to route different domains to their respective pods inside the service. I've been attempting to do this with Microk8s for the past couple of days but can't wrap my head around it. The best I've gotten so far is

Setting cache-control headers for nginx ingress controller on kubernetes GKE

纵然是瞬间 提交于 2019-12-04 17:57:59
I have an ingress-nginx controller handling traffic to my Kubernetes cluster hosted on GKE. I set it up using helm installation instructions from docs: Docs here For the most part everything is working, but if I try to set cache related parameters via a server-snippet annotation, all of the served content that should get the cache-control headers comes back as a 404 . Here's my ingress-service.yaml file: apiVersion: extensions/v1beta1 kind: Ingress metadata: name: ingress-service annotations: kubernetes.io/ingress.class: nginx nginx.ingress.kubernetes.io/proxy-read-timeout: "4000" nginx

K8s Ingress rule for multiple paths in same backend service

亡梦爱人 提交于 2019-12-04 13:04:15
I am trying to setup ingress load balancer. Basically, I have a single backend service with multiple paths. Let's say my backend NodePort service name is hello-app. The pod associated with this service exposes multiple paths like /foo and /bar. Below is the example NodePort service and associated deployment apiVersion: v1 kind: Service metadata: name: hello-app spec: selector: app: hello-app type: NodePort ports: - protocol: "TCP" port: 7799 targetPort: 7799 --- apiVersion: apps/v1 kind: Deployment metadata: name: hello-app labels: app: hello-app spec: replicas: 1 selector: matchLabels: app: