Yes, you can use Let's Encrypt with a Kubernetes load balancer by using ingress-nginex in combination with certbot certmanager as described below.
First, run:
~~~
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.45.0/deploy/static/provider/cloud/deploy.yaml
~~~
This will create a new namespace called ingress-nginex, inside which the nginex controller is deployed.
Next, run:
~~~
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: <your-project>-ingress
namespace: <your-project>
annotations:
cert-manager.io/issuer: "letsencrypt-prod"
kubernetes.io/ingress.class: "nginx"
spec:
tls:
- hosts:
- join.leaf.cloud
secretName: <your-project>-ingress-tls
rules:
- host: join.leaf.cloud
http:
paths:
- path: /
pathType: Prefix
backend:
serviceName: <your-project>-entrypoint
servicePort: 8000
---
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
namespace: <your-project>
name: letsencrypt-prod
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: my@email.com
privateKeySecretRef:
name: letsencrypt-prod
solvers:
- http01:
ingress:
class: nginx
~~~