SIMULATION
Score: 4%

Context
You have been asked to create a new ClusterRole for a deployment pipeline and bind it to a specific ServiceAccount scoped to a specific namespace.
Task
Create a new ClusterRole named deployment-clusterrole, which only allows to create the following resource types:
* Deployment
* StatefulSet
* DaemonSet
Create a new ServiceAccount named cicd-token in the existing namespace app-team1.
Bind the new ClusterRole deployment-clusterrole lo the new ServiceAccount cicd-token , limited to the namespace app-team1.
Solution:
Task should be complete on node k8s -1 master, 2 worker for this connect use command
[student@node-1] > ssh k8s
kubectl create clusterrole deployment-clusterrole --verb=create --resource=deployments,statefulsets,daemonsets
kubectl create serviceaccount cicd-token --namespace=app-team1
kubectl create rolebinding deployment-clusterrole --clusterrole=deployment-clusterrole --serviceaccount=default:cicd-token --namespace=app-team1
SIMULATION
Quick Reference
ConfigMaps,
Documentation Deployments,
Namespace
You must connect to the correct host . Failure to do so may result in a zero score.
[candidate@base] $ ssh cka000048b
Task
An NGINX Deployment named nginx-static is running in the nginx-static namespace. It is configured using a ConfigMap named nginx-config .
First, update the nginx-config ConfigMap to also allow TLSv1.2. connections.
You may re-create, restart, or scale resources as necessary.
You can use the following command to test the changes:
[candidate@cka000048b] $ curl -- tls-max
1.2 https://web.k8s.local
Task Summary
SSH into cka000048b
Update the nginx-config ConfigMap in the nginx-static namespace to allow TLSv1.2
Ensure the nginx-static Deployment picks up the new config
Verify the change using the provided curl command
Step-by-Step Instructions
Step 1: SSH into the correct host
ssh cka000048b
Step 2: Get the ConfigMap
kubectl get configmap nginx-config -n nginx-static -o yaml > nginx-config.yaml
Open the file for editing:
nano nginx-config.yaml
Look for the TLS configuration in the data field. You are likely to find something like:
ssl_protocols TLSv1.3;
Modify it to include TLSv1.2 as well:
ssl_protocols TLSv1.2 TLSv1.3;
Save and exit the file.
Now update the ConfigMap:
kubectl apply -f nginx-config.yaml
Step 3: Restart the NGINX pods to pick up the new ConfigMap
Pods will not reload a ConfigMap automatically unless it's mounted in a way that supports dynamic reload and the app is watching for it (NGINX typically doesn't by default).
The safest way is to restart the pods:
Option 1: Roll the deployment
kubectl rollout restart deployment nginx-static -n nginx-static
Option 2: Delete pods to force recreation
kubectl delete pod -n nginx-static -l app=nginx-static
Step 4: Verify using curl
Use the provided curl command to confirm that TLS 1.2 is accepted:
curl --tls-max 1.2 https://web.k8s.local
A successful response means the TLS configuration is correct.
Final Command Summary
ssh cka000048b
kubectl get configmap nginx-config -n nginx-static -o yaml > nginx-config.yaml
nano nginx-config.yaml # Modify to include 'ssl_protocols TLSv1.2 TLSv1.3;'
kubectl apply -f nginx-config.yaml
kubectl rollout restart deployment nginx-static -n nginx-static
# or
kubectl delete pod -n nginx-static -l app=nginx-static
curl --tls-max 1.2 https://web.k8s.local
SIMULATION
Print pod name and start time to ''/opt/pod-status'' file
kubect1 get pods -o=jsonpath='{range
items[*]}{.metadata.name}{'\t'}{.status.podIP}{'\n'}{end}'
SIMULATION
Score: 4%

Task
Create a pod named kucc8 with a single app container for each of the following images running inside (there may be between 1 and 4 images specified): nginx + redis + memcached .
Solution:
kubectl run kucc8 --image=nginx --dry-run -o yaml > kucc8.yaml
# vi kucc8.yaml
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
name: kucc8
spec:
containers:
- image: nginx
name: nginx
- image: redis
name: redis
- image: memcached
name: memcached
- image: consul
name: consul
#
kubectl create -f kucc8.yaml
#12.07
SIMULATION
Create a deployment as follows:
Name: nginx-app
Using container nginx with version 1.11.10-alpine
The deployment should contain 3 replicas
Next, deploy the application with new version 1.11.13-alpine, by performing a rolling update.
Finally, rollback that update to the previous version 1.11.10-alpine.
solution



Daniel Mitchell
21 days agoJennifer Stewart
26 days agoRonald Bell
1 month agoAngela Morris
22 days agoJessica Johnson
20 days agoSteven Williams
28 days agoMaria Torres
24 days agoSharon Edwards
1 month agoRory
2 months agoVashti
2 months agoDorathy
3 months agoBillye
3 months agoHillary
3 months agoCarlee
3 months agoLaurene
4 months agoRobt
4 months agoLenna
4 months agoAyesha
4 months agoElfrieda
5 months agoLynelle
5 months agoUla
5 months agoWilda
5 months agoErnest
6 months agoLettie
6 months agoColeen
6 months agoNoel
6 months agoRuthann
7 months agoMartina
7 months agoHolley
7 months agoTy
7 months agoCatherin
8 months agoJaney
8 months agoAdela
8 months agoMerissa
8 months agoJaime
9 months agoGerald
9 months agoAnjelica
9 months agoAlberto
11 months agoLottie
1 year agoRossana
1 year agoChantell
1 year agoLai
1 year agoKanisha
1 year agoAlonzo
1 year agoBernadine
1 year agoTresa
2 years agoRochell
2 years agoElvera
2 years agoShawnta
2 years agoOsvaldo
2 years agoNgoc
2 years agoRyan
2 years agoDaren
2 years agoJustine
2 years agoGeraldine
2 years agoDominque
2 years agoDyan
2 years agoRozella
2 years agoRoosevelt
2 years agoLoren
2 years agoNorah
2 years agorimoha Kellis
2 years ago