The Simplest Way to Make Crossplane and Ubuntu Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams use Crossplane and Ubuntu together to build and manage cloud servers from Kubernetes. Crossplane runs inside your cluster and creates Ubuntu virtual machines through cloud APIs. This workflow lets engineers request Linux hosts using simple declarative files. The control plane reads those files and builds the right machine image. It also sets up network rules, disks, and startup scripts on each Ubuntu host. Teams do not need to click through cloud menus to launch new servers. Everything st

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

Teams use Crossplane and Ubuntu together to build and manage cloud servers from Kubernetes. Crossplane runs inside your cluster and creates Ubuntu virtual machines through cloud APIs.

This workflow lets engineers request Linux hosts using simple declarative files. The control plane reads those files and builds the right machine image. It also sets up network rules, disks, and startup scripts on each Ubuntu host. Teams do not need to click through cloud menus to launch new servers. Everything stays in version control, and the cluster keeps the hosts in sync.

How Crossplane and Ubuntu handle keys, roles, and data flow

Crossplane talks to your cloud provider using an identity role or API key. You store those cloud credentials inside the Kubernetes cluster as a secret. The provider pod reads that secret and sends requests to the cloud API. When a team asks for an Ubuntu server, the provider calls the compute API. The cloud API then boots a fresh virtual machine from an official Ubuntu image.

Data flows one way during the initial build phase. Crossplane sends machine size, disk layout, and startup scripts to the cloud API. The cloud platform passes that startup data into the Ubuntu boot process. The local cloud init tool on Ubuntu reads those instructions on first boot. It creates local Linux users, adds public SSH keys, and installs system packages.

After the server boots, the control plane checks the machine status on a timer. It reads the state of the Ubuntu instance from the cloud API. If someone changes a tag or security group outside the cluster, Crossplane fixes it. This loop keeps your live Linux fleet matching your desired state at all times.

Common failure modes and how to scope access

Many teams make the mistake of giving the Crossplane provider broad admin rights. A single shared service account often holds full power over the whole cloud account. If an attacker reads that cluster secret, they can delete every Ubuntu host. You should split provider roles by team or project instead. Give each provider role only the rights needed to manage specific server groups.

Static SSH keys inside startup scripts create another big risk for Linux fleets. Teams often paste the same admin public key into every Crossplane template. Soon, dozens of engineers share one root login across hundreds of Ubuntu servers. When someone leaves the team, rotating that shared key takes days of manual work. Nobody can tell which person ran a command when everyone shares the ubuntu user.

Crossplane Composition Security + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Network paths between the cluster and the new hosts also need tight rules. By default, templates might assign public IP addresses to new Ubuntu machines. That exposes SSH ports to the open web right after the server boots. You should place new Ubuntu nodes inside private subnets with strict firewall rules. Only allow traffic on the exact ports your app needs to run.

Managing day two operations on provisioned Linux hosts

Crossplane handles the cloud API layer well, but it stops at the virtual machine boundary. Once the Ubuntu OS boots, engineers still need to log in and fix app issues. They also need to check system logs, inspect running services, and query local databases. Standard Kubernetes tools do not track what happens inside the guest OS shell.

To keep day two work safe, remove static SSH keys from your machine templates. Tie Linux logins to your central identity provider so each engineer uses their own name. Also, keep clear logs of every command run on your Ubuntu fleet. If a script outputs sensitive data, mask fields like emails, phone numbers, or card numbers. Masking rewrites matched fields in results before they reach the screen or log file.

Govern statements and responses across databases and APIs

Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.

First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

Does Crossplane install an agent on the Ubuntu server?

No, Crossplane does not need an agent inside the Ubuntu operating system. It talks to your cloud API to build and watch the virtual machine from outside.

How do you update packages on Ubuntu hosts built by Crossplane?

You can pass startup scripts through Crossplane to update packages during the first boot. For ongoing patches, teams bake new machine images or run standard Linux management tools.

How should teams handle secrets that Ubuntu apps need at runtime?

Do not put plain text passwords inside your Crossplane templates or startup files. Give the Ubuntu machine a tight cloud identity role so it can fetch secrets itself.

The query runs. The emails stay hidden.