Google Cloud: Resize, upgrade, stop and delete
Configuration → Instance settings → Data size, then Apply changes.
Resize
Configuration → Instance settings → Data size, then Apply changes.
Resizing moves your instance to a bigger machine type and expands its Persistent Disk. Your data, endpoint, credentials and network rules all stay as they are — the disk is the same disk, grown, not a new one.
A resize that does not change the machine type needs no downtime. Google Cloud grows an attached disk while the instance is running, so if your new data size stays within the same machine-type band the disk is expanded, the engine's memory ceiling is raised, and nothing is interrupted. That is a real difference from Azure, which has to stop the machine for both halves.
The instance is stopped only when the machine type changes, because Google will not change it on a running instance. The dashboard tells you which case yours is before you apply.
Sizes go up only. Shrinking is refused: a Persistent Disk cannot be shrunk, and a smaller memory ceiling than the live dataset would stop the engine starting.
If the instance was stopped when you resized it, it stays stopped afterwards — it is started briefly so the filesystem can be grown and the new memory ceiling applied, then stopped again.
Change throughput
Throughput in the same panel switches between Standard and High. High gives you twice the CPU cores at the same memory, and the larger machine's network bandwidth. It follows the same rules as a data-size change: the machine type changes, so the instance restarts. Instances keep the machines and the price they were created with, so one created on an earlier rate card switches between that card's Standard and High machines.
Upgrade the engine
Version in Configuration → Instance settings lists the versions available to you. Choosing a newer one and applying restarts the instance on that build.
We support the latest patch of the current minor release, and of the previous one for 6 months after a new minor ships, and we move databases on an older patch to the latest in their maintenance window. See Engine versions and upgrades.
The upgrade is carried out by the agent running on your node, which downloads the build, swaps it and restarts the engine. Nothing reaches into the instance from the cloud side — there is no remote-exec channel on this cloud and deliberately no equivalent of one, so the upgrade path is the same one AWS and Azure use.
Downgrades are not supported. If a version turns out not to suit you, restore a snapshot into a new instance on the older version.
Enable Lua or TLS
Both change which build of the engine runs, so both restart the instance. Enable them from Instance settings and apply.
Enabling TLS also issues a certificate against your hostname and installs it, so your instance needs a name. Both steps go through the agent.
Lua cannot be turned off once enabled — create a new instance without it if you need to.
Encrypt replication
With TLS on, a Pro database can also encrypt the replication stream between its
nodes: turn on Encrypted replication on the Configuration tab, next to
TLS, or send replication_tls: true to POST /instances/{id}/binary. Replicas
then copy from the primary over TLS on port 6380, with the database's own
certificate, instead of in plaintext inside the cloud network. Turning it on or
off restarts every node once. A new replica added later does its first sync
over TLS too.
It is off by default because it costs some CPU on each node: about a third more for the replication work in our measurements, with no measurable change in replication lag or in how long a full resync takes. A sharded database with TLS always encrypts traffic between its nodes, so there is nothing to turn on.
Client certificates (mutual TLS)
With TLS on, a database can ask TLS clients for a certificate signed by your own certificate authority. On the Configuration tab, under Client certificates, paste your CA certificate (PEM, CA certificates only, never a private key) and choose a mode:
- Optional: a client that presents a certificate must present one signed by your CA; a client that presents none is still let in.
- Required: a TLS client without such a certificate is refused. This needs Require TLS on (Network rules), because the plaintext port never asks for a certificate; KiviDB refuses the change otherwise, and refuses turning Require TLS off while certificates are required.
The certificate is checked in addition to the password, not instead of it:
clients still sign in as a database user. Applying a change restarts every node
once, and replicas added later get the same setting before they accept TLS
connections. Through the API, send client_cert_mode (off, optional,
required) and client_ca_pem to POST /instances/{id}/binary. Not available
for sharded databases yet.
Stop and start
Stop from the instance actions stops the instance and releases its host. Compute stops being charged; storage continues, because your data is still there. Start brings it back with everything as it was, on the same external address — the address is a reserved resource of its own and is not released when the instance stops.
Google Cloud has only one off state, which avoids a trap the other clouds have: there is no way to stop an instance in a manner that keeps billing you for compute.
Use this for instances you do not need continuously. Stopping and starting are done from the console or the API; schedules run database commands, not these.
Tags
Tags are key/value labels you put on a database to find and group it: a team, an environment, a cost centre. They change nothing about how the database runs.
- Set them at creation (the Tags rows under the instance name, or
tagsinPOST /instances), and change them later from the Tags card on the database's overview or withPUT /instances/{id}/tags, whose body{"tags": {...}}replaces every tag ({"tags": {}}removes them all). - Up to 50 per database. Keys are 1-64 characters of lowercase letters, digits
and
_ . : / -, starting with a letter or digit; keys startingkividb:are reserved. Values are up to 256 characters, any text but control characters, and keep their case. - The database list shows them and filters by them: type
env=prodfor that exact value, orteamfor any database with ateamtag; several terms, separated by spaces, must all match. The API takes the same filter,GET /instances?tag=env=prod&tag=team, and returnstagson every database. - Tags are metadata: the viewer role sees them, and changing them is in the
organization's audit log, when it is turned on (
database.tags_change).
Maintenance window
Every database has a weekly maintenance window: a day, a start hour and a time
zone, 4 hours long. Until you choose one it is Sunday 03:00 UTC. Set it on the
database's Configuration tab, or with the API
(PATCH /instances/{id}/maintenance-window with day 0-6 from Sunday, hour
0-23 and an IANA timezone) or the MCP set_maintenance_window tool.
Maintenance KiviDB starts itself happens only inside the window, and the
organization's owners are emailed at least 48 hours before it. Today that is
renewing the TLS certificate of a database with TLS on, about once a year: every node restarts once,
at the same time, and the database refuses connections for a few seconds. The
Configuration tab and GET /instances/{id}/maintenance show any maintenance
already planned. Changing the window moves planned maintenance to the new one,
with a new notice.
Some things never wait for the window:
- changes you ask for, such as resizing, an engine upgrade or turning TLS on;
- failover and recovery of a node that has failed;
- a certificate within 3 days of expiry, renewed at once as emergency maintenance, with an email afterwards;
- events the cloud provider itself starts, such as host maintenance or a hardware failure.
Delete
Danger Zone → Delete instance.
Deletion is permanent. The instance, its data and its disk are destroyed, and nothing can be recovered afterwards except from a snapshot you already took.
You will be asked to type the instance name to confirm. You can also take a final snapshot as part of the deletion — worth doing unless you are certain.
Deleting a Google Cloud instance removes the instance, its boot and data disks, the reserved external address, every firewall rule belonging to it, the replica group if it had one, and any private connectivity resources. The deletion is verified by enumeration rather than assumed: deleting an instance on this cloud leaves the data disk, the reserved address and all the firewall rules behind, so "the job succeeded" is not by itself evidence that anything was removed. The project is searched afterwards and checked to be empty of your instance's resources.
Firewall rules are the quiet one. They cost nothing, so nothing would ever draw attention to them being left behind — which is exactly why they are checked.
What deletion does not remove
Your own PSC endpoint. If you created one for private connectivity, it lives in your project, not KiviDB's, and it keeps costing you Google's per-endpoint charge until you remove it:
gcloud compute forwarding-rules delete kividb-psc --region=us-central1
gcloud compute addresses delete kividb-psc --region=us-central1
Snapshots and KDB exports. These survive deletion, and continue to be charged for storage until you remove them from the Snapshots page.
If the instance stops answering
You do not have to do anything. A single-node instance that stops responding is picked up by a watchdog that works through the cheapest repair first: reset the instance, then cut power and start it again, and only then — if the machine itself is gone — build a replacement in front of the same disk.
The last of those is the reason the disk is a separate resource that outlives the instance. A rebuilt node adopts the disk with your data on it, comes up on the same external address, and replays the log that was already there. You will see the recovery in your notifications; in most cases the repair is the first step and the instance is back within a minute or two.
What the watchdog will not do is take the instance away from a node whose agent is still checking in. An agent that is heartbeating proves the machine is fine, and the usual reason the engine is quiet while the machine is fine is that it is still replaying a large log — restarting it there would throw that work away and start it again.