--- title: "Deploy database to EKS" weight: 60 --- The final step is to move the database from our kind cluster into EKS. There are **lots** of different options for how you might want to migrate application state. In many cases using an external database such as [Amazon Relational Database Service (RDS)](https://aws.amazon.com/rds/) is a great fit. For production data you'll want to set up a way where you can verify correctness of your state or automatic syncing between environments. For this workshop we're going to manually move our database state. The first thing we need to do is create a Postgres database with hostPath persistent storage in Kubernetes. We'll use the exact same ConfigMap from kind to generate an empty database first. All of the config for Postgres is the same as it was for kind ```bash cat < postgres_dump.sql ``` Restore database ```bash cat postgres_dump.sql | kubectl exec -i postgres-0 -- psql -U postgres ``` Now we can deploy a postgres service inside EKS to point to the new database endpoint. This is the exact same postgres service we deployed to kind. ```bash cat <