Skip to content

Document how to install cert-manager using gitops and known issues with particular gitops implementations  #320

Open

Description

@wallrj

We could add some documentation briefly explaining how to install cert-manager using gitops systems like Flux or Anthos.

There are some known issues around the installation of CRDs and the subsequent injection of webhook caBundles into the CRDs where.

For example this conversations in Slack (https://kubernetes.slack.com/archives/C4NV3DWUC/p1599044537041800) where it is said that Flux does not work well with cert-manager upgrades.
Perhaps because as it upgrades CRDs it clobbers the injected caBundles and then attempts to read the state of the existing certificates before the caBundles have been re-injected and gets stuck because its calls to the K8S API server require a call to the (now unreachable) conversion webhook.

It could very well be that I have misunderstood the problem description, and I certainly don't know very much about Flux

But it would be good to try it, document any problems that do exist.

/cc @munnerz @meyskens @jfrancisco0

See also:

Activity

  1. jfrancisco0 commented on Sep 4, 2020

    @jfrancisco0
    Contributor

    My specific issue with cert-manager + Flux is as follows:

    • Deploy cert-manager via Flux:
      • Create HelmRelease
      • Create ClusterIssuers
      • Add ingress annotations
    • Something happens that breaks the webhook service, or it's broken by a new version. This was common for me in these situations:
    • Since Flux is watching some cert-manager custom resources (ClusterIssuers) it will start throwing errors because it can't reach the webhook (since it's not deployed), and fails to sync with git.

    So, in the end, it won't deploy my updated cert-manager release (or anything else) and I need to either install cert-manager from outside Flux, or delete the CRDs (deleting the CRDs just hangs and doesn't complete successfully, I need to use this workaround kubernetes/kubernetes#60538 (comment)). Also note that, in this state, I can't delete the ClusterIssuers (or any other cert-manager resources) with kubectl either.

    This is maybe more of an issue with Flux and K8s webhooks than with cert-manager, but perhaps something in the process can be improved. Hope my comment isn't too confusing!

  2. munnerz commented on Sep 4, 2020

    @munnerz
    Member

    I've also asked a question over in #sig-api-machinery on Slack about this, as I believe it's ultimately caused by the need for the webhook component to be upgraded before the CRDs (and then the controllers that consume those CRDs after that): https://kubernetes.slack.com/archives/C0EG7JC6T/p1599220160144500

    That said, with the cainjector issue (cert-manager/cert-manager#3251) this will be made more problematic again, and even once that issue is solved, implies that the cainjector would need to be deployed alongside the webhook in 'phase 1' of installation.

  3. munnerz commented on Sep 4, 2020

    @munnerz
    Member

    I also think this issue affects more than just GitOps users - technically, whilst using kubectl replace or similar would work fine eventually (unlike in this GitOps case), it also leads to brief periods of outages for the cert-manager API whilst the upgrade is taking place (due to all the issues described here).

  4. wallrj commented on Sep 5, 2020

    @wallrj
    MemberAuthor

    The tutorial A Complete Step by Step Guide to Implementing a GitOps Workflow with Flux includes an example of deploying cert-manager using Flux.

  5. irbekrm commented on Apr 15, 2021

    @irbekrm
    Contributor

    It would be good to get this done as the number of user issues/questions related to this seem to be increasing.

    Related issue cert-manager#3291

    /priority important-soon

  6. added
    priority/important-soon
    on Apr 15, 2021
  7. added
    documentation
    on Apr 15, 2021
  8. added
    priority/backlog
    help wanted
    and removed
    priority/important-soon
    on Feb 14, 2023
  9. irbekrm commented on Feb 14, 2023

    @irbekrm
    Contributor

    We are currently short of bandwidth. I think this would still be a valuable addition to the documentation if someone is willing to contribute this.

  10. 7h3-3mp7y-m4n commented on Oct 1, 2023

    @7h3-3mp7y-m4n

    hey can I work on this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationhelp wantedpriority/backlog

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions