โ Requests Fail Immediately After activate-zta
or deactivate-zta
¶
๐งญ Context¶
This issue arises when quickly testing service-to-service communication right after toggling Zero Trust settings via:
- Tool used:
curl
from inside a pod - Environment: Kind cluster (
task dev
) - Trigger: Immediate request to
zta-demo-app-service
after ZTA config change
๐งจ Symptoms¶
- Unexpected failures such as:
or
-
Pods appear stuck in pending or restarting state temporarily
-
Some requests work after retrying a few seconds later
๐ Possible Causes¶
-
Helm applies new Istio configs (authn/authz/gateway), which trigger:
-
Pod restarts due to sidecar injection updates
- Configuration propagation delays across Istio components
- Load balancer or DNS cache may reference stale pod/service states
โ Resolution (If Available)¶
โ
Wait a few seconds (5โ10s) after running task activate-zta
or task deactivate-zta
before testing with curl
.
โ Confirm pod readiness:
โ
Use kubectl wait
(already part of Taskfile
) to verify rollout:
๐งช Workarounds (Optional)¶
- Add a delay manually before curl tests:
- Add log checks to validate policy syncing before proceeding with testing
๐ External References¶
๐ง Notes¶
- This behavior is transient but can confuse first-time testers
- Consider adding a note to
task activate-zta
andtask deactivate-zta
output reminding the user to wait - Can also add a
post-deploy
validation or status check task in future versions