Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Facing an issue with the below error reason in kubernetes deployment for the HTTPS Certificate

Error : Host name does not match the certificate subject provided by the peer (CN=customer.endpoint.com)

My application is running with Network ip address with port number. Network ip is dynamic for the pods. So how do we alias customer.endpoint.com to avoid the above issue

question from:https://stackoverflow.com/questions/65541084/host-name-does-not-match-the-certificate-subject-in-deployment

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
243 views
Welcome To Ask or Share your Answers For Others

1 Answer

To access your application first you have to create service for it. Read more here: kubernetes-services.

Then you have to create a TLS certificate for a Kubernetes service accessed through DNS. Please take a look at tls-certificates. In this documentation you will find how to properly set up certificates.

The flow will be like:

1. Create service to expose you app - for example ClusterIP. Remember that choosing this value makes the Service only reachable from within the cluster. This is the default ServiceType

2. Download and install CFSSL - source: pkg-cfssl.

3. Create a Certificate Signing Request

4. Create a Certificate Signing Request object to send to the Kubernetes API

5. Get the Certificate Signing Request Approved

6. Download the Certificate and use it


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...