Войти
  • 1656Просмотров
  • 1 год назадОпубликованоdavid hwang

Deploy Go App to Production Kubernetes & Database

feel free to watch the last two videos to continue following along: learn how to migrate your database tables to a production database and kubernetes basics to deploy your app on a cluster. github: How to Connect to MySQL Database Clusters: golang-migrate: How to Use the Database Operator: How to Use Your Private DigitalOcean Container Registry with Docker and Kubernetes: please keep in mind this video is for educational purposes only to help understand what deploying to production involves and not actually production-ready. Timestamps: 0:00 - intro 1:12 - create a production database 2:37 - brief overview of the Go app 3:08 - database migration with golang-migrate 6:29 - test database migration against a local DB 8:34 - create a bash script to automate database migration 10:01 - store the production DB credentials 12:44 - automate building and pushing an image to a registry 15:43 - authenticate to digitalocean registry with docker login 16:32 - modify the app to accept environment variables 18:22 - kubernetes basics - pod, deployment, service, ingress 22:07 - create a kubernetes cluster on digitalocean 22:37 - add a digitalocean database operator & how it works 25:41 - download kubeconfig and access your kubernetes cluster 26:16 - create the deployment, service, and DatabaseClusterReference manifests 29:21 - retrieve the uuid of the database cluster using doctl 30:20 - first attempt to apply the kubernetes manifests 31:12 - imagePullBackOff error and integrate digitalocean registry with the cluster 31:56 - second attempt to apply the kubernetes manifests 32:28 test making requests to the load balancer IP using curl