Task Weight: 4%
Task
Schedule a Pod as follows:
• Name: kucc1
• App Containers: 2
• Container Name/Images: o nginx
o consul
Solution:
Solution:
Graphical user interface, text, application Description automatically generated
Text Description automatically generated
Does this meet the goal?
Correct Answer:A
Score: 7%
Task
Create a new nginx Ingress resource as follows:
• Name: ping
• Namespace: ing-internal
• Exposing service hi on path /hi using service port 5678
Solution:
Solution:
vi ingress.yaml
#
apiVersion: networking.k8s.io/v1 kind: Ingress
metadata: name: ping
namespace: ing-internal spec:
rules:
- http:
paths:
- path: /hi pathType: Prefix backend: service:
name: hi port:
number: 5678
#
kubectl create -f ingress.yaml
Does this meet the goal?
Correct Answer:A
Print pod name and start time to “/opt/pod-status” file
Solution:
kubect1 get pods -o=jsonpath='{range items[*]}{.metadata.name}{"\t"}{.status.podIP}{"\n"}{end}'
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
Score: 13%
Task
A Kubernetes worker node, named wk8s-node-0 is in state NotReady. Investigate why this is the case, and perform any appropriate steps to bring the node to a Ready state, ensuring that any changes are made permanent.
Solution:
Solution:
sudo -i
systemctl status kubelet systemctl start kubelet systemctl enable kubelet
Does this meet the goal?
Correct Answer:A