Use https applications with Jenkins X deployment

1/23/2019

I am evaluating Jenkins X to manage CI/CD on a Asp.NET application.

  1. I created a new project with [jx create quickstart aspnet-app][1] all works perfekt with gke, application is visible over port 80.
  2. I modified the app to works with dotnet core 2.2
  3. application now listening on port 443 for https queries.

    • Works great when started with docker run.

    • when running from jenkins the pipeline do the job, container will be created and started on gke, but the application is not available on port 443.

    • I become default backend - 404 instead of my page.

Question: Where could I configure the opened ports. Any idea where I could investigate?
ps:
- When trying to contact port 443 over http I receive a 400 The plain HTTP request was sent to HTTPS port response from nginx, which is a pretty good sign.
- Seem to be related with ingress, how can I configure ingress over Jenkins X?

Thank you for any hint.

-- elou
.net-core
google-kubernetes-engine
https
jenkins
kubernetes

1 Answer

1/24/2019

Jenkins X, as you can read in the accessing applications section, automatically installs a Nginx ingress controller and seems that yours is configured for use SSL and non-SSL in same server. When you try to access through http Nginx expects SSL and gives you the error.

You can see in this link a similar question in Stackoverflow, you must to modify the nginx.conf file and add a comment in the SSL line:

server {
  listen 80;
  listen 443 default ssl;

  # ssl on   <--- comment the line
}
-- HopsHops
Source: StackOverflow