What you will have at the end
An Environment named Sandbox that manages one gateway cluster: its Admin API address and admin key, stored sealed and never shown again; the address your API consumers call; a Prometheus for Analytics. Before you save, the connection test tells you in one sentence what is wrong when something is, and this article shows five of its answers: a rejected key, a closed port, a host that does not resolve, a timeout and a certificate the console does not trust. The creation is a record in the platform audit log, and the Environment is marked protected, which is what keeps a tired hand from deleting it.
Prerequisites
- A running gateway cluster and its Admin API: the address and the admin key its configuration carries. The cluster of this article is a fresh one with no Routes, reachable from the console at
127.0.0.1:9380, with its data plane at127.0.0.1:9381. - Optional: a Prometheus that scrapes the cluster, here at
127.0.0.1:9092, and an Elasticsearch or OpenSearch for request records. The log store is left out here; the Traffic Explorer article of this series connects one. - A role that may manage Environments. The screenshots below were taken as
nora.beckeron the lab install, which already manages Staging and Production; on your install the list holds the Environment of the first article.
Adding an Environment does not touch the engine: the list page says so, and it is worth repeating. G8 manages what is already running.
The form
Open Environments in the platform navigation and select Add environment. Under General, Name Sandbox and Slug sandbox: three to thirty-two lowercase letters, digits and hyphens, part of every address and of every record name, and it cannot change once created. Under Engine:
- Admin API URL:
http://127.0.0.1:9380, where G8 reads and writes the gateway. - Admin key: sent as
X-API-KEY, stored sealed, not shown again after you save. The eye icon shows it only while you type. - Gateway URL:
http://127.0.0.1:9381, the address API consumers call. It is shown on every Route and checked by the connection test. - CA certificates: a PEM bundle, used for every HTTPS connection of this Environment, the Admin API, the gateway, the log store and Prometheus. Empty here, because the lab cluster speaks plain HTTP.
What the connection test says
The Test connection button under the Engine section tests the values as typed, before anything is saved. Each answer is one sentence a person can act on, with the raw reason under it.
A key that is not the cluster’s:

A port where nothing listens, http://127.0.0.1:9385, is answered with Connection refused at 127.0.0.1:9385. and the dial error under it. A host name that does not exist, engine.sandbox.invalid, is answered with Host engine.sandbox.invalid could not be resolved. An address that swallows packets, 10.255.255.1:

And an HTTPS address whose certificate was signed by a CA the console does not hold, a small server on 127.0.0.1:9449 set up for the measurement:

With the right address and key, and the Gateway URL filled in:

The version matters: a cluster on another version is still managed, and the console marks it Unverified wherever the engine is shown, so a reader of the Environments list knows the forms were drawn for a different version.
Observability, optional
Under Observability, the log store and Prometheus each have their own Test connection. The article fills Prometheus URL with http://127.0.0.1:9092:

The note under the fields is the naming rule of the product: the request records of this Environment will live in indices named g8-sandbox-access-*, and its metrics under the label g8_environment="sandbox". Both follow the slug and are not edited anywhere.
Save
The Changes panel on the right shows what the form sends, with the key masked:

Select Create environment. The list shows the new row with its engine status from the same probe as the Overview card, and a banner that says who can open it: users with a role in all Environments can, everyone else needs a role in Sandbox.

What the audit log keeps
The creation is an environment.created record in the Platform audit log: who, when, from which address, and under Details what was set, as booleans. The key is not in it.

The connection tests before the save are records too, environment.tested, one for each click on Test connection: two clicks on Staging’s form, one for the log store and one for Prometheus, left two Connection test rows a few seconds apart.
Mark it protected
Open the row’s menu, Edit, and switch Protected on under Protection; the help says what changes: destructive actions in this Environment ask for the resource name before they run, and nothing else. Save. The row carries a Protected pill, and the menu shows the second effect, which the help does not mention:

Every change here is a record: environment.protected_changed, and a delete, once unprotected, is environment.deleted.
What to do next
- Put the first Route on the cluster, with a key and a limit: Your first Route.
- See what each part of an installation is and which systems are optional: What G8 installs and what you provide.
- What an Environment connects to, with the supported versions: Deployment; Environments in the console: API Gateway.