<p>I am trying to run ingress on minikube.
I am running on Ubnutu 18.04.
I am interested in nginx-ingress from:
<a href="https://kubernetes.github.io/ingress-nginx/deploy/" rel="nofollow noreferrer">https://kubernetes.github.io/ingress-nginx/deploy/</a></p>
<p>I have simple test service which is running on port 3000 inside docker container. This container is pushed to docker hub. I have simple get request there:</p>
<pre><code>app.get('/api/users/currentuser', (req, res) =&gt; {
  res.send('Hi there!');
});
</code></pre>
<p>Steps I've done: <strong>minikube start</strong> then <strong>minikube addons enable ingress</strong> after that I got message from minikube:</p>
<pre><code>🔎  Verifying ingress addon...
🌟  The 'ingress' addon is enabled
</code></pre>
<p>but still when I am trying to verify if it is running I don't think that this is working fine:
Output from <strong>kubectl get pods -n kube-system</strong></p>
<pre><code>NAME                                        READY   STATUS      RESTARTS   AGE
coredns-66bff467f8-bhqnk                    1/1     Running     4          2d8h
etcd-minikube                               1/1     Running     4          2d8h
ingress-nginx-admission-create-676jc        0/1     Completed   0          168m
ingress-nginx-admission-patch-bwf7x         0/1     Completed   0          168m
ingress-nginx-controller-7bb4c67d67-x5qzl   1/1     Running     3          168m
kube-apiserver-minikube                     1/1     Running     4          2d8h
kube-controller-manager-minikube            1/1     Running     4          2d8h
kube-proxy-jg2jz                            1/1     Running     4          2d8h
kube-scheduler-minikube                     1/1     Running     4          2d8h
storage-provisioner                         1/1     Running     6          2d8h
</code></pre>
<p>There is also no information about ingress when doing <strong>kubectl get pods</strong></p>
<pre><code>NAME                         READY   STATUS    RESTARTS   AGE
auth-depl-7dff4bb675-bpzfh   1/1     Running   0          4m58s
</code></pre>
<p>I am running services via skaffold using command <strong>skaffold dev</strong></p>
<p>configuration of ingress service looks like:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: ingress-service
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/use-regex: 'true'
spec:
  rules:
    - host: kube-test.dev
      http:
        paths:
          - path: /api/users/?(.*)
            backend:
              serviceName: auth-srv
              servicePort: 3000
</code></pre>
<p>which points to deployment file of (host of <code>kube-test.dev</code> is just mapped to localhost in <code>/etc/hosts</code>):</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: auth-depl
spec:
  replicas: 1
  selector:
    matchLabels:
      app: auth
  template:
    metadata:
      labels:
        app: auth
    spec:
      containers:
        - name: auth
          image: geborskimateusz/auth
---
apiVersion: v1
kind: Service
metadata:
  name: auth-srv
spec:
  selector:
    app: auth
  ports:
    - name: auth
      protocol: TCP
      port: 3000
      targetPort: 3000
</code></pre>
<p>what is more if this does matter skaffold config looks like:</p>
<pre><code>apiVersion: skaffold/v2alpha3
kind: Config
deploy:
  kubectl:
    manifests:
      - ./infra/k8s/*
build:
  local:
    push: false
  artifacts:
    - image: geborskimateusz/auth
      context: auth
      docker:
        dockerfile: Dockerfile
      sync:
        manual:
          - src: 'src/**/*.ts'
            dest: .
</code></pre>
<p>Any ideas here? I was running similar config on mac and it worked fine, this looks more like ingress addon problem. Any ideas here?</p>
<p>when I hit <strong>kube-test.dev/api/users/currentuser</strong> I get:</p>
<pre><code>Error: connect ECONNREFUSED 127.0.0.1:80
</code></pre>
<p>and hosts file:</p>
<pre><code>127.0.0.1       localhost
127.0.1.1       mat-5474

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

127.0.0.1 kube-test.dev
                    
