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>