I am going through enabling mTLS to my mesh, and came across this below command.
istioctl manifest apply --set profile=demo,values.global.mtls.enabled=true
I also found this below yaml file enable mTLS
apiVersion: "authentication.istio.io/v1alpha1"
kind: "MeshPolicy"
metadata:
name: "default"
spec:
peers:
- mtls: {}
What is the difference betwen command and yaml file? Are they both doing same thing?
Yes they do the same. Doing it via istioctl is imperative way versus doing it via yaml is declarative way.