Difficulty: Beginner
Estimated Time: 60 minutes

Vitess Playground

Step 1 of 2

Step 1 - Deploy

Prepare the Environment

First Start the minikube service to get a working kubernetes environment minikube start --extra-config=apiserver.service-node-port-range=1024-65535

Next deploy the manifests for the Planetscale Vitess operator

kubectl create -f operator.yaml

Deploy a stand alone mysql deployment

kubectl create -f mysql-deployment.yaml

Load the following sample schema into the mysql server

cat <<EOF |  mysql -h 127.0.0.1 -u mysql_user -pmysql_password commerce
create table product(
    sku varbinary(128),
    description varbinary(128),
    price bigint,
    primary key(sku)
);
create table customer(
    customer_id bigint not null auto_increment,
    email varbinary(128),
    primary key(customer_id)
);
create table corder(
    order_id bigint not null auto_increment,
    customer_id bigint,
    sku varbinary(128),
    price bigint,
    primary key(order_id)
);
EOF

Finally Load some sample data into the cluster

cat <<EOF | mysql -h 127.0.0.1 -u mysql_user -pmysql_password commerce
INSERT INTO product (sku,description,price) VALUES ("pen","A Pen",130),("paper","Some Paper",20),("chicken","A whole Chicken",100);
INSERT INTO customer (email) VALUES ("[email protected]"),("[email protected]"),("[email protected]");
INSERT INTO corder (customer_id, sku, price) VALUES (1,"pen",130);
EOF
This tab will not be visible to users and provides only information to help authors when creating content.

Creating Katacoda Scenarios

Thanks for creating Katacoda scenarios. This tab is designed to help you as an author have quick access the information you need when creating scenarios.

Here are some useful links to get you started.

Running Katacoda Workshops

If you are planning to use Katacoda for workshops, please contact [email protected] to arrange capacity.

Debugging Scenarios

Below is the response from any background scripts run or files uploaded. This stream can aid debugging scenarios.

If you still need assistance, please contact [email protected]