Search code examples
sslopenshiftkubernetes-ingresskubernetes-secrets

Create OpenShift TLS route from secret


I am looking to know (and how to do it), to create a secured (tls) route in OpenShift from a Secret that would contain my cert and key(or JAVA keystore) or 2 secret (1 with certificat, another with key) so that I do not need to write both of them in a ''route.yaml'' file directly but only refer to them......

UPDATE:

It look's like it is not possible. Unless I do passthrough to the pod... see here ---> https://access.redhat.com/solutions/1582583

Still, I do not want that it to be the definitive answer since I think this should be supported.

Can someone tell me otherwise ? Please !


Solution

  • Unfortunately, as far as I know, it can't configure certificates as secret in route. If you just want to make the route object using other way except a yaml file, then you can configure route using following CLI.

    oc create route edge --service=frontend \
        --cert=${MASTER_CONFIG_DIR}/ca.crt \
        --key=${MASTER_CONFIG_DIR}/ca.key \
        --ca-cert=${MASTER_CONFIG_DIR}/ca.crt \
        --hostname=www.example.com
    

    I hope it help you :^)