Skip to content

Files

Latest commit

 

History

History

aks_osm_smi_traffic_access_control

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Disable Permissive Traffic Policy Mode

kubectl patch meshconfig osm-mesh-config -n kube-system -p '{"spec":{"traffic":{"enablePermissiveTrafficPolicyMode":false}}}' --type=merge

Check Permissive Traffic Policy Mode

kubectl get meshconfig osm-mesh-config -n kube-system -o yaml | grep -i enablePermissiveTrafficPolicyMode

Deploy the sample microservices

kubectl apply -f nginx.yaml
kubectl apply -f busybox.yaml

Test Connectivity

Run:

kubectl exec -it busybox -c busybox -- sh

once inside the container, run the following command to test connectivity:

wget -O- http://nginx

The result should be similar to the following:

Connecting to nginx (10.0.149.72:80)
wget: error getting response: Resource temporarily unavailable

Add traffic access control to the sample microservices

kubectl apply -f nginx_traffic_target.yaml

Recheck Connectivity

Run:

kubectl exec -it busybox -c busybox -- sh

and once inside the container, run the following command to test connectivity:

wget -O- http://nginx