Kubernetes里ingress配置的一些例子

59 阅读1分钟

命令:

openssl genrsa -out ca.key 2048
openssl req -new -x509 -days 365 -key ca.key -subj “/C=DE/L=Walldorf/O=SAP/CN=SAP Fake Root CA” -out ca.crt

clipboard1

openssl req -newkey rsa:2048 -nodes -keyout server.key -subj “/C=DE/L=Walldorf/O=SAP/CN=bulletinboard–” -out server.csr
openssl x509 -req -extfile <(printf “subjectAltName=DNS:<THE INGRESS URL WITHOUT HTTP(S)?/>”) -days 365 -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt

clipboard2

Finally create the tls secret yaml, move it into the ads folder and apply it:

clipboard3

clipboard4

kubectl apply -f tls.yaml

要获取更多Jerry的原创文章,请关注公众号"汪子熙":