Configure cert-manager

cert-manager generates and renews TLS certificates and private keys in Kubernetes. BIG-IP Next for Kubernetes can use these certificates to encrypt traffic between pods. This helps support zero-trust security patterns by protecting data in transit. When configured for mutual TLS (mTLS), certificates can also be used to verify service identity. For this deployment, we recommend using an open-source version of cert-manager build optimized for ARM architecture.

To successfully configure cert-manager, follow these steps:

  1. Install cert-manager

  2. Create ClusterIssuer

  3. Update BIG-IP Next for Kubernetes configuration files to use your ClusterIssuer

Install cert-manager

  1. Install cert-manager and its CRDs using the official Jetstack manifest.

    kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.16.1/cert-manager.yaml
    

    Note

    F5 tested BIG-IP Next for Kubernetes with Jetstack Cert Manager v1.16.1.

    After installation, allow time for the controller, cainjector, and webhook pods to start.

    Note

    If you encounter webhook-related errors (such as failed calling webhook or Internal error occurred) when running kubectl apply, the cert-manager webhook may not be fully initialized. Wait 30–60 seconds before retrying, and confirm the readiness of the pods with kubectl get pods -n cert-manager.

  2. Verify all pods are running.

    kubectl get pods -n cert-manager
    

Create a ClusterIssuer

To issue certificates, cert-manager requires a ClusterIssuer (cluster-scoped).

  1. Create a file named cluster-issuer.yaml with the following content:

    apiVersion: cert-manager.io/v1
    kind: ClusterIssuer
    metadata:
        name: selfsigned-cluster-issuer
    spec:
        selfSigned: {}
    ---
    apiVersion: cert-manager.io/v1
    kind: Certificate
    metadata:
        name: arm-ca
        namespace: cert-manager
    spec:
        isCA: true
        commonName: arm-ca
        secretName: arm-ca
        issuerRef:
            name: selfsigned-cluster-issuer
            kind: ClusterIssuer
            group: cert-manager.io
    ---
    apiVersion: cert-manager.io/v1
    kind: ClusterIssuer
    metadata:
        name: arm-ca-cluster-issuer
    spec:
        ca:
            secretName: arm-ca
    
  2. Apply the cluster-issuer.yaml resource.

    kubectl apply -f cluster-issuer.yaml
    

    Note

    If you encounter issues creating or applying a ClusterIssuer, first ensure that cert-manager and its Custom Resource Definitions (CRDs) are properly installed. Errors such as no matches for kind "ClusterIssuer" in version "cert-manager.io/v1" typically indicate that the cert-manager CRDs are missing or that cert-manager was not installed correctly.

    To verify the installation, run helm list -n cert-manager. To confirm the presence of the required CRDs, execute kubectl get crds | grep cert-manager. If you identify any installation issues, resolve or reinstall cert-manager with CRDs enabled according to your standard procedures. Once the installation is corrected, re-apply your manifest with kubectl apply -f cluster-issuer.yaml.

    Example

    clusterissuer.cert-manager.io/selfsigned-cluster-issuer created
    certificate.cert-manager.io/arm-ca created
    clusterissuer.cert-manager.io/arm-ca-cluster-issuer created 
    
  3. Verify the ClusterIssuer is ready.

    Confirm your ClusterIssuers are created and in a READY=True state:

    kubectl get clusterissuer
    

    Example

    NAME                        READY   AGE
    arm-ca-cluster-issuer       True    83s
    selfsigned-cluster-issuer   True    83s
    

    If READY is not True, check cert-manager pod health and events:

    kubectl get pods -n cert-manager
    kubectl describe clusterissuer arm-ca-cluster-issuer
    

Update BIG-IP Next for Kubernetes configuration files to use your ClusterIssuer

After you create the ClusterIssuer,

  • Ensure that the global.certmgr.clusterIssuer parameter in f5-lifecycle-operator-override-values.yaml is updated with the metadata.name value of the ClusterIssuer. In the example below, the metadata.name value is arm-ca-cluster-issuer.

    Example

    global:
        certmgr:
            clusterIssuer: arm-ca-cluster-issuer
    
  • Ensure that the certificate.clusterIssuer parameter in cneinstance-cr.yaml is updated with the metadata.name value of the ClusterIssuer. In the example below, the metadata.name value is arm-ca-cluster-issuer.

    Example

    certificate:
        clusterIssuer: arm-ca-cluster-issuer
    

Important

The value you configure in both files must match with the metadata.name of the ClusterIssuer you created.