diff --git a/.github/workflows/validate-manifests.yml b/.github/workflows/validate-manifests.yml index 1c7df6b..51279e6 100644 --- a/.github/workflows/validate-manifests.yml +++ b/.github/workflows/validate-manifests.yml @@ -1,5 +1,12 @@ name: Validate Manifests -on: [push, pull_request] +on: + pull_request: + push: + branches: + - master + paths: + - '**/*.yaml' + - '**/*.yml' jobs: build: @@ -11,4 +18,4 @@ jobs: - name: Set up Kubeconform uses: bmuschko/setup-kubeconform@v1 - name: Validate Against Kubernetes Schema - run: kubeconform -kubernetes-version=1.28.3 -ignore-filename-pattern=.github/workflows -ignore-filename-pattern=.json$ -ignore-filename-pattern=kustomize -ignore-filename-pattern=helm -ignore-filename-pattern=yq -summary . + run: kubeconform -kubernetes-version=1.29.2 -ignore-filename-pattern=.github/workflows -ignore-filename-pattern=.json$ -ignore-filename-pattern=kustomize -ignore-filename-pattern=helm -ignore-filename-pattern=yq -summary . diff --git a/README.md b/README.md index 7496310..8f5a1aa 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ All [exercises](./exercises) are numbered and live in dedicated directories star * 💬 [Kubernetes Slack Channel #certifications](https://kubernetes.slack.com/) * 📚 [O'Reilly: Certified Kubernetes Administrator (CKA) Study Guide](https://learning.oreilly.com/library/view/certified-kubernetes-administrator/9781098107215/) -* 📚 [O'Reilly: Certified Kubernetes Application Developer (CKAD) Study Guide](https://learning.oreilly.com/library/view/certified-kubernetes-application/9781492083726/) +* 📚 [O'Reilly: Certified Kubernetes Application Developer (CKAD) Study Guide, 2nd Edition](https://learning.oreilly.com/library/view/certified-kubernetes-application/9781098152857/) * 📚 [Manning: Acing the Certified Kubernetes Administrator Exam](https://www.manning.com/books/acing-the-certified-kubernetes-administrator-exam) * 🎞️ [LinkedIn Learning: Certified Kubernetes Administrator (CKA) Cert Prep: The Basics](https://www.linkedin.com/learning/certified-kubernetes-administrator-cka-cert-prep-the-basics) * 🎞️ [KodeKloud: CKA Certification Course – Certified Kubernetes Administrator](https://kodekloud.com/p/certified-kubernetes-administrator-with-practice-tests) diff --git a/exercises/01-rbac/instructions.md b/exercises/01-rbac/instructions.md index d463c76..a97e469 100644 --- a/exercises/01-rbac/instructions.md +++ b/exercises/01-rbac/instructions.md @@ -16,7 +16,8 @@ The following image shows the high-level architecture. ![rbac](imgs/rbac.png) -> **_NOTE:_** If you do not already have a cluster, you can create one by using minikube or you can use the Katacoda lab ["Setting up RBAC for a user"](https://learning.oreilly.com/scenarios/cka-prep-setting/9781492095477/). +> [!NOTE] +> If you do not already have a cluster, you can create one by using minikube or you can use the Katacoda lab ["Setting up RBAC for a user"](https://learning.oreilly.com/scenarios/cka-prep-setting/9781492095477/). ## Creating the User diff --git a/exercises/02-install-cluster/instructions.md b/exercises/02-install-cluster/instructions.md index db9117d..f6bc203 100644 --- a/exercises/02-install-cluster/instructions.md +++ b/exercises/02-install-cluster/instructions.md @@ -12,7 +12,8 @@ In this exercise, you will learn how to create a cluster using kubeadm. The cluster will contain of a single control plane node named `kube-control-plane`, and two worker nodes named `kube-worker-1` and `kube-worker-2`. The existing setup uses virtual machines (VMs) to emulate the cluster environment. -> **_NOTE:_** The file [vagrant-setup.md](../common/vagrant-setup.md) describes the setup instructions and commands for Vagrant and VirtualBox. If you do not want to use the Vagrant environment, you can use the Katacoda lab ["Installing a Kubernetes cluster"](https://learning.oreilly.com/scenarios/cka-prep-installing/9781492095507/). +> [!NOTE] +> The file [vagrant-setup.md](../common/vagrant-setup.md) describes the setup instructions and commands for Vagrant and VirtualBox. If you do not want to use the Vagrant environment, you can use the Katacoda lab ["Installing a Kubernetes cluster"](https://learning.oreilly.com/scenarios/cka-prep-installing/9781492095507/). ## Initializing the Control Plane Node diff --git a/exercises/03-cluster-version-upgrade/instructions.md b/exercises/03-cluster-version-upgrade/instructions.md index 874479f..028d5e5 100644 --- a/exercises/03-cluster-version-upgrade/instructions.md +++ b/exercises/03-cluster-version-upgrade/instructions.md @@ -12,7 +12,8 @@ In this exercise, you will learn how to upgrade the cluster version from 1.22.0 to 1.23.4 using kubeadm. The cluster will contain of a single control plane node named `kube-control-plane`, and one worker node named `kube-worker-1`. The existing setup uses virtual machines (VMs) to emulate the cluster environment. -> **_NOTE:_** The file [vagrant-setup.md](../common/vagrant-setup.md) describes the setup instructions and commands for Vagrant and VirtualBox. If you do not want to use the Vagrant environment, you can use the Katacoda lab ["Upgrading a cluster version"](https://learning.oreilly.com/scenarios/cka-prep-upgrading/9781492095514/). +> [!NOTE] +> The file [vagrant-setup.md](../common/vagrant-setup.md) describes the setup instructions and commands for Vagrant and VirtualBox. If you do not want to use the Vagrant environment, you can use the Katacoda lab ["Upgrading a cluster version"](https://learning.oreilly.com/scenarios/cka-prep-upgrading/9781492095514/). ## Upgrading the Control Plane Node diff --git a/exercises/04-etcd-backup-restore/instructions.md b/exercises/04-etcd-backup-restore/instructions.md index 0463e5b..f9a1274 100644 --- a/exercises/04-etcd-backup-restore/instructions.md +++ b/exercises/04-etcd-backup-restore/instructions.md @@ -12,7 +12,8 @@ In this exercise, you will identify the configuration of the etcd database, back it up and restore the original database from a backup file. The command line tool `etcdctl` has already been pre-installed on the control plane node. -> **_NOTE:_** The file [vagrant-setup.md](../common/vagrant-setup.md) describes the setup instructions and commands for Vagrant and VirtualBox. If you do not want to use the Vagrant environment, you can use the Katacoda lab ["Backing up and restoring etcd"](https://learning.oreilly.com/scenarios/cka-prep-backing/9781492095521/). +> [!NOTE] +> The file [vagrant-setup.md](../common/vagrant-setup.md) describes the setup instructions and commands for Vagrant and VirtualBox. If you do not want to use the Vagrant environment, you can use the Katacoda lab ["Backing up and restoring etcd"](https://learning.oreilly.com/scenarios/cka-prep-backing/9781492095521/). 1. Shell into control plane node using the command `vagrant ssh kube-control-plane`. 2. Check that all nodes have been correctly registered and are in the "Ready" status. diff --git a/exercises/09-node-affinity/instructions.md b/exercises/09-node-affinity/instructions.md index a5c2a5c..1f21500 100644 --- a/exercises/09-node-affinity/instructions.md +++ b/exercises/09-node-affinity/instructions.md @@ -12,7 +12,8 @@ In this exercise, you will schedule a Pod on a specific node. The Pod should only be scheduled on nodes with the label with the key `color` and the assigned values `green` or `red`. -> **_NOTE:_** Refer to the file [multi-node-cluster-setup.md](../common/multi-node-cluster-setup.md) to configure a cluster with multiple nodes. +> [!NOTE] +> Refer to the file [multi-node-cluster-setup.md](../common/multi-node-cluster-setup.md) to configure a cluster with multiple nodes. 1. Inspect the existing nodes and their assigned labels. 2. Pick one available node and label it with the key-value pair `color=green`. Pick a second node and label it with the key-value pair `color=red`. diff --git a/exercises/10-taints-tolerations/instructions.md b/exercises/10-taints-tolerations/instructions.md index 26b8819..356bb9e 100644 --- a/exercises/10-taints-tolerations/instructions.md +++ b/exercises/10-taints-tolerations/instructions.md @@ -12,7 +12,8 @@ In this exercise, you will use the concept of taints and tolerations. First, you'll create a Pod. This Pod will be scheduled on one of the nodes. Next, you will add a taint to the node the Pod is running on and set a toleration effect that evicts the Pod from the node. -> **_NOTE:_** Refer to the file [multi-node-cluster-setup.md](../common/multi-node-cluster-setup.md) to configure a cluster with multiple nodes. +> [!NOTE] +> Refer to the file [multi-node-cluster-setup.md](../common/multi-node-cluster-setup.md) to configure a cluster with multiple nodes. 1. Define a Pod with the image `nginx` in the YAML manifest file `pod.yaml` 2. Create the Pod and check which node the Pod is running on. diff --git a/exercises/13-persistent-volume/dynamic-binding/instructions.md b/exercises/13-persistent-volume/dynamic-binding/instructions.md index 9986672..6265cde 100644 --- a/exercises/13-persistent-volume/dynamic-binding/instructions.md +++ b/exercises/13-persistent-volume/dynamic-binding/instructions.md @@ -12,7 +12,8 @@ In this exercise, you will create a PersistentVolume using dynamic binding and mount it to a Pod. -> **_NOTE:_** If you do not already have a cluster, you can create one by using minikube or you can use the Katacoda lab ["Creating a PersistentVolume via dynamic binding"](https://learning.oreilly.com/scenarios/cka-prep-creating/9781492099161/). +> [!NOTE] +> If you do not already have a cluster, you can create one by using minikube or you can use the Katacoda lab ["Creating a PersistentVolume via dynamic binding"](https://learning.oreilly.com/scenarios/cka-prep-creating/9781492099161/). 1. List all the storage class objects in the `default` namespace. 2. If you are trying out dynamic binding, then create a new storage class with appropriate settings for your Kubernetes environment. Name the storage class object `custom`. On Minikube, use the provisioner `k8s.io/minikube-hostpath`. Assign the annotation `storageclass.beta.kubernetes.io/is-default-class: "false"` and the label `addonmanager.kubernetes.io/mode: Reconcile`. diff --git a/exercises/14-troubleshooting-app/instructions.md b/exercises/14-troubleshooting-app/instructions.md index 9e092f0..0b9fdea 100644 --- a/exercises/14-troubleshooting-app/instructions.md +++ b/exercises/14-troubleshooting-app/instructions.md @@ -16,7 +16,8 @@ The following image shows the high-level architecture. ![app-architecture](imgs/app-architecture.png) -> **_NOTE:_** If you do not already have a cluster, you can create one by using minikube or you can use the Katacoda lab ["Troubleshooting a Deployment"](https://learning.oreilly.com/scenarios/cka-prep-troubleshooting/9781492099192/). +> [!NOTE] +> If you do not already have a cluster, you can create one by using minikube or you can use the Katacoda lab ["Troubleshooting a Deployment"](https://learning.oreilly.com/scenarios/cka-prep-troubleshooting/9781492099192/). ## Fixing the issue in namespace "gemini" diff --git a/exercises/15-troubleshooting-control-plane/instructions.md b/exercises/15-troubleshooting-control-plane/instructions.md index eda7d30..ce1a419 100644 --- a/exercises/15-troubleshooting-control-plane/instructions.md +++ b/exercises/15-troubleshooting-control-plane/instructions.md @@ -12,7 +12,8 @@ In this exercise, you will learn how to troubleshooting the underlying issue of a Deployment not being able to schedule its Pods. The cluster will contain of a single control plane node named `kube-control-plane`, and one worker node named `kube-worker-1`. The existing setup uses virtual machines (VMs) to emulate the cluster environment. -> **_NOTE:_** The file [vagrant-setup.md](../common/vagrant-setup.md) describes the setup instructions and commands for Vagrant and VirtualBox. If you do not want to use the Vagrant environment, you can use the Katacoda lab ["Troubleshooting a control plane node"](https://learning.oreilly.com/scenarios/cka-prep-troubleshooting/9781492099215/). +> [!NOTE] +> The file [vagrant-setup.md](../common/vagrant-setup.md) describes the setup instructions and commands for Vagrant and VirtualBox. If you do not want to use the Vagrant environment, you can use the Katacoda lab ["Troubleshooting a control plane node"](https://learning.oreilly.com/scenarios/cka-prep-troubleshooting/9781492099215/). 1. Check the status of the Deployment named `deploy` and its Pods. How many Pods have been scheduled? 2. Check the events of any of the Pods. diff --git a/exercises/16-troubleshooting-worker-node/instructions.md b/exercises/16-troubleshooting-worker-node/instructions.md index c937cc8..580f8be 100644 --- a/exercises/16-troubleshooting-worker-node/instructions.md +++ b/exercises/16-troubleshooting-worker-node/instructions.md @@ -12,7 +12,8 @@ In this exercise, you will learn how to troubleshooting the underlying issue of worker node. The cluster will contain of a single control plane node named `kube-control-plane`, and one worker node named `kube-worker-1`. The existing setup uses virtual machines (VMs) to emulate the cluster environment. -> **_NOTE:_** The file [vagrant-setup.md](../common/vagrant-setup.md) describes the setup instructions and commands for Vagrant and VirtualBox. If you do not want to use the Vagrant environment, you can use the Katacoda lab ["Troubleshooting a worker node"](https://learning.oreilly.com/scenarios/cka-prep-troubleshooting/9781492099222/). +> [!NOTE] +> The file [vagrant-setup.md](../common/vagrant-setup.md) describes the setup instructions and commands for Vagrant and VirtualBox. If you do not want to use the Vagrant environment, you can use the Katacoda lab ["Troubleshooting a worker node"](https://learning.oreilly.com/scenarios/cka-prep-troubleshooting/9781492099222/). 1. Check the status of the nodes. Do you see an issue? 2. Shell into the node having an issue and identify the root cause.