Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ingress example and docs for kubernetes deloyment #2510

Merged
merged 3 commits into from
Jun 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions deploy/kubernetes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ The following guide details how to deploy Stratos in Kubernetes.
* [Deploying Stratos with your own TLS certificates](#deploying-stratos-with-your-own-tls-certificates)
* [Using with a Secure Image Repostiory](#using-with-a-secure-image-repository)
* [Installing Nightly Release](#installing-a-nightly-release)
* [Configuring Stratos to use an Ingress controller](./ingress)
<!-- /TOC -->

## Requirements
Expand Down
39 changes: 39 additions & 0 deletions deploy/kubernetes/ingress/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Configuring Ingress

You can make Stratos available via Ingress by following the instructions below.

Ensure that you have Ingress deployed in your Kubernetes environment.

To do this using Helm follow the instructions here: https://github.com/nginxinc/kubernetes-ingress/tree/master/helm-chart.

If you want to use your own certificate, follow the link above for how to do this along with more advanced configuring options.

Briefly, this involves running:

```
git clone [email protected]:nginxinc/kubernetes-ingress.git
cd kubernetes-ingress/helm-chart
helm install --name ingress .
```

Wait for the Ingress controller pod to be in the Running state.

Now, edit the `ingress.xml` in this folder to suit your needs - most likely you will want to change:

- metadata.namespace to the namespace that you using when deploying Stratos

- spec.rules.host and spec.tls.hosts to change the host from stratos.127.0.0.1.xip.io to suit your deployment

Finally, deploy the Ingress configuraation with:

```
kubectl apply -f ./ingress.yml
```

You should now be able to access Stratos via the URL:

```
https://stratos.127.0.0.1.xip.io
```

Note if you changed the host in the ingress.yml file, this URL will of course need to be adjusted.
21 changes: 21 additions & 0 deletions deploy/kubernetes/ingress/ingress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: stratos
namespace: stratos
annotations:
nginx.org/ssl-services: "stratos-ui-ext"
nginx.org/websocket-services: "stratos-ui-ext"
spec:
rules:
- host: stratos.127.0.0.1.xip.io
http:
paths:
- path: /
backend:
serviceName: stratos-ui-ext
servicePort: 443
tls:
- hosts:
- stratos.127.0.0.1.xip.io
secretName: stratos-tls