Skip to content

Jake-Mok-Nelson/kubernetes-course

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Lesson Plan: Introduction to Kubernetes for Software and Platform Engineers

Expected Knowledge

If you don't have all of these or you feel you aren't proficient, don't worry. Some of these are more important than others but only a basic understanding of each is assumed.

Container Basics: Participants should have a good understanding of containerization concepts and technologies, such as Docker. They should know how to create, manage, and run containerized applications.

  • Linux Command Line: Some familiarity with the Linux command line is essential.
  • Networking Fundamentals: A grasp of networking concepts like IP addresses, ports, and DNS.
  • Cloud Concepts: Basic knowledge of cloud computing platforms like AWS, Azure, or Google Cloud.
  • System Architecture: A general understanding of system architecture, including concepts like servers, virtualization, and storage.
  • Version Control: Experience with version control systems like Git is useful, as it's often employed to manage Kubernetes configuration files and manifests.
  • Basic DevOps Principles: A basic understanding of DevOps principles, such as continuous integration and continuous deployment (CI/CD).

Lesson 1: Understanding Kubernetes Fundamentals

Objectives:

  • Define what Kubernetes is and its significance in modern application deployment.
  • Understand key Kubernetes concepts, including containers, nodes, clusters, and pods.

Topics Covered:

  1. What is Kubernetes?

    • Definition and significance
    • Evolution of container orchestration
  2. Kubernetes Architecture

    • Nodes: Master and Worker
    • Clusters
  3. Pods: The smallest deployable unit

Activities:

  • Presentation and discussion of Kubernetes fundamentals.
  • Q&A session to clarify concepts.

Lesson 2: Setting Up Your Kubernetes Environment

Objectives:

  • Set up a local Kubernetes environment using Minikube or Kind
  • Understand the role of kubectl in managing Kubernetes clusters.
  • Explore basic kubectl commands.

Topics Covered:

  1. Installing Minikube/Kind

    • Local Kubernetes for development
    • Minikube/Kind vs. production clusters
    • Connecting to Google Kubernetes Engine (GKE)
  2. Introduction to kubectl

    • Basic commands (get, create, delete)
    • Interacting with Kubernetes resources (pods, services)

Activities:

  • Guided installation of Minikube/Kind.
  • Hands-on exercises with kubectl to manage basic Kubernetes resources.
  • Troubleshooting common setup issues.

Lesson 3: Deploying Applications with Kubernetes

Objectives:

  • Learn how to create and manage deployments.
  • Explore scaling and updating applications.
  • Understand services for network access.

Topics Covered:

  1. Deployments

    • Creating deployments
    • Rolling updates and rollbacks
  2. Scaling Applications

    • Manual and automatic scaling
    • Horizontal and vertical scaling
  3. Services

    • Exposing applications within and outside the cluster
    • Service types (ClusterIP, NodePort, LoadBalancer)

Activities:

  • Hands-on exercises to create deployments and scale applications.
  • Creating and testing services for application access.

Lesson 4: Advanced Deployment Strategies

Objectives:

  • Understand advanced deployment strategies using ReplicaSets.
  • Learn how to manage application scaling and fault tolerance.

Topics Covered:

  1. Introduction to ReplicaSets

    • Purpose and use cases
    • Comparison with Deployments
  2. Rolling Updates with ReplicaSets

    • Performing updates without downtime
    • Rollback strategies
  3. Canary Deployments

    • Deploying new versions incrementally
    • Monitoring and analysis

Activities:

  • Hands-on exercises with ReplicaSets to perform rolling updates and canary deployments.

Lesson 5: DaemonSets and Configuration

Objectives:

  • Explore specialized workloads using DaemonSets.
  • Understand when and why to use DaemonSets in Kubernetes.

Topics Covered:

  1. Introduction to DaemonSets

    • What are DaemonSets?
    • Use cases for DaemonSets
  2. What are Configmaps?

  • Use cases for Configmaps
  • How to use ConfigMaps

