-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
446 changed files
with
6,626 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
# Course Introduction | ||
|
||
- Take me to the [Video Tutorial](https://kodekloud.com/courses/539883/lectures/9808050) | ||
|
||
#### This course focuses on Administration part of the kubernetes. | ||
|
||
## Course Structure | ||
|
||
- Lectures | ||
- Demos | ||
- Quizzes | ||
- Practice Questions | ||
- Q & A Section | ||
|
||
## Pre-Requisites | ||
|
||
- Docker | ||
- Basics of kubernetes | ||
- PODS, Deployments, Services ... | ||
- YAML | ||
- Setting up a basic lab environment with VirtualBox | ||
|
||
#### If you are a beginner we highly recommend Kubenetes for the Absolute Beginners Hands-On course | ||
|
||
- Take me to the [Kubenetes for the Absolute Beginners Hands-On Course](https://kodekloud.com/courses/enrolled/316262) | ||
|
||
## Course Objectives | ||
|
||
The objectives of this course are aligned to match the **`Certified Kubernetes Administration Exam (CKA)`** | ||
|
||
- Core Concepts | ||
- Cluster Architecture | ||
- API Primitives | ||
- Services & Other Network Primitives | ||
- Scheduling | ||
- Labels & Selectors | ||
- Daemon Sets | ||
- Resource Limits | ||
- Multiple Schedulers | ||
- Manual Scheduling | ||
- Scheduler Events | ||
- Configure Kubernetes Scheduler | ||
- Logging & Monitoring | ||
- Monitor Cluster Components | ||
- Monitor Cluster Components Logs | ||
- Monitor Applications | ||
- Application Logs | ||
- Application Lifecycle Management | ||
- Rolling Updates and Rollbacks in Deployments | ||
- Configuring Applications | ||
- Scale Applications | ||
- Self-Healing Applications | ||
- Cluster Maintenance | ||
- Cluster Upgrade Process | ||
- Operating System Upgrades | ||
- Backup and Restore Methodologies | ||
- Security | ||
- Authentication & Authorization | ||
- Kubernetes Security | ||
- Network Policies | ||
- TLS Certificates for Cluster Components | ||
- Image Security | ||
- Network Polices | ||
- Security Contexts | ||
- Secure Persistent Key Value Store | ||
- Storage | ||
- Persistent Volumes | ||
- Access Modes for Volumes | ||
- Persistent Volume Claims | ||
- Kubernetes Storage Object | ||
- Configure Applications with Persistent Storage | ||
- Networking | ||
- Pre-Requisites - Network, Switching, Routing, Tools | ||
- Pre-Requisites - Network Namespaces | ||
- Pre-Requisites - Networking in Docker | ||
- Networking Configuration on Cluster Nodes | ||
- Service Networking | ||
- POD Networking Concepts | ||
- Network Loadbalancer | ||
- Ingress | ||
- Cluster DNS | ||
- CNI | ||
- Installation, Configuration & Validation | ||
- Design a Kubernetes Cluster | ||
- Install Kubnernetes Master and Nodes | ||
- Secure Cluster Communication | ||
- HA Kubernetes Cluster | ||
- Kubenetes Release Binaries | ||
- Provision Infrastructure | ||
- Choose a Network Solution | ||
- Kubernetes Infrastructure Config | ||
- Run & Analyze end-to-end test | ||
- Node end-to-end tests | ||
- Troubleshooting | ||
- Application Failure | ||
- Control Plane Failure | ||
- Worker Node Failure | ||
- Networking | ||
|
||
## Practice Tests | ||
|
||
CKA exam is a practical hands-on exam it is very important to practice what you learn. Which is why we build a custom solution that will give you access to a **`Real Kubernetes Environment`** right in your browser along with **`Quiz Portal`** | ||
|
||
## Kubernetes the hardway | ||
|
||
- Take me to [Kubernetes The Hardway on VirtualBox](https://github.com/mmumshad/kubernetes-the-hard-way) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Certification | ||
|
||
- Take me to [Video Tutorial](https://kodekloud.com/courses/539883/lectures/9814246) | ||
|
||
## Certification Details | ||
|
||
- **`Certified Kubernetes Administrator`**: https://www.cncf.io/certification/cka/ | ||
|
||
- **`Exam Curriculum (Topics)`**: https://github.com/cncf/curriculum | ||
|
||
- **`Candidate Handbook`**: https://www.cncf.io/certification/candidate-handbook | ||
|
||
- **`Exam Tips`**: http://training.linuxfoundation.org/go//Important-Tips-CKA-CKAD | ||
|
||
#### Use the code - KUBERNETES15 - while registering for the CKA or CKAD exams at Linux Foundation to get a 15% discount. | ||
|
16 changes: 16 additions & 0 deletions
16
docs/02-Core-Concepts/01-Core-Concepts-Section-Introduction.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Core Concepts Section Introduction | ||
|
||
- Take me to the [Video Tutorial](https://kodekloud.com/courses/539883/lectures/9808147) | ||
|
||
In this section, we will take a look at the below | ||
- Cluster Architecture | ||
- API Primitives | ||
- Services & Other Network Primitives | ||
|
||
k8s reference docs: | ||
- https://kubernetes.io/docs/concepts/overview/kubernetes-api/ | ||
- https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/ | ||
- https://kubernetes.io/docs/concepts/architecture/ | ||
- https://kubernetes.io/docs/concepts/overview/components/ | ||
- https://kubernetes.io/docs/concepts/services-networking/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Cluster Architecture | ||
|
||
- Take me to [Video Tutorial](https://kodekloud.com/courses/539883/lectures/9808145) | ||
|
||
In this section , we will take a look at the kubernetes Architecture at high level. | ||
- 10,000 Feet Look at the Kubernetes Architecture | ||
|
||
![Kubernetes Architecture](../../images/k8s-arch.PNG) | ||
|
||
![Kubernetes Architecture 1](../../images/k8s-arch1.PNG) | ||
|
||
K8s Reference Docs: | ||
- https://kubernetes.io/docs/concepts/architecture/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# ETCD for Beginners | ||
- Take me to the [Video Tutorial](https://kodekloud.com/courses/539883/lectures/9808166) | ||
|
||
In this section, we will take a quick look at introduction to ETCD for beginners. | ||
- What is ETCD? | ||
- What is a Key-Value Store? | ||
- How to get started quickly with ETCD? | ||
- How to operate ETCD? | ||
|
||
## What is a ETCD? | ||
- ETCD is a distributed reliable key-value store that is simple, secure & Fast. | ||
## What is a Key-Value Store | ||
- Traditionally, databases have been in tabular format, you must have heared about SQL or Relational databases. They store data in rows and columns | ||
|
||
![relational-dbs](../../images/relational-dbs.PNG) | ||
|
||
- A Key-Value Store stores information in a Key and Value format. | ||
|
||
![key-value](../../images/key-value.PNG) | ||
|
||
![key-value1](../../images/key-value1.PNG) | ||
|
||
![key-value2](../../images/key-value2.PNG) | ||
|
||
![key-value3](../../images/key-value3.PNG) | ||
|
||
## Install ETCD | ||
- Its easy to install and get started with **`ETCD`**. | ||
- Download the relevant binary for your operating system from github releases page (https://github.com/etcd-io/etcd/releases) | ||
``` | ||
For Example: To download ETCD V3.3.11, run the below curl command | ||
$ https://github.com/etcd-io/etcd/releases/download/v3.3.11/etcd-v3.3.11-linux-amd64.tar.gz | ||
``` | ||
- Extract it. | ||
``` | ||
$ tar xvzf etcd-v3.3.11-linux-amd64.tar.gz | ||
``` | ||
- Run the ETCD Service | ||
``` | ||
$ ./etcd | ||
``` | ||
- When you start **`ETCD`** it will by default listens on port **`2379`** | ||
- The default client that comes with **`ETCD`** is the **`etcdct`** client. You can use it to store and retrieve key-value pairs. | ||
``` | ||
Syntax: To Store a Key-Value pair | ||
$ ./etcdctl set key1 value1 | ||
``` | ||
``` | ||
Syntax: To retrieve the stored data | ||
$ ./etcdctl get key1 | ||
``` | ||
``` | ||
Syntax: To view more commands. Run etcdctl without any arguments | ||
$ ./etcdctl | ||
``` | ||
![etcdctl](../../images/etcdctl.PNG) | ||
K8s Reference Docs: | ||
- https://kubernetes.io/docs/concepts/overview/components/ | ||
- https://etcd.io/docs/ | ||
- https://kubernetes.io/docs/tasks/administer-cluster/configure-upgrade-etcd/ | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# ETCD in Kubernetes | ||
- Take me to [Video Tutorial](https://kodekloud.com/courses/539883/lectures/9808160) | ||
|
||
In this section, we will take a look at ETCD role in kubernetes | ||
|
||
## ETCD Datastore | ||
- The ETCD Datastore stores information regarding the cluster such as **`Nodes`**, **`PODS`**, **`Configs`**, **`Secrets`**, **`Accounts`**, **`Roles`**, **`Bindings`** and **`Others`**. | ||
- Every information you see when you run the **`kubectl get`** command is from the **`ETCD Server`**. | ||
|
||
## Setup - Manual | ||
- If you setup your cluster from scratch then you deploy **`ETCD`** by downloading ETCD Binaries yourself | ||
- Installing Binaries and Configuring ETCD as a service in your master node yourself. | ||
``` | ||
$ wget -q --https-only "https://github.com/etcd-io/etcd/releases/download/v3.3.11/etcd-v3.3.11-linux-amd64.tar.gz" | ||
``` | ||
|
||
![etcd](../../images/etcd.PNG) | ||
|
||
## Setup - Kubeadm | ||
- If you setup your cluster using **`kubeadm`** then kubeadm will deploy etcd server for you as a pod in **`kube-system`** namespace. | ||
``` | ||
$ kubectl get pods -n kube-system | ||
``` | ||
![etcd1](../../images/etcd1.PNG) | ||
|
||
## Explore ETCD | ||
- To list all keys stored by kubernetes, run the below command | ||
``` | ||
$ kubectl exec etcd-master -n kube-system etcdctl get / --prefix -key | ||
``` | ||
- Kubernetes Stores data in a specific directory structure, the root directory is the **`registry`** and under that you have varies kubernetes constructs such as **`minions`**, **`nodes`**, **`pods`**, **`replicasets`**, **`deployments`**, **`roles`**, **`secrets`** and **`Others`**. | ||
|
||
![etcdctl1](../../images/etcdctl1.PNG) | ||
|
||
## ETCD in HA Environment | ||
- In a high availability environment, you will have multiple master nodes in your cluster that will have multiple ETCD Instances spread across the master nodes. | ||
- Make sure etcd instances know each other by setting the right parameter in the **`etcd.service`** configuration. The **`--initial-cluster`** option where you need to specify the different instances of the etcd service. | ||
![etcd-ha](../../images/etcd-ha.PNG) | ||
|
||
K8s Reference Docs: | ||
- https://kubernetes.io/docs/tasks/administer-cluster/configure-upgrade-etcd/ | ||
- https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/setup-ha-etcd-with-kubeadm/ | ||
- https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/high-availability/#stacked-control-plane-and-etcd-nodes | ||
- https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/high-availability/#external-etcd-nodes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Kube API Server | ||
- Take me to [Video Tutorial](https://kodekloud.com/courses/539883/lectures/9808163) | ||
|
||
In this section, we will talk about kube-apiserver in kubernetes | ||
|
||
#### Kube-apiserver is the primary component in kubernetes. | ||
- Kube-apiserver is responsible for **`authenticating`**, **`validating`** requests, **`retrieving`** and **`Updating`** data in ETCD key-value store. In fact kube-apiserver is the only component that interacts directly to the etcd datastore. The other components such as kube-scheduler, kube-controller-manager and kubelet uses the API-Server to update in the cluster in thier respective areas. | ||
|
||
![post](../../images/post.PNG) | ||
|
||
## Installing kube-apiserver | ||
|
||
- If you are bootstrapping kube-apiserver using **`kubeadm`** tool, then you don't need to know this, but if you are setting up using the hardway then kube-apiserver is available as a binary in the kubernetes release page. | ||
- For example: You can downlaod the kube-apiserver v1.13.0 binary here [kube-apiserver](https://storage.googleapis.com/kubernetes-release/release/v1.13.0/bin/linux/amd64/kube-apiserver) | ||
``` | ||
$ wget https://storage.googleapis.com/kubernetes-release/release/v1.13.0/bin/linux/amd64/kube-apiserver | ||
``` | ||
![kube-apiserver](../../images/kube-apiserver.PNG) | ||
## View kube-apiserver - Kubeadm | ||
- kubeadm deploys the kube-apiserver as a pod in kube-system namespace on the master node. | ||
``` | ||
$ kubectl get pods -n kube-system | ||
``` | ||
![kube-apiserver1](../../images/kube-apiserver1.PNG) | ||
## View kube-apiserver options - Kubeadm | ||
- You can see the options with in the pod defination file located at **`/etc/kubernetes/manifests/kube-apiserver.yaml`** | ||
``` | ||
$ cat /etc/kubernetes/manifests/kube-apiserver.yaml | ||
``` | ||
![kube-apiserver2](../../images/kube-apiserver2.PNG) | ||
## View kube-apiserver options - Manual | ||
- In a Non-kubeadm setup, you can inspect the options by viewing the kube-apiserver.service | ||
``` | ||
$ cat /etc/systemd/system/kube-apiserver.service | ||
``` | ||
![kube-apiserver3](../../images/kube-apiserver3.PNG) | ||
- You can also see the running process and affective options by listing the process on master node and searching for kube-apiserver. | ||
``` | ||
$ ps -aux |grep kube-apiserver | ||
``` | ||
![kube-apiserver4](../../images/kube-apiserver4.PNG) | ||
K8s Reference Docs: | ||
- https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/ | ||
- https://kubernetes.io/docs/concepts/overview/components/ | ||
- https://kubernetes.io/docs/concepts/overview/kubernetes-api/ | ||
- https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/ | ||
- https://kubernetes.io/docs/tasks/administer-cluster/access-cluster-api/ |
Oops, something went wrong.