Top Related Projects
Kubernetes中文指南/云原生应用架构实战手册
和我一步步部署 kubernetes 集群
Learning Kubernetes, The Chinese Taoist Way
Deploy a Production Ready Kubernetes Cluster
Aggregator for issues filed against kubeadm
Quick Overview
Kubernetes The Hard Way is a tutorial designed to bootstrap a Kubernetes cluster from scratch using virtual machines and without relying on any scripts or automation tools. It aims to provide a deep understanding of each component needed to create a Kubernetes cluster and how they work together.
Pros
- Provides in-depth knowledge of Kubernetes components and architecture
- Offers hands-on experience in setting up a production-ready Kubernetes cluster
- Enhances troubleshooting skills by requiring manual configuration
- Suitable for both beginners and experienced users looking to deepen their understanding
Cons
- Time-consuming process compared to automated tools
- Requires significant effort and attention to detail
- May not be suitable for quick deployments or production environments
- Needs regular updates to keep pace with Kubernetes releases
Getting Started
To begin with Kubernetes The Hard Way:
-
Clone the repository:
git clone https://github.com/kelseyhightower/kubernetes-the-hard-way.git
-
Navigate to the project directory:
cd kubernetes-the-hard-way
-
Follow the labs in order, starting with "Prerequisites":
cat docs/01-prerequisites.md
-
Complete each lab, carefully following the instructions and executing the provided commands.
Note: This tutorial is designed to be completed on Google Cloud Platform (GCP). Ensure you have a GCP account and the necessary tools installed before beginning.
Competitor Comparisons
Kubernetes中文指南/云原生应用架构实战手册
Pros of kubernetes-handbook
- Comprehensive coverage of Kubernetes concepts and components
- Available in multiple languages (Chinese and English)
- Regularly updated with the latest Kubernetes features and best practices
Cons of kubernetes-handbook
- Less hands-on approach compared to kubernetes-the-hard-way
- May be overwhelming for beginners due to its extensive content
- Lacks the step-by-step installation process for a production-ready cluster
Code Comparison
kubernetes-the-hard-way focuses on manual installation and configuration, while kubernetes-handbook provides more general information and examples. Here's a brief comparison of how they might describe setting up a pod:
kubernetes-the-hard-way:
kubectl run nginx --image=nginx
kubernetes-handbook:
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- name: nginx
image: nginx
kubernetes-the-hard-way emphasizes command-line operations, while kubernetes-handbook tends to use YAML manifests for resource definitions.
Both repositories serve different purposes: kubernetes-the-hard-way is designed for learning Kubernetes internals through manual setup, while kubernetes-handbook acts as a comprehensive reference guide for Kubernetes concepts and usage.
和我一步步部署 kubernetes 集群
Pros of follow-me-install-kubernetes-cluster
- Provides a more detailed, step-by-step guide in Chinese, making it accessible to a broader audience
- Includes additional components like Dashboard and Heapster for monitoring and visualization
- Offers more flexibility in terms of OS support, including CentOS and Ubuntu
Cons of follow-me-install-kubernetes-cluster
- Less frequently updated compared to kubernetes-the-hard-way
- May not always reflect the latest Kubernetes best practices or versions
- Documentation is primarily in Chinese, which may limit accessibility for non-Chinese speakers
Code Comparison
kubernetes-the-hard-way:
wget -q --show-progress --https-only --timestamping \
"https://github.com/etcd-io/etcd/releases/download/v3.4.10/etcd-v3.4.10-linux-amd64.tar.gz"
follow-me-install-kubernetes-cluster:
wget https://github.com/etcd-io/etcd/releases/download/v3.4.9/etcd-v3.4.9-linux-amd64.tar.gz
tar -xvf etcd-v3.4.9-linux-amd64.tar.gz
Both repositories provide instructions for downloading and installing etcd, but follow-me-install-kubernetes-cluster includes an additional step for extracting the downloaded archive.
Learning Kubernetes, The Chinese Taoist Way
Pros of kube-ladder
- Provides a structured learning path with multiple levels of difficulty
- Covers a broader range of Kubernetes topics, including advanced concepts
- Includes hands-on exercises and projects for practical experience
Cons of kube-ladder
- Less focused on the manual installation process of Kubernetes
- May not provide as detailed insights into the inner workings of Kubernetes components
- Written primarily in Chinese, which may be a barrier for non-Chinese speakers
Code Comparison
kubernetes-the-hard-way focuses on manual installation and configuration:
wget -q --show-progress --https-only --timestamping \
"https://github.com/etcd-io/etcd/releases/download/v3.4.15/etcd-v3.4.15-linux-amd64.tar.gz"
kube-ladder emphasizes practical exercises and projects:
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 3
selector:
matchLabels:
app: nginx
Both repositories aim to teach Kubernetes, but with different approaches. kubernetes-the-hard-way provides a deep dive into the manual setup process, offering valuable insights into the system's internals. kube-ladder, on the other hand, offers a more comprehensive curriculum covering various aspects of Kubernetes, from basics to advanced topics, with a focus on practical application through exercises and projects.
Deploy a Production Ready Kubernetes Cluster
Pros of Kubespray
- Automated deployment process, reducing manual effort and potential errors
- Supports multiple platforms and cloud providers out-of-the-box
- Regularly updated and maintained by the Kubernetes community
Cons of Kubespray
- Less educational value for understanding Kubernetes internals
- May abstract away important details, making troubleshooting more challenging
- Requires more complex setup and configuration for customization
Code Comparison
Kubernetes the Hard Way (manual setup):
wget -q --show-progress --https-only --timestamping \
"https://github.com/etcd-io/etcd/releases/download/v3.4.10/etcd-v3.4.10-linux-amd64.tar.gz"
tar -xvf etcd-v3.4.10-linux-amd64.tar.gz
sudo mv etcd-v3.4.10-linux-amd64/etcd* /usr/local/bin/
Kubespray (automated setup):
all:
vars:
ansible_user: ubuntu
ansible_become: true
kubespray_version: v2.15.0
kube_version: v1.20.7
Kubernetes the Hard Way provides a step-by-step manual approach, offering deep insights into Kubernetes components and their interactions. It's ideal for learning but time-consuming for production deployments. Kubespray, on the other hand, automates the process, making it more suitable for production environments but potentially obscuring some underlying details.
Aggregator for issues filed against kubeadm
Pros of kubeadm
- Easier and faster setup process for Kubernetes clusters
- Automated installation and configuration of components
- Regular updates and maintenance by the official Kubernetes project
Cons of kubeadm
- Less granular control over the cluster setup process
- May not provide as deep an understanding of Kubernetes internals
- Limited customization options for advanced configurations
Code Comparison
kubernetes-the-hard-way:
wget -q --show-progress --https-only --timestamping \
"https://github.com/etcd-io/etcd/releases/download/v3.4.10/etcd-v3.4.10-linux-amd64.tar.gz"
tar -xvf etcd-v3.4.10-linux-amd64.tar.gz
sudo mv etcd-v3.4.10-linux-amd64/etcd* /usr/local/bin/
kubeadm:
sudo apt-get update && sudo apt-get install -y apt-transport-https curl
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubelet kubeadm kubectl
The code snippets demonstrate the difference in setup complexity. kubernetes-the-hard-way requires manual downloading and installation of components, while kubeadm simplifies the process with package management tools.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Kubernetes The Hard Way
This tutorial walks you through setting up Kubernetes the hard way. This guide is not for someone looking for a fully automated tool to bring up a Kubernetes cluster. Kubernetes The Hard Way is optimized for learning, which means taking the long route to ensure you understand each task required to bootstrap a Kubernetes cluster.
The results of this tutorial should not be viewed as production ready, and may receive limited support from the community, but don't let that stop you from learning!
Copyright
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Target Audience
The target audience for this tutorial is someone who wants to understand the fundamentals of Kubernetes and how the core components fit together.
Cluster Details
Kubernetes The Hard Way guides you through bootstrapping a basic Kubernetes cluster with all control plane components running on a single node, and two worker nodes, which is enough to learn the core concepts.
Component versions:
- kubernetes v1.28.x
- containerd v1.7.x
- cni v1.3.x
- etcd v3.4.x
Labs
This tutorial requires four (4) ARM64 based virtual or physical machines connected to the same network. While ARM64 based machines are used for the tutorial, the lessons learned can be applied to other platforms.
- Prerequisites
- Setting up the Jumpbox
- Provisioning Compute Resources
- Provisioning the CA and Generating TLS Certificates
- Generating Kubernetes Configuration Files for Authentication
- Generating the Data Encryption Config and Key
- Bootstrapping the etcd Cluster
- Bootstrapping the Kubernetes Control Plane
- Bootstrapping the Kubernetes Worker Nodes
- Configuring kubectl for Remote Access
- Provisioning Pod Network Routes
- Smoke Test
- Cleaning Up
Top Related Projects
Kubernetes中文指南/云原生应用架构实战手册
和我一步步部署 kubernetes 集群
Learning Kubernetes, The Chinese Taoist Way
Deploy a Production Ready Kubernetes Cluster
Aggregator for issues filed against kubeadm
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot