- Prepare a cluster (Single node, kubeadm, k3s, etc)
- Open browser tabs to https://kubernetes.io/docs/, https://github.com/kubernetes/ and https://kubernetes.io/blog/ (these are permitted as per the current guidelines)
- Ensure your etcd nodes have
etcdctl
installed
--- | |
apiVersion: opstreelabs.in/v1alpha1 | |
kind: MongoDBCluster | |
metadata: | |
name: mongodb | |
spec: | |
clusterSize: 3 | |
kubernetesConfig: | |
image: quay.io/opstree/mongo:v5.0 | |
imagePullPolicy: IfNotPresent |
job "iis-test" { | |
datacenters = ["dc1"] | |
type = "service" | |
group "iis-test" { | |
count = 1 | |
restart { | |
attempts = 10 | |
interval = "5m" | |
delay = "25s" |
- Prepare a cluster (Single node, kubeadm, k3s, etc)
- Open browser tabs to https://kubernetes.io/docs/, https://github.com/kubernetes/ and https://kubernetes.io/blog/ (these are permitted as per the current guidelines)
Note: Leverage the docs to help you. It's unlikey you will need to recall the nuances from memory - https://kubernetes.io/docs/concepts/storage/storage-classes/
- Prepare a cluster (Single node, kubeadm, k3s, etc)
- Open browser tabs to https://kubernetes.io/docs/, https://github.com/kubernetes/ and https://kubernetes.io/blog/ (these are permitted as per the current guidelines)
- Deploy the following manifest
- Prepare a cluster (Single node, kubeadm, k3s, etc)
- Open browser tabs to https://kubernetes.io/docs/, https://github.com/kubernetes/ and https://kubernetes.io/blog/ (these are permitted as per the current guidelines)
- Create a deployment object consisting of 6 pods, each containing a single
nginx:1.19.5
container
A third party application requires access to describe ingress
objects that reside in a namespace called rbac
. Perform the following:
- Create a namespace called
rbac
- Create a service account called
job-inspector
for therbac
namespace - Create a role that ha rules to
get
andlist
job objects - Create a rolebinding that binds the service account
job-inspector
to the role created in step 3
The Lab guide, where feasible will presnt both imperative and declarative answers to address a question. Outside the exam, we should opreate in a Declarative manner. During the exam, however, time is an expensive commodity. Therefore, if you can, try and be as imperative as possible to save time.
At time of writing, https://kubernetes.io/docs/, https://github.com/kubernetes/ and https://kubernetes.io/blog/ are permitted to be used during the exam as per the current guidelines. If you need to get boiletplate YAML manifests to address an exam question, feel free to get them from here. The key is to know what to search for.
In this lab we will migrate our MS to a dev namespace so that we can limit them in terms of cluster resources usage:
- Create a namespace dev
- Put resource limit on your Namespace
- CPU: 500 - 1000 millicore
- Memory: 500 - 1500 MB
- Restrict this namespace to not have more than 10 pods
- Deploy your MS
- MySQL: 200 millicore, (100-500) MB memory
Problem Statement:-
In this lab, we will use liveness and readiness probes to ensure that k8s to handle the availability of microservices. Implement readiness & liveness for all of our microservice:
- Salary, Employee, Attendance, Gateway
- Identify the difference in deployment with and without readiness probe
By the end of this lab, you will have a clear understanding of probes and how important a role they play in a fully functional app.