Skip to content

Latest commit

 

History

History
48 lines (39 loc) · 1.04 KB

File metadata and controls

48 lines (39 loc) · 1.04 KB

Task 09: ServiceEntry for External Services

Step 1: Switch to Correct Context

kubectl config use-context cluster3-admin@cluster3

Step 2: Create ServiceEntry

kubectl apply -f - <<EOF
apiVersion: networking.istio.io/v1
kind: ServiceEntry
metadata:
  name: bronze-egress
  namespace: bronze
spec:
  hosts:
  - echo.free.beeceptor.com
  ports:
  - number: 80
    name: http
    protocol: HTTP
  - number: 443
    name: https
    protocol: HTTPS
  resolution: DNS
  location: MESH_EXTERNAL
EOF

Step 3: Verify Configuration

# Check ServiceEntry exists
kubectl get serviceentry -n bronze -o yaml

Testing

# Use sleep-bronze pod
kubectl exec -it sleep-bronze -n bronze -- curl -IL http://echo.free.beeceptor.com

kubectl logs sleep-bronze -n bronze -c istio-proxy
# Expected output: [2025-11-03T18:08:24.460Z] "- - -" 0 - - - "-" 1877 3890 835 - "-" "-" "-" "-" "147.182.252.2:443" outbound|443||echo.free.beeceptor.com 10.0.156.101:58212 147.182.252.2:443 10.0.156.101:58202 echo.free.beeceptor.com -