> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/self-managed-enterprise-edition/use-self-managed-enterprise-edition/cloud-providers/install-in-gcp.md).

# Install in Google Kubernetes Engine (GKE)

This topic explains how to use Helm to install the Harness Self-Managed Enterprise Edition in Google Cloud Platform (GCP).

For Helm installation instructions, go to [Helm installation](/self-managed-enterprise-edition/use-self-managed-enterprise-edition/smp-installationupgrade/helm-installation/install-using-helm.md) or the Harness Helm chart [readme](https://github.com/harness/helm-charts/tree/main?tab=readme-ov-file#harness-helm-charts).

#### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

This topic assumes you have experience with GCP, such as setting up projects, namespaces, and clusters.

In addition to a Harness account, you need the following:

* Access to Helm charts
* An external static IP address

{% tabs %}
{% tab title="GCP" %}
To install in GCP manually, you first reserve your static IP, then install Harness Self-Managed Enterprise Edition.

#### Reserve an external static IP <a href="#reserve-an-external-static-ip" id="reserve-an-external-static-ip"></a>

To reserve an external static IP in GCP, do the following:

1. Go to your GCP project.
2. Select **VPC network**. The VPC networks page opens.
3. In the left nav, select **IP addresses**. The IP addresses page opens.
4. Select **Reserve External Static IP Address**, then select the following.
   1. **Network Service Tier:** Premium.
   2. **IP Version:** IPv4.
   3. **Type:** Regional.

      <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Make sure the IP address is in the same region as your cluster. Make a note of or copy the IP address. You'll need it later in the installation process.</p></div>
5. Select **Reserve**.

#### Install Harness Self-Managed Enterprise Edition in GCP <a href="#install-harness-self-managed-enterprise-edition-in-gcp" id="install-harness-self-managed-enterprise-edition-in-gcp"></a>

1. Create a new cluster or use an existing one.
2. Create a new namespace:
   1. Set your Kubernetes context to the GCP project you are using.
   2. Run the following

      ```
      kubectl create ns <namespace name>
      ```
3. Download the latest charts from the Harness Helm chart [repo](https://github.com/harness/helm-charts/releases).

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Charts are located under <strong>Assets</strong>. The file name looks like <code>harness-0.15.0.tgz</code>.</p></div>
4. Extract the `*.tgz` file.
5. Open the `override-demo.yaml` file in a file editor.
6. Add your external static IP address in the following fields.

   ```yaml
   loadbalancerURL: http://xx.xx.xx.xx
   ```

   ```yaml
   loadBalancerIP: xx.xx.xx.xx
   ```
7. Set the following fields.

   ```yaml
   loadbalancerURL: http://xx.xx.xx.xx
     ingress:
       # --- Enable Nginx ingress controller gateway
       enabled: true
       annotations: {}
       loadBalancerIP: xx.xx.xx.xx
       className: "harness"
       loadBalancerEnabled: true
       useSelfSignedCert: false
       ingressGatewayServiceUrl: ''
       hosts:
         - ""
   ```
8. Search for "nginx:", and set `create:` to `true`.

   ```yaml
    nginx:
      create: true
   ```
9. Search for "defaultbackend:", and set `create:` to `true`.

   ```yaml
    defaultbackend:
      create: true
   ```
10. Save the file and exit.
11. Run the following from your terminal.

    ```
    helm install <YOUR_RELEASE_NAME> <path to Harness directory> -n <YOUR_NAMESPACE_NAME> -f override.demo.yaml
    ```

    for example:

    ```
    helm install test-release harness/ -n smp-test -f harness/override-demo.yaml
    ```
12. After the installation is complete, paste the `loadbalancerURL` in your browser's address bar, and then sign in to the Harness UI.
13. Complete to the post-install next steps.
    {% endtab %}

{% tab title="GKE with gcloud CLI" %}
To install in GKE using the gcloud CLI, you first create your test cluster, then install Harness Self-Managed Enterprise Edition.

#### Create a test cluster <a href="#create-a-test-cluster" id="create-a-test-cluster"></a>

To create your test cluster in GKE using the gcloud CLI, do the following:

1. Configure the gcloud CLI with your Google Cloud account.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>These can also be run in the Google Cloud Shell. For more information, go to <a href="https://cloud.google.com/shell">Google Cloud Shell</a>.</p></div>
2. Run the following GKE cluster configuration, modifying the `< >` enclosed values with those from your own environment.

   ```
   gcloud beta container --project <gcp_project> clusters create "<cluster_name>" --no-enable-basic-auth --cluster-version "1.27.8-gke.1067004" --release-channel "regular" --machine-type "e2-standard-8" --image-type "COS_CONTAINERD" --disk-type "pd-balanced" --disk-size "100" --metadata disable-legacy-endpoints=true --scopes "https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write","https://www.googleapis.com/auth/monitoring","https://www.googleapis.com/auth/servicecontrol","https://www.googleapis.com/auth/service.management.readonly","https://www.googleapis.com/auth/trace.append" --num-nodes "7" --logging=SYSTEM,WORKLOAD --monitoring=SYSTEM --enable-ip-alias --network "projects/<gcp_project>/global/networks/default" --subnetwork "projects/<gcp_project>/regions/us-central1/subnetworks/default" --no-enable-intra-node-visibility --default-max-pods-per-node "110" --security-posture=standard --workload-vulnerability-scanning=disabled --no-enable-master-authorized-networks --addons HorizontalPodAutoscaling,HttpLoadBalancing,GcePersistentDiskCsiDriver --enable-autoupgrade --enable-autorepair --max-surge-upgrade 1 --max-unavailable-upgrade 0 --binauthz-evaluation-mode=DISABLED --enable-managed-prometheus --enable-shielded-nodes --node-locations "<zone, example: us-central1-c>" --zone <zone, example: us-central1-c>
   ```
3. Create a Static IP in the same zone as your GKE cluster.

   ```
   gcloud compute addresses create smp-test-ip --project=<gcp_project> --region=<example: us-central1>
   ```
4. Retrieve and note your IP address.

   ```
   gcloud compute addresses describe smp-test-ip --region <region>
   ```
5. Get a Kubernetes config for your new cluster.

   ```
   gcloud container clusters get-credentials smp-cluster --zone <zone, example: us-central1-c> --project <gcp_project>
   ```

#### Install Harness Self-Managed Enterprise Edition in GKE <a href="#install-harness-self-managed-enterprise-edition-in-gke" id="install-harness-self-managed-enterprise-edition-in-gke"></a>

1. Create a namespace for your deployment.

   ```
   kubectl create namespace harness
   ```

2. Retrieve and extract the latest [Harness Helm charts](https://github.com/harness/helm-charts/releases). The harness charts will look like `harness-<version_number>`.

3. Open the `harness/override-demo.yaml` file in any editor, and modify the following values.

   | Key                                                       | Value                         |
   | --------------------------------------------------------- | ----------------------------- |
   | `global.ingress.enabled`                                  | `true`                        |
   | `global.loadbalancerURL`                                  | `"https://<YOUR_IP_ADDRESS>"` |
   | `global.ingress.hosts`                                    | `""`                          |
   | `global.ingress.loadBalancerIP`                           | `<YOUR_IP_ADDRESS>`           |
   | `global.ingress.loadBalancerEnabled`                      | `true`                        |
   | `platform.bootstrap.networking.defaultbackend.create`     | `true`                        |
   | `platform.bootstrap.networking.nginx.create`              | `true`                        |
   | `platform.bootstrap.networking.nginx.loadBalancerEnabled` | `true`                        |
   | `platform.bootstrap.networking.nginx.loadBalancerIP`      | `<YOUR_IP_ADDRESS>`           |

4. Install the Helm chart.

   ```
    helm install harness harness/ -f override-demo.yaml -n harness
   ```

5. Navigate to the sign up UI at `https://<YOUR_IP_ADDRESS>/auth/#/signup` to create your admin user.

6. Complete to the post-install next steps.
   {% endtab %}
   {% endtabs %}

7. Deploy the Harness modules you want to use. For more information, go to [Deploy Harness modules](/self-managed-enterprise-edition/use-self-managed-enterprise-edition/smp-installationupgrade/helm-installation/install-using-helm.md#deploy-harness-modules).

8. Add your Harness license. For more information, go to [Add a Harness license](/self-managed-enterprise-edition/use-self-managed-enterprise-edition/smp-installationupgrade/helm-installation/install-using-helm.md#add-a-harness-license).

9. Configure SMTP to allow for additional user invitations. For more information, go to [Add SMTP configuration](https://developer.harness.io/docs/platform/notifications/add-smtp-configuration/).
