> [!CAUTION]
> You are currently viewing version 1.11 of the Apigee hybrid documentation. **This version is end of life.** You should upgrade to a newer version. For more information, see [Supported versions](https://docs.cloud.google.com/apigee/docs/hybrid/supported-platforms.md.txt#supported-versions).

<button class="button button-with-icon cloud-select-dropdown__button button-primary" aria-haspopup="true">Version 1.11 </button>

- Supported versions:
- [v1.17 (latest)](https://docs.cloud.google.com/apigee/docs/hybrid/v1.17/helm-install-workload-identity.html)
- [v1.16](https://docs.cloud.google.com/apigee/docs/hybrid/v1.16/helm-install-workload-identity.html)
- [v1.15](https://docs.cloud.google.com/apigee/docs/hybrid/v1.15/helm-install-workload-identity.html)
- [v1.14](https://docs.cloud.google.com/apigee/docs/hybrid/v1.14/helm-install-workload-identity.html)
- [List of supported versions](https://docs.cloud.google.com/apigee/docs/hybrid/supported-platforms.md.txt#supported-versions)
- Unsupported versions:
- [v1.13](https://docs.cloud.google.com/apigee/docs/hybrid/v1.13/helm-install-workload-identity.html)
- [v1.12](https://docs.cloud.google.com/apigee/docs/hybrid/v1.12/helm-install-workload-identity.html)
- [v1.11](https://docs.cloud.google.com/apigee/docs/hybrid/v1.11/helm-install-workload-identity.md.txt)
- [v1.10](https://docs.cloud.google.com/apigee/docs/hybrid/v1.10/helm-install-workload-identity.html)
- [v1.9](https://docs.cloud.google.com/apigee/docs/hybrid/v1.9/helm-install-workload-identity.html)
- [v1.8](https://docs.cloud.google.com/apigee/docs/hybrid/v1.8/helm-install-workload-identity.html)
- [v1.7](https://docs.cloud.google.com/apigee/docs/hybrid/v1.7/helm-install-workload-identity.html)
- [v1.6](https://docs.cloud.google.com/apigee/docs/hybrid/v1.6/helm-install-workload-identity.html)
- [v1.5](https://docs.cloud.google.com/apigee/docs/hybrid/v1.5/helm-install-workload-identity.html)
- [v1.4](https://docs.cloud.google.com/apigee/docs/hybrid/v1.4/helm-install-workload-identity.html)
- [v1.3](https://docs.cloud.google.com/apigee/docs/hybrid/v1.3/helm-install-workload-identity.html)
- [v1.2](https://docs.cloud.google.com/apigee/docs/hybrid/v1.2/helm-install-workload-identity.html)
- [v1.1](https://docs.cloud.google.com/apigee/docs/hybrid/v1.1/helm-install-workload-identity.html)

## GKE with Workload Identity only: Configure Workload Identity

> [!NOTE]
> **Note:** Apigee hybrid v.1.11 only supports Workload Identity federation on GKE.


Follow these steps if you set up your overrides file for Workload Identity on GKE in
[Step 6: Create the overrides](https://docs.cloud.google.com/apigee/docs/hybrid/v1.11/helm-install-create-overrides.md.txt).

If you are not using Workload Identity on GKE, proceed to
[Part 3, Step 1: Expose Apigee ingress gateway](https://docs.cloud.google.com/apigee/docs/hybrid/v1.11/install-expose-apigee-ingress.md.txt).

### Google Cloud service accounts and Kubernetes service accounts

A Google Cloud service account is a special kind of account that can be used to make authorized
API calls by authenticating as the service account itself. Google Cloud service accounts can be
given roles and permissions similar to an individual user. When an application authenticates as a
service account, it has access to all resources that the service account has permission to access.
If you want to learn more about Google Cloud service accounts, see
[Service accounts overview](https://docs.cloud.google.com/iam/docs/service-account-overview.md.txt).


You created Google Cloud service accounts for your Apigee hybrid installation in
[Step 4: Create service accounts](https://docs.cloud.google.com/apigee/docs/hybrid/v1.11/helm-install-service-accounts.md.txt). Apigee uses these
service accounts to authenticate the hybrid components.

Kubernetes service accounts are similar to Google Cloud service accounts. A Kubernetes service
account provides an identity for processes that run in a Pod, and allows it to authenticate to the
API server similarly to a user. If you want to learn more about Kubernetes service accounts, see
[Configure
Service Accounts for Pods](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/).


If you have `gcp.workloadIdentity.enabled` set to `true` in your
overrides file, when Helm charts for each hybrid component will create the Kubernetes service
accounts for the components when you install or upgrade them like you did in
[Step 11: Install Apigee hybrid using Helm charts](https://docs.cloud.google.com/apigee/docs/hybrid/v1.11/helm-install-helm-charts.md.txt).


When you configure Workload Identity on GKE, you associate the Google Cloud service accounts with
the Kubernetes service accounts in the Kubernetes cluster. That way, the Kubernetes service
accounts can impersonate the Google Cloud service accounts and use their assigned roles and
permissions to authenticate with the hybrid components.


Follow these instructions to configure Workload Identity for your project.

> [!NOTE]
> **Note:** Workload Identity is only available for hybrid installations on GKE.

### Prepare to configure Workload Identity

1. Verify that Workload Identity is enabled in your overrides file. It should be enabled at the overrides file in the following properties.

   > [!NOTE]
   > **Note:** If you migrated your cluster from `apigeectl` management with the [Apigee hybrid Helm migration tool](https://docs.cloud.google.com/apigee/docs/hybrid/v1.11/helm-migration.md.txt), the overrides syntax for Workload Identity will have changed. You will need to check the following.

   - `namespace` is required. For example:

     ```
     instanceID: "hybrid-instance-1"
     namespace: "apigee"
     ```
   - The syntax to enable Workload Identity is different for Helm than for `apigeectl`. For Helm, `gcp.workloadIdentity.enabled` replaces `gcp.workloadIdentityEnabled`.
   - If you are using a single service account (Non-prod) for all components, specify it with: `gcp.workloadIdentity.gsa`. For example:

     ```
       gcp:
         workloadIdentity:
           enabled: true
           gsa: "apigee-non-prod@my-hybrid-project.iam.gserviceaccount.com"
       
     ```
   - If you are using a separate service account for each component (Prod installations), specify the service account with the component's `gsa` property. For example:

     ```
       logger:
         gsa: "apigee-logger@my-hybrid-project.iam.gserviceaccount.com"
       
     ```

   See:
   [`gcp.workloadIdentity.enabled`](https://docs.cloud.google.com/apigee/docs/hybrid/v1.11/config-prop-ref.md.txt#gcp-workloadidentity-enabled).
2. Check that the current `gcloud` configuration is set to your Google Cloud project ID with the following command:

   ```
   gcloud config get project
   ```
3. If needed, set the current `gcloud` configuration:

```
gcloud config set project $PROJECT_ID
```
4. Verify that Workload Identity is enabled for your GKE Cluster. When you created the cluster in [Step 1: Create a cluster](https://docs.cloud.google.com/apigee/docs/hybrid/v1.11/install-create-cluster.md.txt#gke), step 6 was to Enable Workload Identity. You can confirm if Workload Identity is enabled by running the following command:

   ### Regional clusters

   ```
   gcloud container clusters describe $CLUSTER_NAME \
     --region $CLUSTER_LOCATION \
     --project $PROJECT_ID \
     --flatten 'workloadIdentityConfig'
   ```

   ### Zonal clusters

   ```
   gcloud container clusters describe $CLUSTER_NAME \
     --zone $CLUSTER_LOCATION \
     --project $PROJECT_ID \
     --flatten 'workloadIdentityConfig'
   ```


   Your output should look like the following:

   ```
     ---
     workloadPool: PROJECT_ID.svc.id.goog
   ```


   If you see `null` instead in your results, run the following
   command to enable Workload Identity for your cluster:

   ### Regional clusters

   ```
   gcloud container clusters update $CLUSTER_NAME \
     --workload-pool=$PROJECT_ID.svc.id.goog \
     --project $PROJECT_ID \
     --region $CLUSTER_LOCATION
   ```

   ### Zonal clusters

   ```
   gcloud container clusters update  $CLUSTER_NAME \
     --workload-pool=$PROJECT_ID.svc.id.goog \
     --zone $CLUSTER_LOCATION \
     --project $PROJECT_ID
   ```
5. Enable Workload Identity for each node pool with the following commands. This operation can
   take up to 30 minutes for each node:

   ### Regional clusters

   ```
   gcloud container node-pools update NODE_POOL_NAME \
     --cluster=$CLUSTER_NAME \
     --region $CLUSTER_LOCATION \
     --project $PROJECT_ID \
     --workload-metadata=GKE_METADATA
   ```

   ### Zonal clusters

   ```
   gcloud container node-pools update NODE_POOL_NAME \
     --cluster=$CLUSTER_NAME \
     --zone $CLUSTER_LOCATION \
     --project $PROJECT_ID \
     --workload-metadata=GKE_METADATA
   ```

   Where <var translate="no">NODE_POOL_NAME</var> is the name of each node pool. In most Apigee hybrid
   installations, the two default node pools are named `apigee-data` and
   `apigee-runtime`.
6. Verify that Workload Identity is enabled on your node pools with the following commands:

   ### Regional clusters

   ```
   gcloud container node-pools describe apigee-data \
     --cluster $CLUSTER_NAME \
     --region $CLUSTER_LOCATION \
     --project $PROJECT_ID \
     --flatten "config:"
   ```

   ```
   gcloud container node-pools describe apigee-runtime \
     --cluster $CLUSTER_NAME \
     --region $CLUSTER_LOCATION \
     --project $PROJECT_ID \
     --flatten "config:"
   ```

   ### Zonal clusters

   ```
   gcloud container node-pools describe apigee-data \
     --cluster $CLUSTER_NAME \
     --zone $CLUSTER_LOCATION \
     --project $PROJECT_ID \
     --flatten "config:"
   ```

   ```
   gcloud container node-pools describe apigee-runtime \
     --cluster $CLUSTER_NAME \
     --zone $CLUSTER_LOCATION \
     --project $PROJECT_ID \
     --flatten "config:"
   ```

   Your output should look something like:

   ```
   ---
   diskSizeGb: 100
   diskType: pd-standard
   ...
   workloadMetadataConfig:
     mode: GKE_METADATA
       
   ```

### Configure Workload Identity

Use the following procedure to enable Workload Identity for the following Hybrid components:

- `apigee-datastore`
- `apigee-telemetry`
- `apigee-org`
- `apigee-env`

When you run the `helm upgrade` with the
`--dry-run` flag for the `apigee-datastore`, `apigee-env`,
`apigee-org`, and `apigee-telemetry` charts, the output will include the
commands you will need to configure Workload Identity with the correct GSA and KSA names.

For example:

```
helm upgrade datastore apigee-datastore/ \
  --namespace $NAMESPACE \
  -f overrides.yaml \
  --dry-run
```

```
NAME: datastore
  ...
For C* backup GKE Workload Identity, please make sure to add the below membership to the IAM policy binding using the respective kubernetes SA (KSA).
  gcloud iam service-accounts add-iam-policy-binding  \
        --role roles/iam.workloadIdentityUser \
        --member "serviceAccount:my-project.svc.id.goog[apigee/apigee-cassandra-backup-sa]" \
        --project :my-project
```

1. Get the command to set up Workload Identity for `apigee-datastore` and run the command under `NOTES:` in the output.

   ```
   helm upgrade datastore apigee-datastore/ \
     --namespace $NAMESPACE \
     -f overrides.yaml \
     --dry-run
   ```
2. Get the commands to set up Workload Identity for `apigee-telemetry` and run the command under `NOTES:` in the output.

   ```
   helm upgrade telemetry apigee-telemetry/ \
     --namespace $NAMESPACE \
     -f overrides.yaml \
     --dry-run
   ```
3. Get the commands to set up Workload Identity for `apigee-org` and run the command under `NOTES:` in the output.

   ```
   helm upgrade $ORG_NAME apigee-org/ \
     --namespace $NAMESPACE \
     -f overrides.yaml \
     --dry-run
   ```
4. Get the commands to set up Workload Identity for `apigee-env` and run the command under `NOTES:` in the output.

   ```
   helm upgrade $ENV_NAME apigee-env/ \
     --namespace $NAMESPACE \
     --set env=ENV_NAME \
     -f overrides.yaml \
     --dry-run
   ```

   Repeat this step for each environment in your installation.
5. (Optional) You can see the status of your Kubernetes service accounts in the **Kubernetes:
   Workloads Overview** page in the Google Cloud console.

   [Go to Workloads](https://console.cloud.google.com/kubernetes/workload/overview)

   > [!NOTE]
   > **Note:** You may see an error status for the `apigee-cassandra-backup` and `apigee-cassandra-restore` service accounts. This is because you are not currently running backup or restore, and these processes have not been fully configured yet. For more information on Cassandra backup and restore, see [feedbackCassandra backup overview](https://docs.cloud.google.com/apigee/docs/hybrid/v1.11/cassandra-backup-overview.md.txt).

## Next steps

In the next
step, you will configure the Apigee ingress gateway and deploy a proxy to test your installation.
[(NEXT) Step 1: Expose Apigee ingress](https://docs.cloud.google.com/apigee/docs/hybrid/v1.11/install-expose-apigee-ingress.md.txt) [2](https://docs.cloud.google.com/apigee/docs/hybrid/v1.11/install-deploy-proxy.md.txt)

<br />