From a20720a0d47e8f985bc0883dc64dfe107786937a Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Tue, 13 Jun 2017 14:06:53 -0700 Subject: [PATCH] contrib/k8s: Use two Ingress resources for HTTP and TLS gRPC * Fixes Ingress controller issue upgrading from nginx-ingress-controller 0.9-beta.3 to 0.9-beta.4 through 0.9-beta.7 --- Documentation/deployment.md | 3 ++- contrib/k8s/matchbox-ingress.yaml | 21 ++++++++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Documentation/deployment.md b/Documentation/deployment.md index f7f6ef53..50b638a7 100644 --- a/Documentation/deployment.md +++ b/Documentation/deployment.md @@ -302,7 +302,8 @@ Create an Ingress resource to expose the HTTP read-only and gRPC API endpoints. $ kubectl create -f contrib/k8s/matchbox-ingress.yaml $ kubectl get ingress NAME HOSTS ADDRESS PORTS AGE -matchbox matchbox.example.com,matchbox-rpc.example.com 10.128.0.3,10... 80, 443 32m +matchbox matchbox.example.com 10.128.0.3,10... 80 29m +matchbox-rpc matchbox-rpc.example.com 10.128.0.3,10... 80, 443 29m ``` Add DNS records `matchbox.example.com` and `matchbox-rpc.example.com` to route traffic to the Ingress Controller. diff --git a/contrib/k8s/matchbox-ingress.yaml b/contrib/k8s/matchbox-ingress.yaml index 45c3b6de..6843355a 100644 --- a/contrib/k8s/matchbox-ingress.yaml +++ b/contrib/k8s/matchbox-ingress.yaml @@ -1,5 +1,19 @@ apiVersion: extensions/v1beta1 kind: Ingress +metadata: + name: matchbox +spec: + rules: + - host: matchbox.example.com + http: + paths: + - path: / + backend: + serviceName: matchbox + servicePort: 8080 +--- +apiVersion: extensions/v1beta1 +kind: Ingress metadata: name: matchbox annotations: @@ -9,13 +23,6 @@ spec: - hosts: - matchbox-rpc.example.com rules: - - host: matchbox.example.com - http: - paths: - - path: / - backend: - serviceName: matchbox - servicePort: 8080 - host: matchbox-rpc.example.com http: paths: