Prerequisite
An existing trusted certificate and corresponding private keys, and it must be root certificate or an intermediate certificate.
Note:
Wildcard certificate is not applicable.
You can upload an existing intermediate certificate or root certificate, generate a new certificate by establishing a cert-manager issuing center, and then replace EonKube's self-signed certificate.
Applicable situations:
- Automated Management: This approach is best if you want to automatically manage and update credentials and want to leverage existing root or relay credentials to generate and issue new credentials.
- Centralized Management: Allows central management of all credentials and global control across the entire cluster using Cluster Issuer.
Procedure
- Upload the certificate to create a secret:
- Go to EonKube > Storage > Secrets.
- Click Create.
- Select TLS Certificate.
- Choose a namespace and specify an identifying name for this Secret.
- At the bottom of Certificate, click Read for File.
- Select the certificate file from your computer and click Open.
- Click Create.
- Configure a cert-manager CA issuer:
There are two kinds of issuer:- Issuer: The certificate's secret must reside in the same namespace.
- ClusterIssuer: The certificate's secret can be used in the cluster.
- To create an Issuer, go to EonKube > More Resources > Cert Manager > Issuers.
- To create a ClusterIssuer, go to EonKube > More Resources > Cert Manager > ClusterIssuer.
- You can also click the Resource Search and search Issuer or ClusterIssuer.
- Click Create from YAML.
- Enter the following information:
kind: When creating an Issuer, the kind indicates Issuer. When creating a ClusterIssuer, the kind indicates ClusterIssuer.metadata.name: Specify the issuer name.ca.secretName: Specify the secret name that you uploaded.
- Click Create.
- Change the assigned issuer: You can create a certificate yourself or generate a certificate by using cert-manager and renew the certificate. It is recommended that you use cert-manager to manage the certificate automatically.
- Create a certificate using cert-manager (Recommended)
- Go to EonKube > Service Discovery > Ingresses.
- The ingresses are listed according to the names of namespaces. Find the cattle-system. Click ⋮ and select Edit YAML.
- Change the following fields to the certificate information:
cert-manager.io/issuer: Specify the issuer name.cert-manager.io/issuer-kind: Specify the kind as Issuer or ClusterIssuer.cert-manager.io/cluster-issuer: Specify the issuer name. This is equivalent to cert-manager.io/issuer-kind:ClusterIssuer.cert-manager.io/duration: Specify the validity period of the certificate in hours. The minimum value is 1 hour.cert-manager.io/renewBefore: Specify when to renew the certificate in hours before it expires. The minimum value is 1 hour 1h.
- Save the settings.
- Create a certificate
- Go to EonKube > More Resources > Cert Manager > Certificates.
- Click Create from YAML.
- Enter the following information:
metadata.name: Specify the certificate name.metadata.namespace: Specify the namespace. For the cluster, specifycattle-system.spec.dnsNames: Specify the domain name. You can also use wildcard characters, e.g. '*.example.com'.spec.duration: Specify the validity period of the certificate in hours. The minimum value is 1 hour1h.spec.issuerRef: Specify thekindasIssuerorClusterIssuer, and specify thenameof the issuer.spec.renewBefore: Specify when to renew the certificate in hours before it expires. The minimum value is 1 hour 1h.spec.secretName: Specify the secret name of this certificate.
- Click Create.
- Go to EonKube > Service Discovery > Ingresses.
- The ingresses are listed according to the names of namespaces. Find the cattle-system. Click ⋮ and select Edit YAML.
- Change the following fields to the certificate information that you just configured:
metadata.annotations.cert-manager.io/issuercert-manager.io/issuer-kindtls.secretName
- Save the settings.
- Create a certificate using cert-manager (Recommended)