This is an old revision of the document!
# hostnamectl hostname vps
vps:~# systemctl disable apache2.service --now ... vps:~# systemctl disable nginx.service --now
student@vps:~/apwebd-k8s$ curl -H "Host: siteN.mgtu.ru" http://192.168.49.2 -v student@vps:~/apwebd-k8s$ curl -H "Host: siteN.mgtu.ru" https://192.168.49.2 -k
#Add port 80 for demonstration how does a cert-manager work
virtual_server 195.19.40.42 443 {
lb_algo wlc
lb_kind NAT
protocol TCP
real_server 192.168.49.2 443 {}
}
$ curl http://site194.mgtu.ru -v $ curl https://site194.mgtu.ru -k
student@vps:~$ kubectl -n my-ns get pods ... cm-acme-http-solver-... ... student@vps:~/apwebd-k8s$ kubectl -n my-ns get ingress -o yaml | grep acme-challenge student@vps:~/apwebd-k8s$ curl http://siteN.mgtu.ru/.well-known/acme-challenge/NNNNNNNNNNNNNNNNNNNNN student@vps:~/apwebd-k8s$ kubectl -n my-ns exec -ti pods/my-webd-<TAB> -- bash root@my-webd-...:/usr/local/apache2# apt update; apt install curl root@my-webd-...:/usr/local/apache2# curl http://siteN.mgtu.ru/.well-known/acme-challenge/NNNNNNNNNNNNNNNNNNNNN
...
frontend ft-vps
mode http
bind *:80
default_backend bk-minikube-ingress
backend bk-minikube-ingress
mode http
server minikube 192.168.49.2:80 check
$ curl https://siteN.mgtu.ru -v