For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
| # read more at https://terrty.net/2014/ssl-tls-in-nginx/ | |
| # latest version on https://gist.github.com/paskal/628882bee1948ef126dd/126e4d1daeb5244aacbbd847c5247c2e293f6adf | |
| # security test score: https://www.ssllabs.com/ssltest/analyze.html?d=terrty.net | |
| # your nginx version might not have all directives included, test this configuration before using in production against your nginx: | |
| # $ nginx -c /etc/nginx/nginx.conf -t | |
| server { | |
| # public key, contains your public key and class 1 certificate, to create: | |
| # (example for startssl) | |
| # $ (cat example.com.pem & wget -O - https://www.startssl.com/certs/class1/sha2/pem/sub.class1.server.sha2.ca.pem) | tee -a /etc/nginx/ssl/domain.pem > /dev/null |
| while true ; do echo -e "HTTP/1.1 200 OK\n\n $(date)" | nc -l -p 1500 ; done |
| kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod |
| #for not running docker, use save: | |
| docker save <dockernameortag> | gzip > mycontainer.tgz | |
| #for running or paused docker, use export: | |
| docker export <dockernameortag> | gzip > mycontainer.tgz | |
| #load | |
| gunzip -c mycontainer.tgz | docker load |