Skip to main content
Connect a Google Cloud project and the observer maps what’s in it, then watches its metrics and logs. It reads through the Google Cloud APIs, so you run one observer for the project. You pick where it runs. Either way, the observer is a Docker container.
  • On this machine. It runs as a container named rk-observer on a Linux host you already have, and reads with the Google Cloud credentials on that host.
  • A new Compute Engine instance. The installer creates an e2-micro instance, a service account and the network it needs.

Install

In the console, open Environments, click Connect and pick Google Cloud. Copy the key from step 2 of the dialog. Then follow one path.
You need a Linux host with outbound access to api.rubixkube.ai:443, nats.rubixkube.ai:4222, ghcr.io:443 and the Google APIs. The installer installs Docker if it’s missing, on systems with apt-get, dnf or yum.This path doesn’t create a service account or enable any APIs. Enable the APIs under Permissions, and give the credentials the roles listed there.
1

Sign in as root

The installer runs as root and mounts root’s ~/.config/gcloud into the container.
2

Run the installer as root

The dialog shows the command without sudo. Add it unless you’re already root.
3

Answer the questions

Paste your RubixKube key, then:
4

Check the container

When the observer reports in, the dialog says the project is connected. Add an environment label, then click Open it.

What the observer watches

It refreshes the inventory every 10 minutes, metrics every 2 minutes and logs every 5 minutes.

Permissions

The observer needs these roles on the project. A new instance gets them on its service account:
  • roles/compute.viewer
  • roles/monitoring.viewer
  • roles/logging.viewer
  • roles/cloudsql.viewer
  • roles/run.viewer
  • roles/cloudfunctions.viewer
  • roles/container.viewer
  • roles/pubsub.viewer
  • RKObserverStorageViewer, a custom role with storage.buckets.get and storage.buckets.list
roles/logging.viewer lets it read log contents, so check that fits your rules. These are the APIs the new-instance path enables. Run this yourself if you install on your own machine:

More than one project

Connect each project as its own source. Rubix can read across all of them, and you can put them under one environment label.

Troubleshooting

Check the API key in /etc/rk-observer/observer.env, and that outbound api.rubixkube.ai:443 and nats.rubixkube.ai:4222 are open.
It found nothing at ~/.config/gcloud, so the container has nothing to sign in with. Run sudo gcloud auth application-default login, then run the installer again.
The host can’t reach ghcr.io. The image is ghcr.io/rubixkube-io/observer-agent:gcp-latest. Allow outbound HTTPS to ghcr.io and run the installer again.
Check what the service account has:
Add anything missing from Permissions.

Uninstall

Run the installer with --uninstall, so it doesn’t ask for a key. Which steps you follow depends on where the observer runs. On this machine:
Pick 1) This machine (local install), then 2) GCP / Azure (Docker). It removes the container and /etc/rk-observer. On a new Compute Engine instance:
Pick 3) GCP Compute Engine instance + IAM + network resources, enter the project and region, then choose the instances.
This permanently deletes the instances you pick, after you type yes. If you pick every instance, it also deletes the firewall rules, Cloud NAT, Cloud Router, the role bindings, the service account and the custom role. If you pick only some instances, those stay.
Then delete the source in the console.

Environments

The source page, labels and links.

Kubernetes

See inside your GKE clusters.

Observers

What an observer does and where it runs.

Your first incident

Follow an incident from start to finish.