</code></pre>
<p>EDIT</p>
<p><strong>kubectl describe pods auth-depl-6845657cbc-kqdm8</strong></p>
<pre><code>Name:         auth-depl-6845657cbc-kqdm8
Namespace:    default
Priority:     0
Node:         minikube/192.168.99.100
Start Time:   Tue, 14 Jul 2020 09:51:03 +0200
Labels:       app=auth
              app.kubernetes.io/managed-by=skaffold-v1.12.0
              pod-template-hash=6845657cbc
              skaffold.dev/builder=local
              skaffold.dev/cleanup=true
              skaffold.dev/deployer=kubectl
              skaffold.dev/docker-api-version=1.40
              skaffold.dev/run-id=fcdee662-da9c-48ab-aab0-a6ed0ecef301
              skaffold.dev/tag-policy=git-commit
              skaffold.dev/tail=true
Annotations:  &lt;none&gt;
Status:       Running
IP:           172.17.0.4
IPs:
  IP:           172.17.0.4
Controlled By:  ReplicaSet/auth-depl-6845657cbc
Containers:
  auth:
    Container ID:   docker://674d4aae381431ff124c8533250a6206d044630135854e43ac70f2830764ce0a
    Image:          geborskimateusz/auth:2d55de4779465ed71686bffc403e6ad7cfef717e7d297ec90ef50a363dc5d3c7
    Image ID:       docker://sha256:2d55de4779465ed71686bffc403e6ad7cfef717e7d297ec90ef50a363dc5d3c7
    Port:           &lt;none&gt;
    Host Port:      &lt;none&gt;
    State:          Running
      Started:      Tue, 14 Jul 2020 09:51:04 +0200
    Ready:          True
    Restart Count:  0
    Environment:    &lt;none&gt;
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-pcj8j (ro)
Conditions:
  Type              Status
  Initialized       True 
  Ready             True 
  ContainersReady   True 
  PodScheduled      True 
Volumes:
  default-token-pcj8j:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-pcj8j
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  &lt;none&gt;
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type    Reason     Age        From               Message
  ----    ------     ----       ----               -------
  Normal  Scheduled  &lt;unknown&gt;  default-scheduler  Successfully assigned default/auth-depl-6845657cbc-kqdm8 to minikube
  Normal  Pulled     47s        kubelet, minikube  Container image &quot;geborskimateusz/auth:2d55de4779465ed71686bffc403e6ad7cfef717e7d297ec90ef50a363dc5d3c7&quot; already present on machine
  Normal  Created    47s        kubelet, minikube  Created container auth
  Normal  Started    47s        kubelet, minikube  Started container auth
</code></pre>
<p>EDIT 2
<strong>kubectl logs ingress-nginx-controller-7bb4c67d67-x5qzl -n kube-system</strong></p>
<pre><code>W0714 07:49:38.776541       6 flags.go:249] SSL certificate chain completion is disabled (--enable-ssl-chain-completion=false)
W0714 07:49:38.776617       6 client_config.go:543] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
I0714 07:49:38.777097       6 main.go:220] Creating API client for https://10.96.0.1:443
-------------------------------------------------------------------------------
NGINX Ingress controller
  Release:       0.32.0
  Build:         git-446845114
  Repository:    https://github.com/kubernetes/ingress-nginx
  nginx version: nginx/1.17.10

-------------------------------------------------------------------------------

