I tried configuring ingress on my kubernetes cluster. I followed thedocumentation to install ingress controller and ran the following commands
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/mandatory.yamlkubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/provider/baremetal/service-nodeport.yaml
After that default-http-backend and nginx-ingress-controller were running:
ingress-nginx default-http-backend-846b65fb5f-6kwvp 1/1 Running 0 23h 192.168.2.28 node1ingress-nginx nginx-ingress-controller-d658896cd-6m76j 1/1 Running 0 6m 192.168.2.31 node1
I tried testing ingress and I deployed the following service:
apiVersion: apps/v1kind: Deploymentmetadata: name: echoserver-deployspec: replicas: 2 selector: matchLabels: app: echo template: metadata: labels: app: echo spec: containers: - name: my-echo image: gcr.io/google_containers/echoserver:1.8---apiVersion: v1kind: Servicemetadata: name: echoserver-svcspec: selector: app: echo ports: - protocol: TCP port: 8080 targetPort: 8080
And the following ingress:
apiVersion: extensions/v1beta1kind: Ingressmetadata: name: happy-ingress annotations: INGRESS.kubernetes.io/rewrite-target: /spec: rules: - host: happy.k8s.io http: paths: - path: /echoserver backend: serviceName: echoserver-svc servicePort: 8080
When I ran the command 'kubectl get ing' I received:
NAME HOSTS ADDRESS PORTS AGEhappy-ingress happy.k8s.io 80 14m
I didn't have ADDRESS resolved and I can’t figure out what the problem is because all the pods are running. Can you give me a hint as to what the issue can be?
Thanks