Skip to content

Instantly share code, notes, and snippets.

@joshuatalb
Created May 16, 2017 16:57
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshuatalb/76cb61c32815511c520cb9114f23a17c to your computer and use it in GitHub Desktop.
Save joshuatalb/76cb61c32815511c520cb9114f23a17c to your computer and use it in GitHub Desktop.
Kubernetes Ingress for Spinnaker
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: spinnaker-ingress
namespace: spinnaker
labels:
k8s-addon: ingress-nginx.addons.k8s.io # change to your nginx controller
annotations:
kubernetes.io/tls-acme: "true" # tells the letsencrypt controller to watch this ingress
spec:
tls:
- hosts:
- spinnaker.ops.hostname.com
secretName: spinnaker-tls
rules:
- host: spinnaker.ops.hostname.com
http:
paths:
- backend:
serviceName: spinnaker-spinnaker-deck # do `kubectl get svc -n spinnaker | grep deck` to get your deck service name
servicePort: 9000
- backend:
serviceName: spinnaker-spinnaker-gate # same applies here, but grep gate.
servicePort: 8084
@audip
Copy link

audip commented Oct 25, 2017

@joshuatalb helm chart for kube-lego has used nginx-ingress annotation instead of label k8s-addon, can you update the gist to reflect that?

EXAMPLE INGRESS YAML:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: example
  namespace: foo
  annotations:
    kubernetes.io/ingress.class: nginx
    # Add to generate certificates for this ingress
    kubernetes.io/tls-acme: 'true'
spec:
  rules:
    - host: www.example.com
      http:
        paths:
          - backend:
              serviceName: exampleService
              servicePort: 80
            path: /
  tls:
    # With this configuration kube-lego will generate a secret in namespace foo called `example-tls`
    # for the URL `www.example.com`
    - hosts:
        - "www.example.com"
      secretName: example-tls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment