nginx-ingress k8s on Google cluster is not available

  docker, kubernetes, nginx

I am practicing the k8s by following the ingress chapter. I am using Google Cluster. Specification are as follows

master: 1.11.7-gke.4
node: 1.11.7-gke.4

$ kubectl get nodes -o wide
NAME                                   STATUS   ROLES    AGE   VERSION         INTERNAL-IP   EXTERNAL-IP      OS-IMAGE                             KERNEL-VERSION   CONTAINER-RUNTIME
gke-singh-default-pool-a69fa545-1sm3   Ready    <none>   6h    v1.11.7-gke.4   10.148.0.46   35.197.128.107   Container-Optimized OS from Google   4.14.89+         docker://17.3.2
gke-singh-default-pool-a69fa545-819z   Ready    <none>   6h    v1.11.7-gke.4   10.148.0.47   35.198.217.71    Container-Optimized OS from Google   4.14.89+         docker://17.3.2
gke-singh-default-pool-a69fa545-djhz   Ready    <none>   6h    v1.11.7-gke.4   10.148.0.45   35.197.159.75    Container-Optimized OS from Google   4.14.89+         docker://17.3.2

master endpoint: 35.186.148.93

DNS: singh.hbot.io (master IP)

To keep my question short. I post my source code in the snippet and links back to here.

Files:

deployment.yaml
ingress.yaml
ingress-rules.yaml

Problem:
curl http://singh.hbot.io/webapp1 got timed out

Description

$ kubectl get deployment -n nginx-ingress
NAME            DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
nginx-ingress   1         1         1            0           2h

nginx-ingress deployment is not available.

$ kubectl describe deployment -n nginx-ingress
Name:                   nginx-ingress
Namespace:              nginx-ingress
CreationTimestamp:      Mon, 04 Mar 2019 15:09:42 +0700
Labels:                 app=nginx-ingress
Annotations:            deployment.kubernetes.io/revision: 1
                        kubectl.kubernetes.io/last-applied-configuration:
                          {"apiVersion":"extensions/v1beta1","kind":"Deployment","metadata":{"annotations":{},"name":"nginx-ingress","namespace":"nginx-ingress"},"s...
Selector:               app=nginx-ingress
Replicas:               1 desired | 1 updated | 1 total | 0 available | 1 unavailable
StrategyType:           RollingUpdate
MinReadySeconds:        0
RollingUpdateStrategy:  1 max unavailable, 1 max surge
Pod Template:
  Labels:           app=nginx-ingress
  Service Account:  nginx-ingress
  Containers:
   nginx-ingress:
    Image:       nginx/nginx-ingress:edge
    Ports:       80/TCP, 443/TCP
    Host Ports:  0/TCP, 0/TCP
    Args:
      -nginx-configmaps=$(POD_NAMESPACE)/nginx-config
      -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret
    Environment:
      POD_NAMESPACE:   (v1:metadata.namespace)
      POD_NAME:        (v1:metadata.name)
    Mounts:           <none>
  Volumes:            <none>
Conditions:
  Type           Status  Reason
  ----           ------  ------
  Available      True    MinimumReplicasAvailable
OldReplicaSets:  <none>
NewReplicaSet:   nginx-ingress-77fcd48f4d (1/1 replicas created)
Events:          <none>

pods:

$ kubectl get pods --all-namespaces=true
NAMESPACE       NAME                                              READY   STATUS             RESTARTS   AGE
default         webapp1-7d67d68676-k9hhl                          1/1     Running            0          6h
default         webapp2-64d4844b78-9kln5                          1/1     Running            0          6h
default         webapp3-5b8ff7484d-zvcsf                          1/1     Running            0          6h
kube-system     event-exporter-v0.2.3-85644fcdf-xxflh             2/2     Running            0          6h
kube-system     fluentd-gcp-scaler-8b674f786-gvv98                1/1     Running            0          6h
kube-system     fluentd-gcp-v3.2.0-srzc2                          2/2     Running            0          6h
kube-system     fluentd-gcp-v3.2.0-w2z2q                          2/2     Running            0          6h
kube-system     fluentd-gcp-v3.2.0-z7p9l                          2/2     Running            0          6h
kube-system     heapster-v1.6.0-beta.1-5685746c7b-kd4mn           3/3     Running            0          6h
kube-system     kube-dns-6b98c9c9bf-6p8qr                         4/4     Running            0          6h
kube-system     kube-dns-6b98c9c9bf-pffpt                         4/4     Running            0          6h
kube-system     kube-dns-autoscaler-67c97c87fb-gbgrs              1/1     Running            0          6h
kube-system     kube-proxy-gke-singh-default-pool-a69fa545-1sm3   1/1     Running            0          6h
kube-system     kube-proxy-gke-singh-default-pool-a69fa545-819z   1/1     Running            0          6h
kube-system     kube-proxy-gke-singh-default-pool-a69fa545-djhz   1/1     Running            0          6h
kube-system     l7-default-backend-7ff48cffd7-trqvx               1/1     Running            0          6h
kube-system     metrics-server-v0.2.1-fd596d746-bvdfk             2/2     Running            0          6h
kube-system     tiller-deploy-57c574bfb8-xnmtj                    1/1     Running            0          1h
nginx-ingress   nginx-ingress-77fcd48f4d-rfwbk                    0/1     CrashLoopBackOff   35         2h

Source: StackOverflow

LEAVE A COMMENT