Kubernetes Secrets Compared To Docker Swarm Secrets

This article is part of the series that compares Kubernetes and Docker Swarm features.

Secrets are very similar to Kubernetes ConfigMaps and Docker Swarm configs. Everything we said for configurations applies to Secrets, with a few additional features.

Both Kubernetes and Docker Swarm stores Secrets in tmpfs inside containers. From that aspect, they are equally secure. The significant difference is in the way Secrets are stored internally.

Kubernetes stores Secrets in etcd. By default, they are exposed, and we need to take extra precautions to protect them. Docker Swarm secrets are, on the other hand, more secure by default. They are synchronized between managers using SSL/TLS, and they are encrypted at rest. I prefer “secured by default” approach behind Docker Swarm secrets. In Kubernetes, we need to take extra steps to reach a similar level of security as with Docker Swarm.

On the other hand, Kubernetes integration with third-party solutions for secrets is much better. For example, plugging in HashiCorp Vault into Kubernetes workflow is much smoother than if we’d try to integrate it with Docker Swarm. Using Vault is a better solution than what Kubernetes and Swarm offer.

Even though Kubernetes can be made more secure with Vault and similar products, for now, we are evaluating secrets management that comes with Kubernetes and Docker Swarm. If we exclude third-party solutions, Docker Swarm has a clear advantage over Kubernetes. Its secrets are more secure by default. Even after tweaking Kubernetes (especially etcd), Docker Swarm is still more secure. That does not mean that secrets management with both products does not have a lot to be desired. Both have their shortcomings. However, I must proclaim Docker Swarm as a winner in this round. Its secrets are more secretive.

The DevOps 2.3 Toolkit: Kubernetes

The article you just read is an extract from The DevOps 2.3 Toolkit: Kubernetes.

The goal of the book is not to convince you to adopt Kubernetes but to provide a detailed overview of its features. I want you to become confident in your Kubernetes knowledge and only then choose whether to embrace it. That is, unless you already made up your mind and stumbled upon this book in search of Kubernetes guidance.

The book is about running containers at scale and not panicking when problems arise. It is about the present and the future of software deployment and monitoring. It’s about embracing the challenges and staying ahead of the curve.

Give it a try and let me know what you think.k.


7 thoughts on “Kubernetes Secrets Compared To Docker Swarm Secrets

  1. Pingback: Kubernetes Pods, ReplicaSets, And Services Compared To Docker Swarm Stacks | Technology Conversations

  2. Pingback: Kubernetes Deployments Compared To Docker Swarm Stacks | Technology Conversations

  3. Pingback: Kubernetes Ingress Compared To Docker Swarm Equivalent | Technology Conversations

  4. Pingback: Kubernetes ConfigMaps Compared To Docker Swarm Configs | Technology Conversations

  5. Pingback: Kubernetes Namespaces Compared To Docker Swarm Equivalent (If There Is Any) | Technology Conversations

  6. Pingback: Kubernetes RBAC Compared To Docker Swarm RBAC | Technology Conversations

  7. Pingback: Kubernetes Resource Management Compared To Docker Swarm Equivalent | Technology Conversations

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s