Ingress-nginx: Document ingress.gcp.kubernetes.io/pre-shared-cert annotation

Created on 8 Mar 2017  路  10Comments  路  Source: kubernetes/ingress-nginx

Update GLBC documentation with this annotation + usage.

Follow up work to https://github.com/kubernetes/ingress/pull/291.

Please assign to me.

Most helpful comment

@tlbdk sorry!

gcloud compute ssl-certificates create my-cert --certificate=${CERT_LOCATION} --private-key=${KEY_LOCATION} --project=my-project
gcloud compute addresses create my-ip --global
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: my-ingress
  annotations:
    kubernetes.io/ingress.allow-http: "false"                        # Disable port 80 access (see caveats)
    kubernetes.io/ingress.global-static-ip-name: "my-ip"             # Name of the static global IP address in GCP
    ingress.gcp.kubernetes.io/pre-shared-cert: "my-cert"             # Name of the TLS certificate in GCP
spec:
  backend:
    serviceName: my-service                                          # Service type NodePort resource to expose
    servicePort: 80                                                  # Port of the Service

All 10 comments

How does the syntax look, it would be nice with just a copy/paste in this issue so there at least where something until the documentation was written?

@tlbdk sorry!

gcloud compute ssl-certificates create my-cert --certificate=${CERT_LOCATION} --private-key=${KEY_LOCATION} --project=my-project
gcloud compute addresses create my-ip --global
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: my-ingress
  annotations:
    kubernetes.io/ingress.allow-http: "false"                        # Disable port 80 access (see caveats)
    kubernetes.io/ingress.global-static-ip-name: "my-ip"             # Name of the static global IP address in GCP
    ingress.gcp.kubernetes.io/pre-shared-cert: "my-cert"             # Name of the TLS certificate in GCP
spec:
  backend:
    serviceName: my-service                                          # Service type NodePort resource to expose
    servicePort: 80                                                  # Port of the Service

Thanks, just what I needed :)

does this work with any ingress controller? for example can I use this with traefik ingress controller on GKE? @tonglil

No, this annotation is GCE specific.

Where is ingress.gcp.kubernetes.io/pre-shared-cert documented in GCP docs?

This is the only reference I can find online.

@gajus here: https://cloud.google.com/kubernetes-engine/docs/how-to/ingress-multi-ssl

There is currently no mention of ingress.gcp.kubernetes.io/pre-shared-cert on that page.

@cachvico The documentation page specifcally mentions that in the Specifying certificates for your Ingress section which contains instructions for both Pre Shared certificates or certificates stored in a secrets object.

@joaoferrao beg pardon.

For future readers coming from a Google search on ingress.gcp.kubernetes.io/pre-shared-cert (which lists this issue before the doc page), click the "PRE-SHARED CERTS" tab in the section Specifying certificates for your Ingress.

Was this page helpful?
0 / 5 - 0 ratings