Need advice about which tool to choose?Ask the StackShare community!

Kubernetes

61.1K
52.7K
+ 1
685
Packer

587
566
+ 1
41
Add tool

Kubernetes vs Packer: What are the differences?

Introduction

Kubernetes and Packer are both widely used tools in the DevOps world. While they serve different purposes, they both contribute to the automation and management of infrastructure. However, there are some key differences between the two.

  1. Scalability: One major difference between Kubernetes and Packer is their focus on scalability. Kubernetes is primarily designed for managing containers and orchestrating their deployment, scaling, and management across a cluster of nodes. On the other hand, Packer is a tool for creating machine images or virtual machine templates. It allows you to build scalable, identical machine images for different platforms, including virtual machines, containers, and cloud providers.

  2. Abstraction Level: Another key difference between Kubernetes and Packer is their level of abstraction. Kubernetes operates at a higher level of abstraction, providing a container orchestration platform that abstracts away the underlying infrastructure details. It focuses on managing applications running in containers. On the other hand, Packer operates at a lower level of abstraction, allowing you to define and customize machine images or templates for different platforms. It provides more control over the infrastructure stack.

  3. Purpose: Kubernetes is primarily used for deploying and managing containerized applications at scale. It provides features like automatic scaling, service discovery, load balancing, and self-healing. Packer, on the other hand, is used for creating machine images or templates that are used as a base for deploying applications or infrastructure. It allows you to define and provision software, dependencies, and configuration as part of the image creation process.

  4. Focus: Kubernetes focuses on container orchestration and management, providing features like pod management, service discovery, and load balancing. It simplifies the deployment and scaling of containerized applications. Packer, on the other hand, focuses on the image creation process, allowing you to define and provision the software stack, dependencies, and configurations for the image. It aims to provide a consistent base image for deployment.

  5. Deployment Targets: Kubernetes is designed to be platform-agnostic and can be used to deploy containers across various cloud providers or on-premises infrastructure. It provides a unified API to manage the deployment and scaling of containerized applications. Packer, on the other hand, supports a wide range of deployment targets, including virtual machines, containers, and cloud platforms. It allows you to create machine images or templates that can be used on different infrastructure providers.

  6. Workflow: The workflow of Kubernetes and Packer differs significantly. Kubernetes focuses on automating the deployment, scaling, and management of containerized applications. It provides declarative configuration files (YAML or JSON) to define the desired state of the infrastructure. Packer, on the other hand, follows an imperative workflow, where you define the steps and configurations needed to build the machine image. It supports various builders and provisioners to customize the image creation process.

In summary, Kubernetes is a container orchestration platform that focuses on managing containerized applications at scale, while Packer is a tool for creating machine images or templates that can be used as a base for deploying applications or infrastructure. Kubernetes operates at a higher level of abstraction and provides extensive automation and management capabilities, while Packer allows for more control over the image creation process and supports various deployment targets.

Decisions about Kubernetes and Packer
Simon Reymann
Senior Fullstack Developer at QUANTUSflow Software GmbH · | 30 upvotes · 12.7M views