Activities:

  • Practical examples of using DaemonSets for node-level services and network infrastructure.
  • Configuration of a pod with ConfigMaps

Lesson 6: Managing Configuration and Secrets

Objectives:

  • Understand ConfigMaps and Secrets for managing configuration data.
  • Learn how to inject configuration into pods.

Topics Covered:

  1. ConfigMaps

    • Managing configuration data
    • Configuring pods with ConfigMaps
  2. Secrets

    • Storing sensitive data
    • Using Secrets in pods

Activities:

  • Hands-on exercises to create and use ConfigMaps and Secrets.
  • Discuss best practices for managing sensitive information.

Lesson 7: Operators and Controllers in Kubernetes

Objectives:

  • Understand the role of Operators and Controllers in Kubernetes.
  • Learn how to use custom resource definitions (CRDs) to manage complex applications.

Topics Covered:

  1. Introduction to Operators

    • What are Operators?
    • Operator Frameworks (e.g., Operator SDK)
  2. Controllers in Kubernetes

    • Role and responsibilities of controllers
    • Common controllers (e.g., ReplicaSet, Deployment)
  3. Custom Resource Definitions (CRDs)

    • Defining custom resources
    • Building custom controllers with CRDs

Activities:

  • Practical exercises with Operators to manage complex applications.
  • Creating and working with custom resources and controllers using CRDs.

Lesson 8: Monitoring and Logging in Kubernetes

Objectives:

  • Explore Kubernetes tools and best practices for monitoring and logging.
  • Understand the importance of observability in containerized environments.

Topics Covered:

  1. Monitoring with Prometheus

    • Installing Prometheus
    • Setting up alerts and dashboards
  2. Logging with Fluentd and Elasticsearch

    • Collecting and aggregating logs
    • Visualization with Kibana

Activities:

  • Setting up Prometheus and Grafana for monitoring.
  • Configuring Fluentd and Elasticsearch for log collection and analysis.

Lesson 9: Managing Kubernetes in Production

Objectives:

  • Learn about best practices for managing Kubernetes clusters in a production environment.
  • Explore topics like high availability, disaster recovery, and security.

Topics Covered:

  1. High Availability (HA) in Kubernetes

    • Cluster-level HA strategies
    • Node failures and resilience
  2. Disaster Recovery

    • Backup and restore strategies
    • Application-level redundancy
  3. Security Best Practices

    • Role-Based Access Control (RBAC)
    • Pod security policies

Activities:

  • Discussion and brainstorming on implementing HA, disaster recovery, and security measures in Kubernetes.

Lesson 10: Future Trends and Advanced Topics

Objectives:

  • Explore emerging trends and advanced Kubernetes topics.
  • Discuss serverless computing, Istio for service mesh, and GitOps.

Topics Covered:

  1. Serverless Computing with Knative

    • Introduction to Knative
    • Building serverless applications
  2. Service Mesh with Istio

    • What is a service mesh?
    • Istio features and use cases
  3. GitOps and Kubernetes

    • Introduction to GitOps
    • Implementing GitOps workflows

Activities:

  • Presentation and discussion on advanced Kubernetes topics.
  • Exploring hands-on examples of Knative, Istio, and GitOps.

Lesson 11: Final Projects and Presentations

Objectives:

  • Apply knowledge gained throughout the course to create and present Kubernetes projects.
  • Receive feedback from peers and instructors.

Activities:

  • Students work on Kubernetes projects (e.g., deploying complex applications, optimizing Kubernetes clusters).
  • Project presentations and peer feedback sessions.

Conclusion and Graduation

Objectives:

  • Summarize key takeaways from the course.
  • Provide resources for further learning and certification.

Activities:

  • Course review and Q&A session.
  • Sharing additional resources for Kubernetes certification and advanced topics.

About

My Kubernetes lessons and exercises

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published