kind create cluster --name shadow-deploy
echo $(kubectl get svc istio-ingressgateway --namespace istio-system --output 'jsonpath={.spec.ports[?(@.port==80)].nodePort}')
k port-forward svc/istio-ingressgateway -n istio-system <NODE_PORT>:80
curl -H "Host: hello.test.example.com" http://127.0.0.1:<NODE_PORT>
kubectl get ksvc -n namespace
export V1_POD=$(kubectl get pod -n test -l app=sd-example,version=v1 -o jsonpath={.items..metadata.name})
export V2_POD=$(kubectl get pod -n test -l app=sd-example,version=v2 -o jsonpath={.items..metadata.name})
export SLEEP_POD=$(kubectl get pod -n test -l app=sleep -o jsonpath={.items..metadata.name})
kubectl exec -n test "${SLEEP_POD}" -c sleep -- curl -sS http://sd-example:8000/
kubectl logs -n test -f $V1_POD -c sd-example --tail=0
kubectl logs -n test -f $V2_POD -c sd-example --tail=0
make install-knative
kubectl apply -f apps/api/kube/knative/kservice.yaml
mostrar a aplicação escalar para 0 e o warm up
alterar as variaveis de ambiente do ksvc e aplicar de novo
make port-forward-istio-gateway
make knative-request
make deploy-application
- Run
make request
a few times make shadow-traffic
- Open 3 terminals in the first run
make log-app-1
, in the secondmake log-app-2
, finally, in the thirdmake request