Our whole DevOps stack consists of the following tools:

  • GitHub (incl. GitHub Pages/Markdown for Documentation, GettingStarted and HowTo's) for collaborative review and code management tool
  • Respectively Git as revision control system
  • SourceTree as Git GUI
  • Visual Studio Code as IDE
  • CircleCI for continuous integration (automatize development process)
  • Prettier / TSLint / ESLint as code linter
  • SonarQube as quality gate
  • Docker as container management (incl. Docker Compose for multi-container application management)
  • VirtualBox for operating system simulation tests
  • Kubernetes as cluster management for docker containers
  • Heroku for deploying in test environments
  • nginx as web server (preferably used as facade server in production environment)
  • SSLMate (using OpenSSL) for certificate management
  • Amazon EC2 (incl. Amazon S3) for deploying in stage (production-like) and production environments
  • PostgreSQL as preferred database system
  • Redis as preferred in-memory database/store (great for caching)

The main reason we have chosen Kubernetes over Docker Swarm is related to the following artifacts:

  • Key features: Easy and flexible installation, Clear dashboard, Great scaling operations, Monitoring is an integral part, Great load balancing concepts, Monitors the condition and ensures compensation in the event of failure.
  • Applications: An application can be deployed using a combination of pods, deployments, and services (or micro-services).
  • Functionality: Kubernetes as a complex installation and setup process, but it not as limited as Docker Swarm.
  • Monitoring: It supports multiple versions of logging and monitoring when the services are deployed within the cluster (Elasticsearch/Kibana (ELK), Heapster/Grafana, Sysdig cloud integration).
  • Scalability: All-in-one framework for distributed systems.
  • Other Benefits: Kubernetes is backed by the Cloud Native Computing Foundation (CNCF), huge community among container orchestration tools, it is an open source and modular tool that works with any OS.
See more
Manage your open source components, licenses, and vulnerabilities
Learn More
Pros of Kubernetes
Pros of Packer
  • 166
    Leading docker container management solution
  • 130
    Simple and powerful
  • 108
    Open source
  • 76
    Backed by google
  • 58
    The right abstractions
  • 26
    Scale services
  • 20
    Replication controller
  • 11
    Permission managment
  • 9
    Supports autoscaling
  • 8
    Cheap
  • 8
    Simple
  • 7
    Self-healing
  • 5
    Open, powerful, stable
  • 5
    Promotes modern/good infrascture practice
  • 5
    Reliable
  • 5
    No cloud platform lock-in
  • 4
    Scalable
  • 4
    Quick cloud setup
  • 3
    Cloud Agnostic
  • 3
    Custom and extensibility
  • 3
    A self healing environment with rich metadata
  • 3
    Captain of Container Ship
  • 3
    Backed by Red Hat
  • 3
    Runs on azure
  • 2
    Expandable
  • 2
    Sfg
  • 2
    Everything of CaaS
  • 2
    Gke
  • 2
    Golang
  • 2
    Easy setup
  • 27
    Cross platform builds
  • 8
    Vm creation automation
  • 4
    Bake in security
  • 1
    Easy to use
  • 1
    Good documentation

Sign up to add or upvote prosMake informed product decisions

Cons of Kubernetes
Cons of Packer
  • 16
    Steep learning curve
  • 15
    Poor workflow for development
  • 8
    Orchestrates only infrastructure
  • 4
    High resource requirements for on-prem clusters
  • 2
    Too heavy for simple systems
  • 1
    Additional vendor lock-in (Docker)
  • 1
    More moving parts to secure
  • 1
    Additional Technology Overhead
    Be the first to leave a con

    Sign up to add or upvote consMake informed product decisions

    What is Kubernetes?

    Kubernetes is an open source orchestration system for Docker containers. It handles scheduling onto nodes in a compute cluster and actively manages workloads to ensure that their state matches the users declared intentions.

    What is Packer?

    Packer automates the creation of any type of machine image. It embraces modern configuration management by encouraging you to use automated scripts to install and configure the software within your Packer-made images.

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use Kubernetes?
    What companies use Packer?
    Manage your open source components, licenses, and vulnerabilities
    Learn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with Kubernetes?
    What tools integrate with Packer?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    Blog Posts

    Kubernetesetcd+2
    2
    1265
    Dec 8 2020 at 5:50PM

    DigitalOcean

    GitHubMySQLPostgreSQL+11
    2
    2550
    PythonDockerKubernetes+7
    3
    1239
    May 21 2020 at 12:02AM

    Rancher Labs

    KubernetesAmazon EC2Grafana+12
    5
    1609
    Apr 16 2020 at 5:34AM

    Rancher Labs

    KubernetesRancher+2
    2
    1032
    What are some alternatives to Kubernetes and Packer?
    Docker Swarm
    Swarm serves the standard Docker API, so any tool which already communicates with a Docker daemon can use Swarm to transparently scale to multiple hosts: Dokku, Compose, Krane, Deis, DockerUI, Shipyard, Drone, Jenkins... and, of course, the Docker client itself.
    Nomad
    Nomad is a cluster manager, designed for both long lived services and short lived batch processing workloads. Developers use a declarative job specification to submit work, and Nomad ensures constraints are satisfied and resource utilization is optimized by efficient task packing. Nomad supports all major operating systems and virtualized, containerized, or standalone applications.
    OpenStack
    OpenStack is a cloud operating system that controls large pools of compute, storage, and networking resources throughout a datacenter, all managed through a dashboard that gives administrators control while empowering their users to provision resources through a web interface.
    Rancher
    Rancher is an open source container management platform that includes full distributions of Kubernetes, Apache Mesos and Docker Swarm, and makes it simple to operate container clusters on any cloud or infrastructure platform.
    Docker Compose
    With Compose, you define a multi-container application in a single file, then spin your application up in a single command which does everything that needs to be done to get it running.
    See all alternatives