Skip to content

BookInfo gateway ingress is not getting a load balancer #219

@ahmetb

Description

@ahmetb

I have followed the instructions on GKE.

kubectl apply -f <(istioctl kube-inject -f bookinfo.yaml)
service "details" created
deployment "details-v1" configured
service "ratings" created
deployment "ratings-v1" configured
service "reviews" created
deployment "reviews-v1" configured
deployment "reviews-v2" configured
deployment "reviews-v3" configured
service "productpage" created
deployment "productpage-v1" configured
ingress "gateway" configured
$ kubectl get ing
NAME            HOSTS     ADDRESS          PORTS     AGE
gateway         *         104.198.77.146   80        32m
$ kubectl get ing gateway -o=yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"extensions/v1beta1","kind":"Ingress","metadata":{"annotations":{"kubernetes.io/ingress.class":"istio"},"name":"gateway","namespace":"default"},"spec":{"rules":[{"http":{"paths":[{"backend":{"serviceName":"productpage","servicePort":9080},"path":"/productpage"},{"backend":{"serviceName":"productpage","servicePort":9080},"path":"/login"},{"backend":{"serviceName":"productpage","servicePort":9080},"path":"/logout"}]}}]}}
    kubernetes.io/ingress.class: istio
  creationTimestamp: 2017-05-09T20:52:12Z
  generation: 1
  name: gateway
  namespace: default
  resourceVersion: "5105"
  selfLink: /apis/extensions/v1beta1/namespaces/default/ingresses/gateway
  uid: 603d2332-34f9-11e7-ae12-42010a800fde
spec:
  rules:
  - http:
      paths:
      - backend:
          serviceName: productpage
          servicePort: 9080
        path: /productpage
      - backend:
          serviceName: productpage
          servicePort: 9080
        path: /login
      - backend:
          serviceName: productpage
          servicePort: 9080
        path: /logout
status:
  loadBalancer:
    ingress:
    - ip: 104.198.77.146

Describe output:

$ kubectl describe ing gateway
Name:			gateway
Namespace:		default
Address:		104.198.77.146
Default backend:	default-http-backend:80 (10.8.0.8:8080)
Rules:
  Host	Path	Backends
  ----	----	--------
  *
    	/productpage 	productpage:9080 (<none>)
    	/login 		productpage:9080 (<none>)
    	/logout 	productpage:9080 (<none>)
Annotations:
Events:	<none>

Problems

  1. The external IP address does not work.
  2. No Load Balancers created for this ingress.
  3. No events for this Ingress in kubectl get events.
  4. This ingress output is not normal, see the ingress below for an example:
$ kubectl describe ing basic-ingress
Name:			basic-ingress
Namespace:		default
Address:		35.190.22.239
Default backend:	nginx:80 (10.8.4.5:80)
Rules:
  Host	Path	Backends
  ----	----	--------
  *	* 	nginx:80 (10.8.4.5:80)
Annotations:
  forwarding-rule:	k8s-fw-default-basic-ingress--4466b35d5e76d578
  target-proxy:		k8s-tp-default-basic-ingress--4466b35d5e76d578
  url-map:		k8s-um-default-basic-ingress--4466b35d5e76d578
  backends:		{"k8s-be-32644--4466b35d5e76d578":"HEALTHY"}
Events:
  FirstSeen	LastSeen	Count	From			SubObjectPath	Type		Reason	Message
  ---------	--------	-----	----			-------------	--------	------	-------
  5m		5m		1	loadbalancer-controller			Normal		ADD	default/basic-ingress
  4m		19s		10	loadbalancer-controller			Normal		CREATE	ip: 35.190.22.239
  4m		17s		22	loadbalancer-controller			Normal		Service	default backend set to nginx:32644

I am guessing ingress/gateway resource is not getting prepared by the GKE ingress controller because the target service/productpage is not exposed with type: NodePort (it's type: ClusterIP).

$ kd svc productpage
Name:			productpage
Namespace:		default
Labels:			app=productpage
Annotations:		kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"app":"productpage"},"name":"productpage","namespace":"default"},"spec":{"po...
Selector:		app=productpage
Type:			ClusterIP
IP:			10.11.243.139
Port:			http	9080/TCP
Endpoints:		10.8.4.4:9080
Session Affinity:	None
Events:			<none>

When I look at events via:

kubectl get events -w | grep -i Ingress

I see nothing about the gateway Ingress in the events.

Can someone verify the instructions for tomorrow‘s hackathon?

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions