3.6.
주의
3.6.1. 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
3.6.1.1. 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
apiVersion: maistra.io/v1
kind: ServiceMeshControlPlane
spec:
istio:
global:
mtls:
enabled: true
3.6.1.1.1. 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
apiVersion: "authentication.istio.io/v1alpha1"
kind: "Policy"
metadata:
name: default
namespace: <NAMESPACE>
spec:
peers:
- mtls: {}
3.6.1.2. 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
apiVersion: "networking.istio.io/v1alpha3"
kind: "DestinationRule"
metadata:
name: "default"
namespace: <CONTROL_PLANE_NAMESPACE>>
spec:
host: "*.local"
trafficPolicy:
tls:
mode: ISTIO_MUTUAL
3.6.1.3. 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
apiVersion: maistra.io/v1
kind: ServiceMeshControlPlane
spec:
istio:
global:
tls:
minProtocolVersion: TLSv1_2
maxProtocolVersion: TLSv1_3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3.6.2. 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
참고
3.6.3. 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
3.6.3.1. 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
$ oc create secret generic cacerts -n istio-system --from-file=<path>/ca-cert.pem \ --from-file=<path>/ca-key.pem --from-file=<path>/root-cert.pem \ --from-file=<path>/cert-chain.pemapiVersion: maistra.io/v1 kind: ServiceMeshControlPlane spec: istio: global: mtls: enabled: true security: selfSigned: false$ oc delete secret istio.default
3.6.3.2. 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
$ RATINGSPOD=`oc get pods -l app=ratings -o jsonpath='{.items[0].metadata.name}'`$ oc exec -it $RATINGSPOD -c istio-proxy -- /bin/cat /etc/certs/root-cert.pem > /tmp/pod-root-cert.pem$ oc exec -it $RATINGSPOD -c istio-proxy -- /bin/cat /etc/certs/cert-chain.pem > /tmp/pod-cert-chain.pem$ openssl x509 -in <path>/root-cert.pem -text -noout > /tmp/root-cert.crt.txt$ openssl x509 -in /tmp/pod-root-cert.pem -text -noout > /tmp/pod-root-cert.crt.txt$ diff /tmp/root-cert.crt.txt /tmp/pod-root-cert.crt.txt$ sed '0,/^-----END CERTIFICATE-----/d' /tmp/pod-cert-chain.pem > /tmp/pod-cert-chain-ca.pem$ openssl x509 -in <path>/ca-cert.pem -text -noout > /tmp/ca-cert.crt.txt$ openssl x509 -in /tmp/pod-cert-chain-ca.pem -text -noout > /tmp/pod-cert-chain-ca.crt.txt$ diff /tmp/ca-cert.crt.txt /tmp/pod-cert-chain-ca.crt.txt$ head -n 21 /tmp/pod-cert-chain.pem > /tmp/pod-cert-chain-workload.pem$ openssl verify -CAfile <(cat <path>/ca-cert.pem <path>/root-cert.pem) /tmp/pod-cert-chain-workload.pem/tmp/pod-cert-chain-workload.pem: OK
3.6.3.3. 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
$ oc delete secret cacerts -n istio-systemapiVersion: maistra.io/v1 kind: ServiceMeshControlPlane spec: istio: global: mtls: enabled: true security: selfSigned: true