Ready to Pass Your Certification Test

Ready to guarantee a pass on the certification that will elevate your career? Visit this page to explore our catalog and get the questions and answers you need to ace the test.

Exam contains 260 questions

Page 3 of 44
Question 13 🔥

kubectl edit cm fluentd -n openshift -logging Add the Elasticsearch output: <match **> @type elasticsearch host elasticsearch.example.com port 9200 logstash_format true </match> 2. Restart Fluentd: kubectl rollout restart daemonset/fluentd -n openshift -logging 3. Verify logs in Elasticsearch. Explanation: Integrating with Elasticsearch centralizes log management and supports advanced querying and visualization, aiding in operational monitoring. Use OpenShift product documentation to identify the steps for upgrading the cluster from version X to version Y. Demonstrate how to validate that the upgrade completed successfully. ee the Solution below. Solution: 1. Access the OpenShift documentation: oc adm upgrade 2. Perform a pre-upgrade check: oc adm preflight -check 3. Start the upgrade: oc adm upgrade --to-latest 4. Verify the cluster version: oc version Explanation:

Question 14 🔥

Following official documentation ensures that cluster upgrades adhere to recommended practices, minimizing risks and maintaining system stability. Deploy an application across multiple namespaces using a common Deployment YAML file. Include steps to create the namespaces, apply the deployment, and verify that the pods are running in each namespace. ee the Solution below. Solution: 1. Create namespaces: kubectl create namespace ns1 kubectl create namespace ns2 2. Create a Deployment YAML file app-deployment.yaml: apiVersion: apps/v1 kind: Deployment metadata: name: multi -namespace -app spec: replicas: 2 selector: matchLabels: app: sample -app template: metadata: labels: app: sample -app spec: containers: - name: app-container image: nginx:latest 3. Apply the deployment in each namespace: kubectl apply -f app-deployment.yaml -n ns1 kubectl apply -f app -deployment.yaml -n ns2 4. Verify the pods: kubectl get pods -n ns1 kubectl get pods -n ns2

Question 15 🔥

Explanation: Deploying across namespaces ensures workload isolation while reusing common configurations. Verification confirms that resources are created and operational. Simulate and troubleshoot a pod network issue where a pod cannot communicate with a service in the same namespace. Provide steps to identify and resolve the problem. ee the Solution below. Solution: 1. Check the pod's DNS resolution: kubectl exec <pod -name> -- nslookup <service -name> 2. Verify service and endpoint configuration: kubectl get svc kubectl describe svc <service -name> kubectl get endpoints 3. Diagnose network policies: kubectl get networkpolicy 4. Resolve by updating or removing problematic network policies. Explanation: Pod network issues can stem from DNS, service misconfigurations, or restrictive network policies. Systematic diagnosis ensures efficient resolution. Implement a pod disruption budget (PDB) to ensure that at least one pod of a deployment is always running during maintenance events. Create a YAML file for the PDB and apply it to a deployment. ee the Solution below. Solution: 1. Create a PDB YAML file pdb.yaml: apiVersion: policy/v1

Question 16 🔥

kind: PodDisruptionBudget metadata: name: pdb-sample spec: minAvailable: 1 selector: matchLabels: app: sample -app 2. Apply the PDB: kubectl apply -f pdb.yaml 3. Verify the PDB: kubectl get pdb Explanation: PDBs maintain application availability during voluntary disruptions, such as node upgrades, by defining minimum operational pod thresholds. Create a custom OpenShift project with resource quotas to limit CPU and memory usage for all pods. Include YAML definitions for the project and quota. ee the Solution below. Solution: 1. Create a project: oc new -project custom -project 2. Define a resource quota quota.yaml: apiVersion: v1 kind: ResourceQuota metadata: name: project -quota spec: hard: requests.cpu: "2" requests.memory: 4Gi limits.cpu: "4" limits.memory: 8Gi

Question 17 🔥

3. Apply the quota: kubectl apply -f quota.yaml -n custom -project 4. Verify the quota: kubectl describe quota project -quota -n custom -project Explanation: Resource quotas prevent overconsumption of cluster resources, ensuring fair allocation and stability across multiple projects. Configure a readiness probe for an application to ensure that traffic is sent only to pods that are fully ready. Include steps to create the probe in the Deployment YAML and test its functionality. ee the Solution below. Solution: 1. Update the Deployment YAML: readinessProbe: httpGet: path: / port: 80 initialDelaySeconds: 5 periodSeconds: 10 2. Apply the updated Deployment: kubectl apply -f app -deployment.yaml 3. Verify the readiness status: kubectl get pods kubectl describe pod <pod -name> Explanation: Readiness probes prevent traffic routing to unready pods, enhancing application reliability by ensuring pods are functional before handling requests.

Question 18 🔥

kubectl get pods 4. Test the application by exposing the Deployment: kubectl expose deployment nginx -deployment --type=NodePort --port=80 kubectl get svc 5. Use the NodePort and cluster IP to confirm that the application is serving requests. Explanation: Deployments provide a scalable and declarative way to manage applications. YAML manifests ensure the configuration is consistent, while NodePort services expose the application for testing. Verifying replicas ensures that the application is running as expected and resilient. Your team requires an application to load specific configuration data dynamically during runtime. Create a ConfigMap to hold key -value pairs for application settings, and update an existing Deployment to use this ConfigMap. Provide a complete YAML definition for both the ConfigMap and the updated Deployment, and demonstrate how to validate that the configuration is applied correctly. ee the Solution below. Solution: 1. Create a ConfigMap YAML file named app-config.yaml: apiVersion: v1 kind: ConfigMap metadata: name: app-config data: APP_ENV: production APP_DEBUG: "false" 2. Apply the ConfigMap using: kubectl apply -f app -config.yaml 3. Update the Deployment YAML to reference the ConfigMap: apiVersion: apps/v1 kind: Deployment metadata: name: app-deployment spec: replicas: 1

Lorem ipsum dolor sit amet consectetur. Eget sed turpis aenean sit aenean. Integer at nam ullamcorper a.

© 2024 Exam Prepare, Inc. All Rights Reserved.