Description
Bug description
I've tested VM multi network mesh expansion with mTLS connection from the GKE to the VM (EC2) - the connection failed due to:
From the client (sleep-pod) logs:
TLS error: 268435581:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED
From the server (VM) logs:
TLS error: 268436504:SSL routines:OPENSSL_internal:TLSV1_ALERT_UNKNOWN_CA
I've followed https://istio.io/docs/examples/virtual-machines/multi-network/ with some changes:
- Wanted to caught all inbound and outbound traffic to the VM so I've set
ISTIO_SERVICE_CIDR=*
andISTIO_INBOUND_PORTS=*
go run istio.io/istio/security/tools/generate_cert -client -host spiffee://cluster.local/vm/vmname --out-priv key.pem --out-cert cert-chain.pem -mode citadel
- command didn't worked because istiod is not self-signed mode so noistio-ca-secret
secret. I run the following with spiffe://cluster.local/ns/vm/sa/default -generate_cert -client -host spiffe://cluster.local/ns/vm/sa/default -signer-cert samples/certs/ca-cert.pem -signer-priv samples/certs/ca-key.pem --out-priv key.pem --out-cert cert-chain.pem -mode signer
- Due to the fact that the VM is not on the same network as my GKE, I've added an endpoint to the serviceentry (that was created with the istioctl experimental add-to-mesh command) that will direct traffic to the ext-ip of my VM and gave him highest weight then the internal IP
- Added a destination rule to encrypt traffic to the VM
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: vm-mtls
spec:
host: "*.vm.svc.cluster.local"
trafficPolicy:
portLevelSettings:
- port:
number: 80
tls:
mode: ISTIO_MUTUAL
Expected behavior
mtls connection from the cluster to the vm should work
Steps to reproduce the bug
Follow https://istio.io/docs/examples/virtual-machines/multi-network/ and add a destination rule to use mtls to the VM
Version (include the output of istioctl version --remote
and kubectl version
and helm version
if you used Helm)
1.5.1
How was Istio installed?
istioctl manifest apply
-f install/kubernetes/operator/examples/vm/values-istio-meshexpansion.yaml
Environment where bug was observed (cloud vendor, OS, etc)
GKE, EC2
Activity
FrimIdan commentedon Apr 21, 2020
@irisdingbj following our discussion
IsServer
when generating cert #23106xichengliudui commentedon Jun 28, 2020
I encountered the same problem as you, but I did not fix it. what system do you use?
FrimIdan commentedon Jun 28, 2020
What do you mean
what system do you use?
I think this issue was resolved in 1.6.x
xichengliudui commentedon Jun 29, 2020
operating system
FrimIdan commentedon Jun 29, 2020
I was running on Ubuntu, I think the issue was that the certificates that was generated for the VM wasn't a server side certificates.
tanjunchen commentedon Jun 29, 2020
I see the same issue in 1.6.0
lsb_release -a
tanjunchen commentedon Jul 3, 2020
@FrimIdan thank you.
I have resolve this problems. see https://istio.io/latest/docs/setup/install/virtual-machine/ #25108 (comment)