# Install my schema after deploying in kubernetes

**URL:** <https://forum.scylladb.com/t/install-my-schema-after-deploying-in-kubernetes/444>\
**Category:** Kubernetes Operator\
**Created:** [April 7, 2023, 6:36am UTC](https://forum.scylladb.com/t/install-my-schema-after-deploying-in-kubernetes/444 "2023-04-07T06:36:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eugene.vip](https://avatars.discourse-cdn.com/v4/letter/e/82dd89/32.png) [@Eugene.vip](https://forum.scylladb.com/u/Eugene.vip)\
**Post date:** [April 7, 2023, 6:36am UTC](https://forum.scylladb.com/t/install-my-schema-after-deploying-in-kubernetes/444/1 "2023-04-07T06:36:29Z")

</div>

Hi all! How do I install my database schema after deploying in kubernetes? The scheme is described in the cql files

---

<div class="post-metadata">

**Author:** ![Botond\_Denes](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.scylladb.com/botond_denes/32/163_2.png) [@Botond\_Denes](https://forum.scylladb.com/u/Botond_Denes)\
**Post date:** [April 11, 2023, 6:28am UTC](https://forum.scylladb.com/t/install-my-schema-after-deploying-in-kubernetes/444/2 "2023-04-11T06:28:36Z")

</div>

I am not a kubernetes expert, but I think you can use the same way you would use in any other cluser, using `cqlsh`.  
Or do you want to automate the loading of the schema, as part of deploying the cluster?

---

<div class="post-metadata">

**Author:** ![zimnx](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.scylladb.com/zimnx/32/150_2.png) [@zimnx](https://forum.scylladb.com/u/zimnx)\
**Post date:** [April 11, 2023, 8:07am UTC](https://forum.scylladb.com/t/install-my-schema-after-deploying-in-kubernetes/444/3 "2023-04-11T08:07:01Z")

</div>

To define a schema you use the same way you would use in any other deployment, via `cqlsh`.  
In Kubernetes, `cqlsh` is available in Scylla image, you can execute it inside one of your Scylla Pods:

```bash
kubectl -n <namespace> exec -ti <pod-name> -c scylla -- cqlsh

```

For example:

```bash
kubectl -n scylla exec -ti basic-us-east-1-us-east-1a-0 -c scylla -- cqlsh

```

---

<div class="post-metadata">

**Author:** ![Eugene.vip](https://avatars.discourse-cdn.com/v4/letter/e/82dd89/32.png) [@Eugene.vip](https://forum.scylladb.com/u/Eugene.vip)\
**Post date:** [April 12, 2023, 12:12pm UTC](https://forum.scylladb.com/t/install-my-schema-after-deploying-in-kubernetes/444/4 "2023-04-12T12:12:35Z")

</div>

Thank you for your reply.  
That’s right, I want to automate the loading of the schema, as part of deploying the cluster

---

<div class="post-metadata">

**Author:** ![Eugene.vip](https://avatars.discourse-cdn.com/v4/letter/e/82dd89/32.png) [@Eugene.vip](https://forum.scylladb.com/u/Eugene.vip)\
**Post date:** [April 12, 2023, 12:13pm UTC](https://forum.scylladb.com/t/install-my-schema-after-deploying-in-kubernetes/444/5 "2023-04-12T12:13:31Z")

</div>

Thank you.  
I’ll try that option.

---

<div class="post-metadata">

**Author:** ![Israel\_Fruchter](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.scylladb.com/israel_fruchter/32/153_2.png) [@Israel\_Fruchter](https://forum.scylladb.com/u/Israel_Fruchter)\
**Post date:** [May 2, 2023, 3:18pm UTC](https://forum.scylladb.com/t/install-my-schema-after-deploying-in-kubernetes/444/6 "2023-05-02T15:18:08Z")

</div>

Depends on how your automation is built, and in what language

you might want to use on of the drivers for doing CQL operations

> **[ScyllaDB Drivers](https://www.scylladb.com/product/scylla-drivers/)**
>
> ScyllaDB’s shard-aware drivers provide superior NoSQL database performance. ScyllaDB is also compatible with Apache Cassandra CQL drivers and DynamoDB SDKs.
