CORRECT TEXT
CORRECT TEXT Scale the deployment webserver to 6 pods.View AnswerAnswer: solution
CORRECT TEXT
CORRECT TEXT 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...
CORRECT TEXT
CORRECT TEXT Score:7% Task Create a new PersistentVolumeClaim • Name: pv-volume • Class: csi-hostpath-sc • Capacity: 10Mi Create a new Pod which mounts the PersistentVolumeClaim as a volume: • Name: web-server • Image: nginx • Mount path: /usr/share/nginx/html Configure the new Pod to have ReadWriteOnce access on the volume. Finally,...
CORRECT TEXT
CORRECT TEXT Create an nginx pod and list the pod with different levels of verbosityView AnswerAnswer: // create a pod kubectl run nginx --image=nginx --restart=Never --port=80 // List the pod with different verbosity kubectl get po nginx --v=7 kubectl get po nginx --v=8 kubectl get po nginx --v=9
CORRECT TEXT
CORRECT TEXT Check to see how many worker nodes are ready (not including nodes tainted NoSchedule) and write the number to /opt/KUCC00104/kucc00104.txt.View AnswerAnswer: solution
CORRECT TEXT
CORRECT TEXT Score: 5% Task From the pod label name=cpu-utilizer, find pods running high CPU workloads and write the name of the pod consuming most CPU to the file /opt/KUTR00401/KUTR00401.txt (which already exists).View AnswerAnswer: Solution: kubectl top -l name=cpu-user -A echo 'pod name'>> /opt/KUT00401/KUT00401.txt
CORRECT TEXT
CORRECT TEXT Print pod name and start time to “/opt/pod-status” fileView AnswerAnswer: kubect1 get pods -o=jsonpath='{range items[*]}{.metadata.name}{"t"}{.status.podIP}{"n"}{end}'
CORRECT TEXT
CORRECT TEXT Create a deployment as follows: ✑ Name: nginx-random ✑ Exposed via a service nginx-random ✑ Ensure that the service & pod are accessible via their respective DNS records ✑ The container(s) within any pod(s) running as a part of this deployment should use the nginx Image Next, use...
CORRECT TEXT
CORRECT TEXT Score: 4% Task Schedule a pod as follows: • Name: nginx-kusc00401 • Image: nginx • Node selector: disk=ssdView AnswerAnswer: Solution: #yaml apiVersion: v1 kind: Pod metadata: name: nginx-kusc00401 spec: containers: - name: nginx image: nginx imagePullPolicy: IfNotPresent nodeSelector: disk: spinning # kubectl create -f node-select.yaml
CORRECT TEXT
CORRECT TEXT 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 View AnswerAnswer: Solution: vi ingress.yaml # apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: ping namespace: ing-internal spec: rules: - http: paths:...