Skip to content

fayvori/traefik-cert-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirments

  • Kubernetes cluster
  • Terraform
  • kubectl
  • helm
  • Yandex Cloud
  • Yandex Cloud CLI
  • Availiable DNS address

Note

In order this example to work you need kubernetes cluster up and running. In order to create it go to the terraform folder and apply all the files

terraform init 
terraform apply

For obtaining yandex kubernetes config execute the following command

yc managed-kubernetes cluster get-credentials observability-k8s --external

Implementation

Don't forget to add traefik and cert-manager helm repos

helm repo add traefik https://traefik.github.io/charts
helm repo add jetstack https://charts.jetstack.io
helm repo update

First we need ingress-controller, I'll be using traefik, but you can choose whatever you want. Install traefik with command down below

helm install traefik traefik/traefik

trafik installed

If traefik deployed succesfully, you need to add it's LoadBalancer ip to your DNS provider (for example reg.ru)

traefik external ip

Now install cert-manager using helm

helm install cert-manager jetstack/cert-manager \
  --namespace cert-manager \
  --create-namespace \
  --version v1.12.0 \
  --set installCRDs=true

cert-manager

For sample application we deploy bitnami/nginx, we need to provide custom ingress values (you can find template inside helm-values folder)

Don't forget to change hostname field in values file

helm install nginx --values ./helm-values/nginx-values.yaml oci://registry-1.docker.io/bitnamicharts/nginx

nginx installed

In order to obtain ssl certificate apply a file from manifests folder called cluster-certificate.yaml (don't forger to change email field)

k apply -f ./manifests/cluster-certificate.yaml

And if all was successfully issued we can describe cert-manager crds

cert installed

Now you can enter your domain in the browser and should be able to see that certificate was successfully applied

web cert

About

Traefik ingress-controller tls using cert-manager

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages