Server must have TLS settings for HTTPS/TLS protocols

Hi all

I am trying to configure the gateway for https as follows:

apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: httpbin-gateway
spec:
  selector:
    istio: ingressgateway # use Istio default gateway implementation
  servers:
    - port:
        number: 443
        name: https
        protocol: HTTPS
      hosts:
        - hello.service.example.io
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: httpbin
spec:
  hosts:
    - hello.service.example.io
  gateways:
    - httpbin-gateway
  http:
    - match:
        - uri:
            prefix: /
      route:
        - destination:
            port:
              number: 8000
            host: httpbin

When I apply the configuration above, I’ve got:

Resource: "networking.istio.io/v1alpha3, Resource=gateways", GroupVersionKind: "networking.istio.io/v1alpha3, Kind=Gateway"
Name: "httpbin-gateway", Namespace: "dev"
for: "istio-demo-app.yml": admission webhook "validation.istio.io" denied the request: configuration is invalid: server must have TLS settings for HTTPS/TLS protocols  

What am I doing wrong?

Thanks

1 Like

you need to tell the g/w which ssl certificate to use for tls, like this:

    hosts:
    - uk.bookinfo.com
    - eu.bookinfo.com
    tls:
      mode: SIMPLE # enables HTTPS on this port
      serverCertificate: /etc/certs/servercert.pem
      privateKey: /etc/certs/privatekey.pem
3 Likes