2021-11-12 21:57:19 +00:00
|
|
|
Create a new ingress for the outpost
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
apiVersion: networking.k8s.io/v1beta1
|
|
|
|
kind: Ingress
|
|
|
|
metadata:
|
|
|
|
name: authentik-outpost
|
|
|
|
spec:
|
|
|
|
rules:
|
2021-11-26 12:29:38 +00:00
|
|
|
- host: app.company
|
2021-11-12 21:57:19 +00:00
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- backend:
|
2021-11-26 13:08:45 +00:00
|
|
|
# Or, to use an external Outpost, create an ExternalName service and reference that here.
|
|
|
|
# See https://kubernetes.io/docs/concepts/services-networking/service/#externalname
|
|
|
|
serviceName: ak-outpost-example-outpost
|
2021-11-12 21:57:19 +00:00
|
|
|
servicePort: 9000
|
2022-02-08 19:25:38 +00:00
|
|
|
path: /outpost.goauthentik.io
|
2021-11-12 21:57:19 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
This ingress handles authentication requests, and the sign-in flow.
|
|
|
|
|
|
|
|
Add these annotations to the ingress you want to protect
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
metadata:
|
|
|
|
annotations:
|
2021-11-26 12:29:38 +00:00
|
|
|
nginx.ingress.kubernetes.io/auth-url: |
|
2022-02-08 19:25:38 +00:00
|
|
|
https://outpost.company/outpost.goauthentik.io/auth/nginx
|
2021-11-26 12:29:38 +00:00
|
|
|
nginx.ingress.kubernetes.io/auth-signin: |
|
2022-02-08 19:25:38 +00:00
|
|
|
https://outpost.company/outpost.goauthentik.io/start?rd=$escaped_request_uri
|
2021-11-26 12:29:38 +00:00
|
|
|
nginx.ingress.kubernetes.io/auth-response-headers: |
|
|
|
|
Set-Cookie,X-authentik-username,X-authentik-groups,X-authentik-email,X-authentik-name,X-authentik-uid
|
2021-11-12 21:57:19 +00:00
|
|
|
nginx.ingress.kubernetes.io/auth-snippet: |
|
2022-01-25 13:25:21 +00:00
|
|
|
proxy_set_header Host $http_host;
|
2021-11-12 21:57:19 +00:00
|
|
|
```
|