Mutual TLS with Istio
To enable mTLS first create mTLS authentication policy:
apiVersion: authentication.istio.io/v1alpha1
kind: MeshPolicy
metadata:
name: default
spec:
peers:
- mtls: {}
apiVersion: authentication.istio.io/v1alpha1
kind: Policy
metadata:
name: default
namespace: namespace-name
spec:
peers:
- mtls: {}
apiVersion: authentication.istio.io/v1alpha1
kind: Policy
metadata:
name: default
namespace: namespace-name
spec:
targets:
- name: service-name
peers:
- mtls: {}
Apply Destination rule
“Policy” : 실행중인 서비스로 들어오는 트래픽이 mTLS를 사용하는것을 알려줌
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: default
namespace: namespace-name
spec:
host: "service-name.namespace-name.svc.cluster.local"
trafficPolicy:
tls:
mode: ISTIO_MUTUAL
Health Check