Create a Kubernetes secret as follows:
Name: super-secret
password: bob
Create a pod named pod-secrets-via-file, using the redis Image, which mounts a secret named super-secret at /secrets.
Create a second pod named pod-secrets-via-env, using the redis Image, which exports password as
CONFIDENTIAL
Solution:
solution
F:WorkData Entry WorkData Entry20200827CKA12 B.JPG
F:WorkData Entry WorkData Entry20200827CKA12 C.JPG
F:WorkData Entry WorkData Entry20200827CKA12 D.JPG
Does this meet the goal?
Correct Answer:
A
Create a namespace called 'development' and a pod with image nginx called nginx on this namespace.
Solution:
kubectl create namespace development
kubectl run nginx --image=nginx --restart=Never -n development
Does this meet the goal?
Correct Answer:
A
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:
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
Does this meet the goal?
Correct Answer:
A
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:
solution
F:WorkData Entry WorkData Entry20200827CKA7 B.JPG
F:WorkData Entry WorkData Entry20200827CKA7 C.JPG
F:WorkData Entry WorkData Entry20200827CKA7 D.JPG
Does this meet the goal?
Correct Answer:
A
Given a partially-functioning Kubernetes cluster, identify symptoms of failure on the cluster.
Determine the node, the failing service, and take actions to bring up the failed service and restore the health of the cluster. Ensure that any changes are made permanently.
You can ssh to the relevant I nodes (bk8s-master-0 or bk8s-node-0) using:
[student@node-1] $ ssh
You can assume elevated privileges on any node in the cluster with the following command:
[student@nodename] $ | sudo –i
Solution:
solution
F:WorkData Entry WorkData Entry20200827CKA23 C.JPG
F:WorkData Entry WorkData Entry20200827CKA23 D.JPG
F:WorkData Entry WorkData Entry20200827CKA23 E.JPG
Does this meet the goal?
Correct Answer:
A