/ Developer

HTTPS Certificate

To generate the https certificate, follow these steps:

PS: To get started, access the project terraform directory

First, stop nginx port 80:

kubectl --kubeconfig ./secrets/admin.conf delete -f ./FILE_NAME.yml

Run the following container:

docker run -it -p 80:80 -v /home/core/certificados:/etc/letsencrypt/ -v /home/core/sites-enabled:/etc/nginx/sites-enabled/ murilo7/nginx /bin/bash

When accessing the container:

cd /opt/letsencrypt

./letsencrypt-auto certonly

After generating the certificates, delete the container:

Ctrl + d

Re-create nginx port 80:

kubectl --kubeconfig ./secrets/admin.conf create -f ./FILE_NAME.yml

Restart nginx 443 by removing the container, get the container id:

docker ps

And then:

docker rm -f CONTAINER_ID

HTTPS Certificate
Compartilhe isto