I’ve installed istio 1.1.3 and have 2 services entries. The one below, doesn’t seem to work.
kube-shell> kubectl apply -f - <<EOF
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: sslhttpbin-ext
namespace: istio-system
spec:
hosts:
- httpbin.org
ports:
- number: 443
name: https
protocol: HTTPS
resolution: DNS
location: MESH_EXTERNAL
EOF
serviceentry.networking.istio.io/sslhttpbin-ext unchanged
kube-shell>
I’m starting a bash session via
kubectl -n mobility run my-shell --rm -i --tty --image ellerbrock/alpine-bash-curl-ssl -- b ash
I’m getting an istio side car for my-shell
kube-shell> k -n mobility get pods | grep my-shell
my-shell-678c4759c7-lpc7f 2/2 Running 0 8s
k -n mobility logs -f my-shell-678c4759c7-lpc7f -c istio-proxy
...
2019-04-24T19:27:15.604678Z info Envoy proxy is ready
When I run curl I get
curl -v https://httpbin.org:443/headers
* Trying 34.238.32.178...
* TCP_NODELAY set
* Connected to httpbin.org (34.238.32.178) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* error:1400410B:SSL routines:CONNECT_CR_SRVR_HELLO:wrong version number
* stopped the pause stream!
* Closing connection 0
curl: (35) error:1400410B:SSL routines:CONNECT_CR_SRVR_HELLO:wrong version number
Now I’ve also setup a service entry for non-https and that works.
kube-shell> k -n istio-system get serviceentry
NAME HOSTS LOCATION RESOLUTION AGE
httpbin-ext [httpbin.org] MESH_EXTERNAL DNS 3h
sslhttpbin-ext [httpbin.org] MESH_EXTERNAL DNS 3h
curl http://httpbin.org/headers
{
"headers": {
"Accept": "*/*",
"Host": "httpbin.org",
"User-Agent": "curl/7.61.0",
"X-B3-Sampled": "0",
"X-B3-Spanid": "eaf977939871f88f",
"X-B3-Traceid": "e31b13a119326b0aeaf977939871f88f",
"X-Envoy-Decorator-Operation": "httpbin.org:80/*",
"X-Envoy-Expected-Rq-Timeout-Ms": "3000",
"X-Istio-Attributes": "CikKGGRlc3RpbmF0aW9uLnNlcnZpY2UuaG9zdBINEgtodHRwYmluLm9yZwopChhkZXN0aW5hdGlvbi5zZXJ2aWNlLm5hbWUSDRILaHR0cGJpbi5vcmcKLwodZGVzdGluYXRpb24uc2VydmljZS5uYW1lc3BhY2USDhIMaXN0aW8tc3lzdGVtCj8KCnNvdXJjZS51aWQSMRIva3ViZXJuZXRlczovL215LXNoZWxsLTY3OGM0NzU5YzctbHBjN2YubW9iaWxpdHk="
}
}
from within the same container that I used for the https.
Why is my https serviceentry not working? I’m trying to follow this guide https://istio.io/docs/tasks/traffic-management/egress/#access-an-external-https-service