From 076a88117a7cd326043252382c0db592539b55f6 Mon Sep 17 00:00:00 2001 From: Patryk Strugacz Date: Wed, 22 Jan 2025 13:01:34 +0100 Subject: [PATCH 1/5] Tutorial for Egress --- .../01-50-send-requests-using-egress.md | 204 ++++++++++++++++++ 1 file changed, 204 insertions(+) create mode 100644 docs/user/tutorials/01-50-send-requests-using-egress.md diff --git a/docs/user/tutorials/01-50-send-requests-using-egress.md b/docs/user/tutorials/01-50-send-requests-using-egress.md new file mode 100644 index 000000000..d610b3ba1 --- /dev/null +++ b/docs/user/tutorials/01-50-send-requests-using-egress.md @@ -0,0 +1,204 @@ +# Send requests using Istio Egress + +## Prerequisites + +* You have the Istio module added. +* To use CLI instruction, you must install [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) + and [curl](https://curl.se/). Alternatively, you can use Kyma dashboard. + +### Configuration + +1. Export the following values as environment variables: + + ```bash + export NAMESPACE={service-namespace} + ``` + +2. Create a new namespace for the sample application. + ```bash + kubectl create ns $NAMESPACE + kubectl label namespace $NAMESPACE istio-injection=enabled --overwrite + ``` + +3. Enable additional sidecar logs to see egresGateway being used in requests: + ```bash + kubectl apply -f - < Date: Thu, 23 Jan 2025 14:57:49 +0100 Subject: [PATCH 2/5] CR, fix typo --- .../01-50-send-requests-using-egress.md | 162 +++++++++--------- 1 file changed, 81 insertions(+), 81 deletions(-) diff --git a/docs/user/tutorials/01-50-send-requests-using-egress.md b/docs/user/tutorials/01-50-send-requests-using-egress.md index d610b3ba1..9384ae405 100644 --- a/docs/user/tutorials/01-50-send-requests-using-egress.md +++ b/docs/user/tutorials/01-50-send-requests-using-egress.md @@ -4,7 +4,7 @@ * You have the Istio module added. * To use CLI instruction, you must install [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) - and [curl](https://curl.se/). Alternatively, you can use Kyma dashboard. + and [curl](https://curl.se/). ### Configuration @@ -20,7 +20,7 @@ kubectl label namespace $NAMESPACE istio-injection=enabled --overwrite ``` -3. Enable additional sidecar logs to see egresGateway being used in requests: +3. Enable additional sidecar logs to see egressGateway being used in requests: ```bash kubectl apply -f - < Date: Fri, 24 Jan 2025 08:34:44 +0100 Subject: [PATCH 3/5] Add more steps, better descriptions, remove request --- .../01-50-send-requests-using-egress.md | 49 ++++++++++++++----- 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/docs/user/tutorials/01-50-send-requests-using-egress.md b/docs/user/tutorials/01-50-send-requests-using-egress.md index 9384ae405..27dd5d97b 100644 --- a/docs/user/tutorials/01-50-send-requests-using-egress.md +++ b/docs/user/tutorials/01-50-send-requests-using-egress.md @@ -2,7 +2,7 @@ ## Prerequisites -* You have the Istio module added. +* Istio module with egress enabled. * To use CLI instruction, you must install [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) and [curl](https://curl.se/). @@ -20,7 +20,24 @@ kubectl label namespace $NAMESPACE istio-injection=enabled --overwrite ``` -3. Enable additional sidecar logs to see egressGateway being used in requests: +3. Make sure there is an Istio CR with egress enabled: + ```bash + kubectl apply -f - < Date: Mon, 27 Jan 2025 10:34:18 +0100 Subject: [PATCH 4/5] Apply suggestions from code review Co-authored-by: Natalia Sitko <80401180+nataliasitko@users.noreply.github.com> --- .../01-50-send-requests-using-egress.md | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/docs/user/tutorials/01-50-send-requests-using-egress.md b/docs/user/tutorials/01-50-send-requests-using-egress.md index 27dd5d97b..618682c5c 100644 --- a/docs/user/tutorials/01-50-send-requests-using-egress.md +++ b/docs/user/tutorials/01-50-send-requests-using-egress.md @@ -1,26 +1,27 @@ -# Send requests using Istio Egress +# Send Requests Using Istio Egress Gateway +Learn how to configure and use the Istio egress Gateway to allow outbound traffic from your Kyma runtime cluster to specific external destinations. Test your configuration by sending an HTTPS request to an external website using a sample Deployment. ## Prerequisites -* Istio module with egress enabled. +* You have the Istio module added. * To use CLI instruction, you must install [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) and [curl](https://curl.se/). -### Configuration +## Steps -1. Export the following values as environment variables: +1. Export the following value as an environment variable: ```bash export NAMESPACE={service-namespace} ``` -2. Create a new namespace for the sample application. +2. Create a new namespace for the sample application: ```bash kubectl create ns $NAMESPACE kubectl label namespace $NAMESPACE istio-injection=enabled --overwrite ``` -3. Make sure there is an Istio CR with egress enabled: +3. Enable the egress Gateway in the Istio custom resource: ```bash kubectl apply -f - < Date: Mon, 27 Jan 2025 11:00:47 +0100 Subject: [PATCH 5/5] ServiceEntry fix --- docs/user/tutorials/01-50-send-requests-using-egress.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user/tutorials/01-50-send-requests-using-egress.md b/docs/user/tutorials/01-50-send-requests-using-egress.md index 618682c5c..a03f4837a 100644 --- a/docs/user/tutorials/01-50-send-requests-using-egress.md +++ b/docs/user/tutorials/01-50-send-requests-using-egress.md @@ -115,7 +115,7 @@ Learn how to configure and use the Istio egress Gateway to allow outbound traffi export SOURCE_POD=$(kubectl get pod -n "$NAMESPACE" -l app=curl -o jsonpath={.items..metadata.name}) ``` -6. Define a ServiceEntry to allow outbound traffic to the `kyma-project` domain and perform DNS resolution: +6. Define a ServiceEntry which adds the `kyma-project.io` hostname to the mesh: ```bash kubectl apply -f - <