Open3

Mesh Week: Securing Workloads (# 1)

takashi.kanazawatakashi.kanazawa

Answer

$ kubectl api-resources | grep peer
peerauthentications               pa           security.istio.io/v1                   true         PeerAuthentication

$ vi default-peer-auth.yaml
apiVersion: security.istio.io/v1
kind: PeerAuthentication
metadata:
  name: default
  namespace: default
spec:
  selector:
    matchLabels:
      mtls: strict
  mtls:
    mode: STRICT
  portLevelMtls:
    9000:
      mode: DISABLE

$ kubectl apply -f default-peer-auth.yaml
peerauthentication.security.istio.io/default created