I just begun learning kubernetes. I made an account in digital-ocean and started a kubernetes cluster. Then I tried following this article https://www.digitalocean.com/community/tutorials/how-to-secure-your-site-in-kubernetes-with-cert-manager-traefik-and-let-s-encrypt. But I'm having some questions about how it works. Right now my situation is this one:
kubectl get pods,services,deployments
NAME
pod/app-frontend
pod/app-backend
pod/cm-acme-http-solver-qh8ms
pod/company-service
pod/edge-service
pod/location-service
pod/traefik
pod/traefik-deployment
pod/user-service
NAME TYPE EXTERNAL-IP PORT(S)
service/app-frontend LoadBalancer app-ext-ip 3000:32459/TCP
service/app-backend ClusterIP <none> 5432/TCP
service/cm-acme-http-solver-fcgpr NodePort <none> 8089:30577/TCP
service/company-service ClusterIP <none> 9003/TCP
service/edge-service ClusterIP <none> 9000/TCP
service/kubernetes ClusterIP <none> 443/TCP
service/location-service ClusterIP <none> 9002/TCP
service/traefik LoadBalancer traefik-ext-ip 80:32591/TCP,443:30716/TCP
service/traefik-dashboard-service LoadBalancer tr-dash-ext-ip 8080:31431/TCP
service/traefik-web-service LoadBalancer tr-ws-ext-ip 80:31211/TCP
service/user-service ClusterIP <none> 9001/TCP
NAME
deployment.apps/app-frontend
deployment.apps/app-backend
deployment.apps/company-service
deployment.apps/edge-service
deployment.apps/location-service
deployment.apps/traefik
deployment.apps/traefik-deployment
deployment.apps/user-service
So I have Traefik working but not acting as proxy, the app-frontend working, but not in https, the certificates issued by letsencrypt not being used anywhere. for example
kubectl get issuer -o wide
NAME READY STATUS
challenge-http True The ACME account was registered with the ACME server
kubectl get certificateRequest -o wide
NAME APPROVED DENIED READY ISSUER REQUESTOR STATUS AGE
tls-app-ingress True False challenge-http system:serviceaccount:cert-manager:cert-manager Waiting on certificate issuance from order default/tls-app-ingress-http: "pending"
kubectl get certificates
NAME READY SECRET AGE
tls-app-ingress-http False tls-area-ingress-http 166m
And of course since I am learning from scratch, everything is in the default environment. How do I tell kubernetes to use Traefik as a proxy and arrive to the app-frontend via https? I'm not offended if you answer me with some documentation to read, just point me in the right direction.
First of all I suggest reading those 3 articles:
https://medium.com/@faturrahmanmakruf/configure-https-in-traefik-with-cert-manager-and-lets-encrypt-db60960e2283
https://traefik.io/blog/secure-web-applications-with-traefik-proxy-cert-manager-and-lets-encrypt/
https://doc.traefik.io/traefik/user-guides/cert-manager/
here are the steps: