by PlanetScale Inc.

Version Vitess

OS vitess/lite



Vitess is an open-source database solution for deploying, scaling and managing large clusters of database instances. It currently supports MySQL and MariaDB. It’s architected to run as effectively in a public or private cloud architecture as it does on dedicated hardware. It combines and extends many important SQL features with the scalability of a NoSQL database.

Software Included

Getting started after deploying Vitess

Accessing the Cluster

To log into this cluster you can use the following commands

Access the Database from outside the Kubernetes cluster

You can access the database outside the kubernetes cluster by port-forwarding to the vtgate service. This service will load balance connection to all vtgates.

VTGATE=$(kubectl get service -l "," -o -n vitess | tail -n -1)
kubectl port-forward -n vitess service/"${VTGATE}" 3306&

you will then be able to access your vitess cluster on the forwarded port with the standard mysql client

mysql -h -u admin -pscalewithvitess main

Access the Database from inside the Kubernetes cluster

Inside the kubernetes cluster the vtgate service will be accessable on the service DNS name. You can find all vtgate services by running

kubectl get service -n vitess -l ","

Vtgate exposes a mysql compatible server on port 3306. It also has a gRPC server on port 15999

Customizing the Database

The default database deployed by this stack is an example database that is not suitable for production workloads. You can customize the example database by fetching the YAML manifest from here

Important Changes for Production workloads

General recommendations for production workloads can be found on the main Vitess documentation site

Username and Password

In the example manifest there is a kubernetes secret named example-cluster-config. That secret contains the username as password of the default user. This should be changed to a secure username and password. Reference the vitess documentation on how to configure users and passwords

Number of Gateways

By default only one vtgate pod is created. To ensure reliability this should be increased to at least two. This setting is found here

  - name: ...
      replicas: 1

API Creation

In addition to creating Vitess via the control panel, you can also use the DigitalOcean API.

As an example, to create a 3 node DigitalOcean Kubernetes cluster made up of Basic Droplets in the SFO2 region, you can use the following curl command. You’ll need to either save your API access token to an environment variable or substitute it into the command below.

  curl -X POST -H "Content-Type: application/json" \
      -H "Authorization: Bearer '$TOKEN'" -d \
      '{"name": "choose-a-name","region": "sfo2","version": "1.17.5-do.0","node_pools": [{"size": "s-1vcpu-2gb","count": 3,"name": "choose-a-name"}]}' \

Support Details

Supported By:PlanetScale Inc.
Hours:9:00am - 9:00pm PST
Support URL:

More DigitalOcean Links

DigitalOcean Community

Developers supporting developers

Ask a Question

Ask anything related to system administration, programming, devops, open source, or the DigitalOcean platform.

List your 1-Click App in the DigitalOcean Marketplace

Partner with us to build traction for your open source project or software company