0
votes

I am trying to follow the instructions at https://istio.io/docs/guides/bookinfo/ and https://istio.io/docs/tasks/traffic-management/ingress/#determining-the-ingress-ip-and-ports to put istio on the minikube.

The pod and service seems up and running fine. enter image description here

Then I export port and host

export INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http")].nodePort}')

export SECURE_INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="https")].nodePort}')

export INGRESS_HOST=$(kubectl get po -l istio=ingressgateway -n istio-system -o 'jsonpath={.items[0].status.hostIP}')

From my understanding, the next step is to configure ingress with the istio gateway. In the below yaml, what's the hosts value should I put?

cat <<EOF | istioctl create -f -
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: book-gateway
spec:
  selector:
    istio: ingressgateway # use Istio default gateway implementation
  servers:
  - port:
      number: 80
      name: http
      protocol: HTTP
    hosts:
    - 
EOF

enter image description here

2

2 Answers

0
votes

You should specify "*". Note step 3 in https://istio.io/docs/guides/bookinfo/#running-on-kubernetes

Define the ingress gateway for the application

You have a prepared yaml file for that: samples/bookinfo/routing/bookinfo-gateway.yaml

Troubleshooting ingress gateway:

$ istioctl get gateway bookinfo-gateway -o yaml
$ istioctl get virtualservice bookinfo -o yaml
$ kubectl get svc -n istio-system
$ kubectl logs -n istio-system -l istio=ingressgateway
0
votes

Even the sidecar is running, I have to use

If you are using manual sidecar injection, use the following command

$ kubectl apply -f <(istioctl kube-inject -f samples/bookinfo/kube/bookinfo.yaml)

https://istio.io/docs/guides/bookinfo/

The below auto injection doesn't work.

If you are using a cluster with automatic sidecar injection enabled, simply deploy the services using kubectl

$ kubectl apply -f samples/bookinfo/kube/bookinfo.yaml Copy

It's because the labels need to be provided for the auto injection.

The Istio-Sidecar-injector will automatically inject Envoy containers into your application pods assuming running in namespaces labeled with istio-injection=enabled

$ kubectl label namespace istio-injection=enabled $ kubectl create -n -f .yaml Copy

https://istio.io/docs/setup/kubernetes/quick-start/