I0714 07:49:38.791783       6 main.go:264] Running in Kubernetes cluster version v1.18 (v1.18.3) - git (clean) commit 2e7996e3e2712684bc73f0dec0200d64eec7fe40 - platform linux/amd64
I0714 07:49:39.007305       6 main.go:105] SSL fake certificate created /etc/ingress-controller/ssl/default-fake-certificate.pem
I0714 07:49:39.008092       6 main.go:113] Enabling new Ingress features available since Kubernetes v1.18
W0714 07:49:39.010806       6 main.go:125] No IngressClass resource with name nginx found. Only annotation will be used.
I0714 07:49:39.022204       6 ssl.go:528] loading tls certificate from certificate path /usr/local/certificates/cert and key path /usr/local/certificates/key
I0714 07:49:39.058275       6 nginx.go:263] Starting NGINX Ingress controller
I0714 07:49:39.076400       6 event.go:278] Event(v1.ObjectReference{Kind:&quot;ConfigMap&quot;, Namespace:&quot;kube-system&quot;, Name:&quot;nginx-load-balancer-conf&quot;, UID:&quot;3af0b029-24c9-4033-8d2a-de7a15b62464&quot;, APIVersion:&quot;v1&quot;, ResourceVersion:&quot;2007&quot;, FieldPath:&quot;&quot;}): type: 'Normal' reason: 'CREATE' ConfigMap kube-system/nginx-load-balancer-conf
I0714 07:49:39.076438       6 event.go:278] Event(v1.ObjectReference{Kind:&quot;ConfigMap&quot;, Namespace:&quot;kube-system&quot;, Name:&quot;tcp-services&quot;, UID:&quot;bbd76f82-e3b3-42f8-8098-54a87beb34fe&quot;, APIVersion:&quot;v1&quot;, ResourceVersion:&quot;2008&quot;, FieldPath:&quot;&quot;}): type: 'Normal' reason: 'CREATE' ConfigMap kube-system/tcp-services
I0714 07:49:39.076447       6 event.go:278] Event(v1.ObjectReference{Kind:&quot;ConfigMap&quot;, Namespace:&quot;kube-system&quot;, Name:&quot;udp-services&quot;, UID:&quot;21710ee0-4b23-4669-b265-8bf5be662871&quot;, APIVersion:&quot;v1&quot;, ResourceVersion:&quot;2009&quot;, FieldPath:&quot;&quot;}): type: 'Normal' reason: 'CREATE' ConfigMap kube-system/udp-services
I0714 07:49:40.260006       6 nginx.go:307] Starting NGINX process
I0714 07:49:40.261693       6 leaderelection.go:242] attempting to acquire leader lease  kube-system/ingress-controller-leader-nginx...
I0714 07:49:40.262598       6 nginx.go:327] Starting validation webhook on :8443 with keys /usr/local/certificates/cert /usr/local/certificates/key
I0714 07:49:40.262974       6 controller.go:139] Configuration changes detected, backend reload required.
I0714 07:49:40.302595       6 leaderelection.go:252] successfully acquired lease kube-system/ingress-controller-leader-nginx
I0714 07:49:40.304129       6 status.go:86] new leader elected: ingress-nginx-controller-7bb4c67d67-x5qzl
I0714 07:49:40.437999       6 controller.go:155] Backend successfully reloaded.
I0714 07:49:40.438145       6 controller.go:164] Initial sync, sleeping for 1 second.
W0714 07:51:03.723044       6 controller.go:909] Service &quot;default/auth-srv&quot; does not have any active Endpoint.
I0714 07:51:03.765397       6 main.go:115] successfully validated configuration, accepting ingress ingress-service in namespace default
I0714 07:51:03.771212       6 event.go:278] Event(v1.ObjectReference{Kind:&quot;Ingress&quot;, Namespace:&quot;default&quot;, Name:&quot;ingress-service&quot;, UID:&quot;96ec6e26-2354-46c9-be45-ca17a5f1a6f3&quot;, APIVersion:&quot;networking.k8s.io/v1beta1&quot;, ResourceVersion:&quot;3991&quot;, FieldPath:&quot;&quot;}): type: 'Normal' reason: 'CREATE' Ingress default/ingress-service
I0714 07:51:07.032427       6 controller.go:139] Configuration changes detected, backend reload required.
I0714 07:51:07.115511       6 controller.go:155] Backend successfully reloaded.
I0714 07:51:40.319830       6 status.go:275] updating Ingress default/ingress-service status from [] to [{192.168.99.100 }]
I0714 07:51:40.332044       6 event.go:278] Event(v1.ObjectReference{Kind:&quot;Ingress&quot;, Namespace:&quot;default&quot;, Name:&quot;ingress-service&quot;, UID:&quot;96ec6e26-2354-46c9-be45-ca17a5f1a6f3&quot;, APIVersion:&quot;networking.k8s.io/v1beta1&quot;, ResourceVersion:&quot;4011&quot;, FieldPath:&quot;&quot;}): type: 'Normal' reason: 'UPDATE' Ingress default/ingress-service
W0714 07:55:28.215453       6 controller.go:822] Error obtaining Endpoints for Service &quot;default/auth-srv&quot;: no object matching key &quot;default/auth-srv&quot; in local store
I0714 07:55:28.215542       6 controller.go:139] Configuration changes detected, backend reload required.
I0714 07:55:28.234472       6 event.go:278] Event(v1.ObjectReference{Kind:&quot;Ingress&quot;, Namespace:&quot;default&quot;, Name:&quot;ingress-service&quot;, UID:&quot;96ec6e26-2354-46c9-be45-ca17a5f1a6f3&quot;, APIVersion:&quot;networking.k8s.io/v1beta1&quot;, ResourceVersion:&quot;4095&quot;, FieldPath:&quot;&quot;}): type: 'Normal' reason: 'DELETE' Ingress default/ingress-service
I0714 07:55:28.297582       6 controller.go:155] Backend successfully reloaded.
I0714 07:55:31.549294       6 controller.go:139] Configuration changes detected, backend reload required.
I0714 07:55:31.653169       6 controller.go:155] Backend successfully reloaded.
W0714 08:25:53.145312       6 controller.go:909] Service &quot;default/auth-srv&quot; does not have any active Endpoint.
I0714 08:25:53.188326       6 main.go:115] successfully validated configuration, accepting ingress ingress-service in namespace default
I0714 08:25:53.191134       6 event.go:278] Event(v1.ObjectReference{Kind:&quot;Ingress&quot;, Namespace:&quot;default&quot;, Name:&quot;ingress-service&quot;, UID:&quot;4ac33fc5-ae7a-4511-922f-7e6bdc1fe4d5&quot;, APIVersion:&quot;networking.k8s.io/v1beta1&quot;, ResourceVersion:&quot;4124&quot;, FieldPath:&quot;&quot;}): type: 'Normal' reason: 'CREATE' Ingress default/ingress-service
I0714 08:25:54.270931       6 status.go:275] updating Ingress default/ingress-service status from [] to [{192.168.99.100 }]
I0714 08:25:54.278468       6 event.go:278] Event(v1.ObjectReference{Kind:&quot;Ingress&quot;, Namespace:&quot;default&quot;, Name:&quot;ingress-service&quot;, UID:&quot;4ac33fc5-ae7a-4511-922f-7e6bdc1fe4d5&quot;, APIVersion:&quot;networking.k8s.io/v1beta1&quot;, ResourceVersion:&quot;4136&quot;, FieldPath:&quot;&quot;}): type: 'Normal' reason: 'UPDATE' Ingress default/ingress-service
I0714 08:25:56.460808       6 controller.go:139] Configuration changes detected, backend reload required.
I0714 08:25:56.530559       6 controller.go:155] Backend successfully reloaded.
</code></pre>
<p><strong>kubectl describe svc auth-srv</strong></p>
<pre><code>Name:              auth-srv
Namespace:         default
Labels:            app.kubernetes.io/managed-by=skaffold-v1.12.0
                   skaffold.dev/builder=local
                   skaffold.dev/cleanup=true
                   skaffold.dev/deployer=kubectl
                   skaffold.dev/docker-api-version=1.40
                   skaffold.dev/run-id=19ab20fe-baa5-4faf-a478-c1bad98a22b1
                   skaffold.dev/tag-policy=git-commit
                   skaffold.dev/tail=true
Annotations:       Selector:  app=auth
Type:              ClusterIP
IP:                10.99.52.173
Port:              auth  3000/TCP
TargetPort:        3000/TCP
Endpoints:         172.17.0.4:3000
Session Affinity:  None
Events:            &lt;none&gt;
</code></pre>

Mateusz Gebroski
<p>run minikube ip.
You will get an ip address, copy paste in etc/hosts file for kube-test.dev</p>
