Test your skills on Kubernetes

Test your skills on Kubernetes




Create a pod name "nginx" with image "nginx" under namespace "website-frontend"

Launch 7 replicas of redis image with label app_runtime_stage=test and deployment name "kual00201" and copy the json file to location. Finally cleanup.

Create pod as below:

- Name: non-persistent-redis

- Image: Redis

- PV name: app-cache

- MountPath: /data/redis

- Namespace: staging

Volume must not be persistent

Create a deployment:

name: nginx-test

service: nginx-test

Ensure the service and pod accessible via respective DNS records.

Image: nginx

Use "nslookup" to lookup the DNS records of the service and pod and save to a file.

Set the node named ek8s-node-0 as unavailable and reschedule all the pods running on it.

Investigate the node which is not is in NOT READY state.

Configure static pods.

Create a PV with name app-data of capacity 2Gi and access mode ReadWriteOnce with hostpath as /srv/app-data.

Label a node as app=test and verify.

Change the label for one of the pod to env=uat and list all the pods to verify.

Create 5 nginx pods in which two of them is labeled env=prod and three of them is labeled env=dev.

Create an nginx pod which loads the secret as environment variables.

List all the events sorted by timestamp and put them into file.log and verify.

Get all the pods with label "env".

Create a nginx pod with label env=test in engineering namespace.

List all the pods sorted by created timestamp.

Create a Pod with three busy box containers with commands "ls; sleep 3600;", 

"echo Hello World; sleep 3600;" and "echo this is the third container; sleep 3600" respectively and check the status.

Evict all existing pods from a node-1 and make the node unschedulable for new pods.

Create a Pod nginx and specify a CPU request and a CPU limit of 0.5 and 1 respectively.

Create a Pod nginx and specify both CPU, memory requests and limits together and verify.

Create a deployment named "myapp" that having 2 replicas with nginx image and expose deployment as service named "myservice".

Delete the pod without any delay (force delete).

Create a redis pod and expose it on port 6379.

Create a Cronjob with busybox image that prints date and hello from kubernetes cluster message for every minute.

Create a file called "config.txt" with two values key1=value1 and key2=value2. Then create a configmap named "keyvalcfgmap" andread data from the file

"config.txt" and verify that configmap is created correctly.

Verify certificate expiry date for ca certificate in /etc/kubernetes/pki.

Create the service as type NodePort with the port 32767 for the nginx pod with the pod selector app: my-nginx.

Create a deployment with "nginx-app" with image "nginx" 1.10.2-alpine and 2 replicas

  - Do a rolling update with version 1.13.0-alpine

  - Rollback the update to 1.10.2-alpine

Create a pod named kucc4 with single app container of each images nginx+redis+memcached


Comments

Popular posts from this blog

SRE/DevOps Syllabus

AWS Code Commit - CI/CD Series Part 1

Docker - Preventing IP overlapping