Create ingress server and add documentation

This commit is contained in:
Robert Schäfer 2019-02-07 17:33:20 +01:00
parent 15581de701
commit 3bbe1f1471
3 changed files with 28 additions and 2 deletions

View File

@ -109,6 +109,21 @@ Sit back and relax and have a look into your kubernetes dashboard.
Wait until all pods turn green and they don't show a warning
`Waiting: ContainerCreating` anymore.
### Setup Loadbalancer and Ingress
Basically follow [this tutorial](https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nginx-ingress-with-cert-manager-on-digitalocean-kubernetes).
tl;dr:
```sh
$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/mandatory.yaml
$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/provider/cloud-generic.yaml
```
And create an ingress service in namespace `staging`:
```sh
# you should change the domain name according to your needs
$ kubectl apply -f staging/ingress.yaml
```
#### Legacy data migration
This setup is completely optional and only required if you have data on a server

13
staging/ingress.yaml Normal file
View File

@ -0,0 +1,13 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress
namespace: staging
spec:
rules:
- host: master.nitro.human-connection.org
http:
paths:
- backend:
serviceName: nitro-web
servicePort: 3000

View File

@ -12,5 +12,3 @@ spec:
targetPort: 3000
selector:
workload.user.cattle.io/workloadselector: deployment-staging-web
type: LoadBalancer
externalTrafficPolicy: Cluster