error secure connection failed in ingress controller

0 votes

I am using the default Ingress controller (nginx for minikube) and have successfully enabled ingress:

minikube addons enable ingress

ingress config YAML (basic-ingress.yaml):

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: basic-ingress
spec:
  backend:
    serviceName: nginx
    servicePort: 80

And now applying the YAML:

kubectl apply -f basic-ingress.yaml

Verify the Ingress

kubectl get ingress basic-ingress

Output:

NAME            HOSTS     ADDRESS         PORTS     AGE
basic-ingress   *         192.168.64.37   80        16s

Visit the Application 

When I point my browser to the site (http://192.168.64.37) is tries to convert to https which gives an error "secure connection failed" (from Firefox, but similar error from Chrome) owever, when I curl the site I get the "301" error:

curl 192.168.64.37

Output:

<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.11.12</center>
</body>
</html>
Sep 12, 2018 in Kubernetes by lina
• 8,220 points
1,347 views

1 answer to this question.

0 votes

Nginx ingress tries to redirect to an https protocol i.e. port 443. But in case its not configured it throws this error “301 moved permanently”.

I set the ssl-redirect flag as follows

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: basic-ingress
  annotations:
    ingress.kubernetes.io/ssl-redirect: "false"
spec:
  backend:
    serviceName: nginx
    servicePort: 80
answered Sep 12, 2018 by Kalgi
• 52,360 points

Related Questions In Kubernetes

0 votes
1 answer

Error saying "The specified bucket does not exist" in kubernetes

Bucket is created in another region. Looks like ...READ MORE

answered Aug 31, 2018 in Kubernetes by Kalgi
• 52,360 points
3,768 views
0 votes
1 answer
+1 vote
1 answer
0 votes
1 answer

Kubernetes nginx-ingress TLS issue

You have to create a secret named test-secret. ➜ ...READ MORE

answered Sep 11, 2018 in Kubernetes by Kalgi
• 52,360 points
1,742 views
0 votes
1 answer

Nginx routing for kubernetes services

Hey, backend is a service running on ...READ MORE

answered Feb 8, 2019 in Kubernetes by Kalgi
• 52,360 points
1,111 views
0 votes
1 answer

Customize the routing logic in kubernetes ingress controller

Try building your own customized image based on ...READ MORE

answered Sep 7, 2018 in Kubernetes by Kalgi
• 52,360 points
1,124 views
0 votes
1 answer

Create Ingress controller in namespace

The ingress resource must be in the ...READ MORE

answered Oct 1, 2018 in Kubernetes by Kalgi
• 52,360 points
749 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP