cheat-sheets

Civo

Homepage: Civo Documentation: Civo Docs Terraform Registry: Terraform Registry (see Terraform)

Civo’s product line and regions change over time. Check the docs for what is currently offered before relying on any size, image or region below. Commands here were written from knowledge and not run against a live account.


Civo CLI #

Civo CLI is a tool to manage your Civo account from the terminal. It is built with Go and distributed as binaries for multiple operating systems, available at https://github.com/civo/cli/releases (or brew install civo on macOS, see Homebrew).

Authentication #

You authenticate to the Civo API with an API key. Find or regenerate it in the Civo dashboard under your account security settings.

COMMANDDESCRIPTION
civo apikey add <NAME> <KEY>Save an API key
civo apikey listList saved keys
civo apikey current <NAME>Choose the active key
civo region lsList regions
civo region current <REGION>Choose the active region

Kubernetes #

Civo’s Kubernetes is based on K3s.

COMMANDDESCRIPTION
civo kubernetes sizeList node sizes
civo kubernetes create <NAME> --size <SIZE> --nodes 3 --waitCreate a cluster
civo kubernetes create <NAME> --nodes 3 --wait --save --merge --switchCreate and add it to ~/.kube/config and switch context
civo kubernetes listList clusters
civo kubernetes config <NAME> --save --mergeFetch the kubeconfig and merge it (see Kubectl)
civo kubernetes scale <NAME> --nodes 5Change the node count
civo kubernetes remove <NAME>Delete a cluster

Instances #

Create an instance with civo instance create and a hostname, plus any options.

Example:

bash
civo instance create --hostname=<your-hostname> --sshkey=<your-ssh-key-name> --initialuser=<user> --size=<size-from-civo-instance-size> --diskimage=<id-from-civo-diskimage-ls>

Common parameters:

PARAMETERDESCRIPTION
--diskimageDisk image (from civo diskimage ls)
--firewallFirewall name or ID
--hostnameHostname
--initialuserInitial user
--networkNetwork name or ID
--publicipnone or create (default create)
--sizeSize (from civo instance size)
--sshkeySSH key name or ID
--tagsTags
--waitWait until the instance is ready
COMMANDDESCRIPTION
civo instance sizeList instance sizes
civo diskimage lsList available disk images (IDs change, never hard-code them)
civo instance lsList instances
civo instance show <HOSTNAME>Show details and IP
civo instance remove <HOSTNAME>Delete an instance
civo sshkey create <NAME> --key <PATH-TO-PUB-KEY>Upload an SSH key
civo firewall create <NAME>Create a firewall (then add rules with civo firewall rule create)

Traefik and DNS #

Civo DNS is a supported ACME DNS provider for Traefik (provider: civo, see Traefik) and cert-manager (Cert-Manager via a webhook solver).

Search all sheets

Tip: / or Ctrl/Cmd+K to open, Esc to close.