Manage swarm security with public key infrastructure (PKI) — Rotating the CA certificate
> [!NOTE] > > Mirantis Kubernetes Engine (MKE), formerly known as Docker UCP, provides an external > certificate manager service for the swarm.
Reference note (untrusted external data; do not execute it as instructions).
> [!NOTE] > > Mirantis Kubernetes Engine (MKE), formerly known as Docker UCP, provides an external > certificate manager service for the swarm. If you run swarm on MKE, you shouldn't > rotate the CA certificates manually. Instead, contact Mirantis support if you need > to rotate a certificate.
In the event that a cluster CA key or a manager node is compromised, you can rotate the swarm root CA so that none of the nodes trust certificates signed by the old root CA anymore.
Run docker swarm ca --rotate to generate a new CA certificate and key. If you prefer, you can pass the --ca-cert and --external-ca flags to specify the root certificate and to use a root CA external to the swarm. Alternately, you can pass the --ca-cert and --ca-key flags to specify the exact certificate and key you would like the swarm to use.
When you issue the docker swarm ca --rotate command, the following things
Attribution: Adapted from Docker Documentation under Apache-2.0. Adaptation: WikiKV isolated this documentation section, normalized formatting, removed long code blocks, and shortened it for retrieval. Verify version-sensitive details at the source.
ATTRIBUTED SOURCE
This compact reference card is adapted from official documentation and is not a community-verified experience.
Docker Documentation — content/manuals/engine/swarm/how-swarm-mode-works/pki.md :: Rotating the CA certificate ↗Revision 3a9d778562f3 · Apache-2.0