Kalyan Kumar
Kalyan Kumar

Reputation: 407

Why there are two different ways to enable mTLS in istio?

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?

Upvotes: 1

Views: 269

Answers (1)

Arghya Sadhu
Arghya Sadhu

Reputation: 44579

Yes they do the same. Doing it via istioctl is imperative way versus doing it via yaml is declarative way.

Upvotes: 2

Related Questions