# Installing Ingress Gateways with Istio

1. Create a namespace for the gateway if one does not exist:

   <pre data-overflow="wrap"><code>kubectl create namespace &#x3C;GATEWAY_NAMESPACE>
   </code></pre>
2. Enable the namespace for injection:

   <pre data-overflow="wrap"><code>kubectl label namespace &#x3C;GATEWAY_NAMESPACE> istio.io/rev- istio-injection=enabled --overwrite
   </code></pre>
3. Copy the configuration files from `samples/gateways/istio-ingressgateway` from the `anthos-service-mesh` repository (<https://github.com/GoogleCloudPlatform/anthos-service-mesh-packages/tree/main/samples/gateways>).
4. Change your directory to the `samples` folder. To ensure you are in the correct directory, run the `ls` command to list the contents and confirm that the `gateways/istio-ingressgateway` directory exists.
5. Deploy the ingress gateway, which is located in `samples/gateways`:

   <pre data-overflow="wrap"><code>kubectl apply -n &#x3C;GATEWAY_NAMESPACE> -f samples/gateways/istio-ingressgateway
   </code></pre>
6. Verify that the services and pods have been deployed:

   <pre data-overflow="wrap"><code>kubectl get pod,service -n &#x3C;GATEWAY_NAMESPACE>
   </code></pre>
