kind create cluster --name poc --config cluster.yaml
kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"
kubectl label nodes poc-worker node-role.kubernetes.io/worker=
kubectl label nodes poc-worker2 node-role.kubernetes.io/worker2=
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
# deploy metrics server
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
# run the below to skip verifying CA of serving certificates
kubectl -n kube-system patch deploy metrics-server --type json -p='[{"op": "add", "path": "/spec/template/spec/containers/0/args", "value": [
"--cert-dir=/tmp",
"--secure-port=4443",
"--kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname",
"--kubelet-use-node-status-port",
"--metric-resolution=15s",
"--kubelet-insecure-tls"
]}]'
kubectl apply -f resources/frontend-svc-po.yaml
kubectl apply -f resources/backend-svc-po.yaml
kubectl -n default exec frontend -- curl --trace - --trace-time backend
kubectl -n default exec backend -- curl --trace - --trace-time frontend
kubectl apply -f policies/ns-default-deny.yaml
kubectl apply -f policies/po-frontend-egr-ing.yam