Mysql NETPOLICY LAB
All files are in my github repo, so clone it:
Create an interactive shell using mysql image and acces mysql-server:
Run a pod without a label:
kubectl run --stdin --tty --image=mysql:latest mysqlclient-notpermitted -- bash
kubectl exec -it mysqlclient-notpermitted -- /bin/bash
It will timeout
Now i will add a label that matches the network policy
kubectl label pods mysqlclient-notpermitted purpose=mysqlclient
Now if you try again and access mysql within the pod it will access it successefully