I want to deploy my web application in Openshift cluster running on AWS cloud. I'm using expose
command to make it available externally:
oc expose service svcname
But when I try to access it, I get this error:
The web application is running not on 8443; it's running on port 2553 using https.
We don't want to run it on 8443.
I am able to connect to webapp using oc port-forward
but I want to make it work
by exposing through route command.
Is there something wrong in my approach?
apiVersion: v1
kind: Service
metadata:
name: my-svc
labels:
app: mywapp
spec:
ports:
- port: 2553
nodePort: 30000
selector:
app: mywapp
The same service I am using on minishift and able to use, using the IP address of minishift locally.
The problem was solved by using re-encrypt
. I used the Openshift certificate to achieve this. By using the Openshift one doesn't have to worry about the certificate getting expired and all.
The following link has helped me big time:
https://www.openshift.com/blog/self-serviced-end-to-end-encryption-approaches-for-applications-deployed-in-openshift https://www.openshift.com/blog/self-serviced-end-to-end-encryption-for-kubernetes-applications-part-2-a-practical-example https://developers.redhat.com/blog/2017/11/22/dynamically-creating-java-keystores-openshift/