Docker + portainer vs k8. EILI5
I'm getting a solid grasps on docker with the help of portainer but i hear people using k8 talking about how it is like an os to use docker on, or that could be my misunderstanding. I guess my question is can someone reality dumb down an explanation of kubernetes and its relation/comparison to docker?
Sort by:
Best
Open comment sort options
Comments Section
K8s is short for Kubernetes, it's a container orchestration platform. It's a complex system but the basic idea is that you can run containers on multiple machines (nodes). This can help with scaling out applications and achieving High Availability (HA).
Current versions of K8s do not require docker to run, but nevertheless you can run OCI containers (sometimes referred to as docker containers).
Let me know if you have any questions.
Then how are Proxmox and Kuberneties different?
I've been working on a wiki to provide guides and resources on setting up your own K3s cluster, which is a flavor of Kubernetes that comes with a little less bloat by Rancher.
Docker is more like the lower level when it comes to container management. It's really good in development, but lacks lots of features and structure for production. It becomes harder to maintain an entire set of Docker containers and remote management isn't as easy either. Which is what Portainer is for but you often might end up accessing via SSH anyway.
Kubernetes builds on top of containers, including Docker as a possible runtime, to add all the tools to schedule and manage containers and workloads. Kubernetes has a couple of resource types you should be aware of, that help you deploy in a more scaled manner:
Namespaces: Organizational units you can use to separate your deployments. I have each deployment in its own namespace, so even if I named two pods the same, they can't clash with one another.
Pods: The smallest container unit in Kubernetes you can deploy. A pod can contain multiple containers, though, but these are akin to Docker/Docker Compose containers.
Deployment/StatefulSet/DaemonSet: These are Kubernetes workloads that handle the way they scale (replicate) pods in different ways. A Deployment simply creates replicas, while a StatefulSet assigns a new PVC to each pod, and DaemonSet ensures that a certain number of pods are running on each node.
Secret/ConfigMap: Using Secrets and ConfigMaps, you can add data, such as environment variables or configuration files to the cluster, and use them in your containers by mounting them as files or as environment variables.
Services: Since Kubernetes is built for scaling, you'll often be running more than one pod for a singular application. Services expose those pods' ports and take care of load-balancing for you.
An important aspect of Kubernetes is how it handles scaling. It's designed with multiple nodes in mind, and usually containers shouldn't care what node they're running on. Most modern apps that use block storage and external databases, or if you have distributed storage such as Longhorn, can be replicated multiple times or even a certain number of times per node, to spread the load between them.
Kubernetes also brings with it a massive ecosystem. A lot of the work has already been done in the Kubernetes space for you, so there are Kubernetes-native automation tools like ArgoCD and Flux, that monitor changes in Git repositories for your manifests (similar to
docker-compose.yml
files) and automatically apply them.There are also lots of controllers and operators for typical things you might want to do, such as Nginx with Cert Manager and Traefik, which is built-in with K3s.
Let me know if this helps and if you need any other advice before making the decision!
Wow, thank you for the incredible write up, this is a lot of great information. If you don't mind i'd like to describe my setup and see if you can help me understand if/where k3 would help me.
I'm running Proxmox on an NUC that has a few Linux VM's. Each VM has a different function, one to stream plex, one to service all the arrs software, one for my random utilities like recipe manager or uptime monitoring. In each VM i have docker and access it all via the web with portainer from local or a VPN. I run things via different vm's so i can dial in the usage need for each machine and segregation in case i mess something up. If i need to roll back to the latest backup i'm only doing it for a third or less of my running services.
With proxmox i know you can install it on other machines which has gotten me thinking about setting up a few cheap/used nuc from ebay through out the house to run rhasspy on with the added benefit of having a little bit of extra resources i could put the recipe manager or some other random service or two on it that wouldnt draw much load.
From your description it sounds like there is a place for k3 in all this mix and it may be a good solution to a self made problem but i'm open to suggestions on the best route to implement it.
This is perfectly explained. Only thing I have to add is: Kubernetes has a API.
You could also have a look at Nomad. It’s much more simple compared to k8s