Deploying Postgres in Kubernetes with Ansible
A PoC for basic Kubernetes API calls.
- 1 min read
Series: Labs
Laboratory
Even tho Kubernetes allows to deploy production-grade databases, it is possible to deploy a straightforward Postgres instance without operators or major architecture designs. Of course, this won’t be suitable for a production setup, but is good enough for understanding the concepts behind k8s API calls.
See the source: Postgres deployment on k8s using Ansible
Install minikube or similar
curl -Lo minikube \
https://storage.googleapis.com/minikube/releases/v1.2.0/minikube-darwin-amd64\
&& chmod +x
minikube && sudo cp minikube /usr/local/bin/ && rm minikube
Getting the token
Ansible k8s
K8S_AUTH_API_KEY
in environment.
Getting facts with k8s_fact
comments powered by Disqus