0

I have very little knowledge of how kubernetes works and I’m trying to learn. I have some difficulties to understand how I can use kubernetes to deploy my DB (CouchDB) the reverse proxy (nginx) and the ssl certificate (letsencrypt with certbot-auto).

I run CentOS 8 and have installed podman for the containers. I can install each one in different containers within the same pod and I can make them communicate properly.

What I don’t understand is how can I use kubernetes to properly deploy all of these containers and scale them in a cluster.

My questions are the following:

  • Where should I start to make kubernetes work with these three components? Should I install the three containers first with their configuration (the DB can be configured to handle clusters but my understanding is that kubernetes handles clusters. So I’m wondering if I have to configure the DB for the cluster and hence install two nodes)
  • Should I install letsencrypt with certbot? I don’t understand how kubernetes can deploy new pods to have them work with letsencrypt automatically configured

If anyone can give me the steps to get this done it would be really great...I just don’t really know where to start and the docs and tutorials are a bit confusing.

Nate
  • 7,606
  • 23
  • 72
  • 124

1 Answers1

3

I think you need to deploy two applications for your DB and Nginx, but for your certificates, we have different methods to have letsencrypt on kubernetes

for letsencrypt and nginx these two articles could help you to get some insights about what you need to do

Nginx & LetsEncrypt and this one Let’s Encrypt on Kubernetes

and for CouchDB this article may help you CouchDB on Kubernetes, in this article mentions NFS as storage but you can have your own

Hamed
  • 501
  • 3
  • 13
  • Thank you so much, it really helps a lot...so just to make sure I understood correctly, I should follow the tutorial for the DB and then follow the tutorial on nginx/letsencrypt. But how do I connect the two? Will I have two separate kubernetes to deploy the DB? – Nate Apr 27 '20 at 21:11
  • what do you mean by two separate Kubernetes? why two? you can deploy all of them on one cluster, as far as I know, your DB is different from you Nginx/letsencrypt, so you need to deploy them separately, but about communication between nginx and DB, nginx is just a webserver and you can not connect nginx to your DB. I think some more details is needed on your question. – Hamed Apr 27 '20 at 21:29
  • You’re right, nginx doesn’t connect to the DB, it redirects requests. I think I have enough to start! Since I’m not familiar enough with kubernetes, I thought I needed only one kubernetes for everything. Does it mean that each deployment of each application will create an instance on my cluster? I can’t afford to have an instance for each application :/ – Nate Apr 27 '20 at 21:47