A) Workloads & Scheduling
A) Workloads & Scheduling
Weight : 8
1) For this question, please set this context (In exam, diff cluster name)
Create a new deployment named cache-deployment in the default namespace using a custom
image redis:7.0.13 . Ensure that the deployment has the following specifications:
Solution:-
—------------------------------------------------------------------------------------------------------------------------------------
Weight : 5
2) For this question, please set this context (In exam, diff cluster name)
Solution:-
spec:
containers:
- name: webapp-container
image: nginx:latest
env:
- name: APPLICATION
valueFrom:
configMapKeyRef:
name: webapp-deployment-config-map
key: APPLICATION
—------------------------------------------------------------------------------------------------------------------------------------
Weight : 2
3) For this question, please set this context (In exam, diff cluster name)
Solution:-
4) For this question, please set this context (In exam, diff cluster name)
Solution:-
containers:
env:
- name: DB_Host
valueFrom:
secretKeyRef:
name: db-secret
key: DB_Host
- name: DB_User
valueFrom:
secretKeyRef:
name: db-secret
key: DB_User
- name: DB_Password
valueFrom:
secretKeyRef:
name: db-secret
key: DB_Password
—------------------------------------------------------------------------------------------------------------------------------------
Weight : 5
5) For this question, please set this context (In exam, diff cluster name)
There is a issue in my-app-deployment.yaml manifest file, fix the issues, After fixing
make sure pod are running state.
Solution:-
resources:
requests:
memory: "1000Mi"
cpu: "5.0"
limits:
memory: "100Mi"
cpu: "0.5"
To- #give less than limit
resources:
requests:
memory: "100Mi"
cpu: "0.1"
limits:
memory: "100Mi"
cpu: "0.5"
Step 3: kubectl apply -f my-app-deployment.yaml
—------------------------------------------------------------------------------------------------------------------------------------
Weight : 4
6) For this question, please set this context (In exam, diff cluster name)
The deployment named video-app has experienced multiple rolling updates and
rollbacks. Your task is to total revision of this deployment and record the image
name used in 3rd revision to file app-file.txt in this format
REVISION_TOTAL_COUNT,IMAGE_NAME .
Solution:-
—------------------------------------------------------------------------------------------------------------------------------------
Weight : 2
7) For this question, please set this context (In exam, diff cluster name)
Fresher deployed a pod named my-pod . However, while specifying the resource
limits, they mistakenly given 100Mi storage limit instead of 50Mi
Solution:-
8) For this question, please set this context (In exam, diff cluster name)
Due to a missing feature in the current version. To resolve this issue, perform a
rollback of the deployment redis-deployment to the previous version. After rolling
back the deployment, save the image currently in use to the
rolling-back-image.txt file, and finally increase the replica count to 3 ."
Solution:-
—------------------------------------------------------------------------------------------------------------------------------------
Weight : 2
9) For this question, please set this context (In exam, diff cluster name)
—------------------------------------------------------------------------------------------------------------------------------------
Weight : 4
10) For this question, please set this context (In exam, diff cluster name)
You need to create a Kubernetes Pod and a Service to host a simple web
application that prints "Hello, World!" when accessed. Follow these steps:
Solution:-
Step 2: Create service kubectl expose pod app-pod --name=app-svc --port=80 --target-port=80
--type=ClusterIP
—------------------------------------------------------------------------------------------------------------------------------------
Weight : 4
11) For this question, please set this context (In exam, diff cluster name)
Create a pod named ubuntu-pod using the ubuntu image with the labels set to
app=os . Now, create a service named ubuntu-service to expose the ubuntu-pod
application within the cluster on port 8080 .
Solution:-
—------------------------------------------------------------------------------------------------------------------------------------