Install Apollo GraphOS Operator

Install the operator in your Kubernetes cluster


In this guide, you will:

  • Create an Operator API key in GraphOS

  • Store the API key in your cluster

  • Install the operator using Helm

You will need:

  • A Kubernetes cluster with permissions to install resources

  • kubectl configured to access your cluster

  • Helm installed

  • An Apollo GraphOS account (Developer, Standard, or Enterprise plan)

1. Create an Operator API key

The Operator needs an Operator API key to publish subgraph changes and fetch supergraph schemas.

To create it, you will need to have the Rover CLI version 0.36.0 or newer installed and configured locally.

First, find your organization ID.

  1. Navigate to https://studio.apollographql.com/ and log in.

  2. Make sure you select the correct Apollo organization in the top left corner.

  3. Click on the Organization tab.

  4. Find your Organization ID and copy the value.

Next, create the Operator API key using the following command, replacing <ORGANIZATION_ID> with your organization ID and <KEY_NAME> with a name for the key:

Bash
1rover api-key create <ORGANIZATION_ID> operator <KEY_NAME>

Copy the API key provided when the command finishes—you use it in the next step.

2. Store the API key in your cluster

Open a terminal and run the following command to store the secret in your cluster.

Replace <YOUR_OPERATOR_API_KEY> with the value you copied in the previous step.

sh
APOLLO_KEY=<YOUR_OPERATOR_API_KEY>
kubectl create secret generic apollo-api-key --from-literal="APOLLO_KEY=$APOLLO_KEY"

3. Create the Apollo GraphOS Operator Helm values file

In your IDE, create a new file named values.yaml and add the following:

YAML
values.yaml
1apiKey:
2  secretName: apollo-api-key

Alternatively, you can point to a file containing the API key using apiKey.keyPath. This is useful if you cannot use Kubernetes secrets, similar to the APOLLO_KEY_PATH environment variable in the GraphOS Router.

YAML
values.yaml
1apiKey:
2  keyPath: /path/to/api-key.txt

4. Install the operator

Run the following command to install the Apollo GraphOS Operator in your cluster. You should run it in the same folder as the values.yaml file you've created previously.

Text
1helm upgrade --install --atomic apollo-operator oci://registry-1.docker.io/apollograph/operator-chart -f values.yaml

You should now have the Apollo GraphOS Operator running in your cluster!

Next steps

Now that you have the Operator installed, you can continue with adding subgraphs to your cluster.

Feedback