Reputation: 1468
I am trying to follow the istio docs on deploying the bookinfo app and setting up ingress controllers at - https://istio.io/docs/tasks/traffic-management/ingress/ingress-control/#determining-the-ingress-ip-and-ports
After creating an istio gateway as -
**kubectl apply -n my-bookinfo -f gateway.yaml**
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: httpbin-gateway
spec:
selector:
istio: ingressgateway # use Istio default gateway implementation
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "httpbin.example.com"
Response: gateway.networking.istio.io/httpbin-gateway configured
when I try to view it as -
kubectl get gateway -n my-bookinfo
I dont any resources back, instead I get - "No resources found"
What am I missing here? Should I not be able to see the gateway resources? I am not even sure that they got created. How do I validate it?
Upvotes: 1
Views: 468
Reputation: 85
Gateways & Ingress works very closely do to open port you have to specify the port that you are opening for your ingress, also
If you are using Tsl certificate as a secret then secret should be in the namespace of Gateway & ingress as well.
This is a Sample Gateway file
apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata:
name: istio-gateway namespace: mobius-master spec: selector: istio: ingress servers:
- port: number: 80 name: http protocol: HTTP hosts:
- "*" tls: httpsRedirect: false # Enable HTTPS redirection
- hosts:
- "ig.xxx.ai" port: name: https number: 443 protocol: HTTPS tls: mode: SIMPLE credentialName: xxx-ai-ssl-cert
One more important point is the selector of ingress in Gateway files.
selector:
istio: ingress
some of istio version have selector as
selector:
istio: ingressgateway
Best way to debug this is to get open kiali to check if the selectors exist in the namespaces.
Upvotes: 0
Reputation: 72191
in this case the solution is to use the full resource api name:
kubectl get gateway.networking.istio.io -n my-bookinfo
Upvotes: 4