Skip to content

🌀 Postgresql setup in DigitalOcean Kubernetes with persistent volume configuration

License

Notifications You must be signed in to change notification settings

data-depo/kubernetes-postgres-do

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Postgresql DigitalOcean Kubernetes

Run postgresql in DigitalOcean Kubernetes with persistent volume claim

Prerequisites

  1. Digitalocean kubernetes cluster since we run this configuration on DigitalOcean environment, GCP and other resource will come in next repository
  2. Make sure your kubectl already installed
  3. Download the kubernetes_config.yaml from DigitalOcean this config file rotated every week

How to

  1. Make sure you have access to your clusters

     kubectl --kubeconfig="path_to_your_kubeconfig.yaml" get nodes

    It will list of all your kubernetes cluster's nodes

  2. Setup Digitalocean PVC visit this documentation for more information CSI DigitalOcean

  3. Create Kubernetes Persistent Volume

     kubectl --kubeconfig="path_to_your_kubeconfig.yaml" create -f pvc.yaml
  4. Check if your persisten volume claim success

    kubectl --kubeconfig="path_to_your_kubeconfig.yaml" get pv
  5. Create postgres deployment

     kubectl --kubeconfig="path_to_your_kubeconfig.yaml" create -f postgres.yaml

    This process may take few mintes

    Check deployment status

    kubectl --kubeconfig="path_to_your_kubeconfig.yaml" get deployments

    Check your service status

    kubectl --kubeconfig="path_to_your_kubeconfig.yaml" get service
  6. Finished! Now you can access your postgres throug external ip address in Service and his port For example: 192.xxx.xx:5432 and use postgres credentials that we set up through configmap.yaml

  7. Support by star this repository ;)

About

🌀 Postgresql setup in DigitalOcean Kubernetes with persistent volume configuration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published