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 13 of 44
Question 73 🔥

Implement a rollback strategy to switch back to a specific deployment revision based on performance issues. Validate rollback success. ee the Solution below. Solution: 1. List the deployment revisions: kubectl rollout history deployment/my -app 2. Roll back to a specific revision: kubectl rollout undo deployment/my -app --to-revision=3 3. Validate rollback success: kubectl get pods kubectl describe pod <pod -name> Explanation: Rollback strategies enable swift recovery to a known stable state, mitigating downtime or performance degradation due to problematic updates. Configure an OpenShift BuildConfig to automatically update an ImageStream when a new build is complete. Validate the ImageStream update behavior. ee the Solution below. Solution: 1. Create a BuildConfig YAML: apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: app-build spec: output: to: kind: ImageStreamTag name: app -image:latest source: git: uri: "https://github.com/example/repo.git"

Question 74 🔥

strategy: type: Docker 2. Apply the BuildConfig: oc apply -f buildconfig.yaml 3. Trigger a build and validate ImageStream updates: oc start-build app-build oc get is app -image Explanation: BuildConfigs streamline the CI/CD process by automating ImageStream updates after a successful build. Create a DeploymentConfig that triggers an update when a ConfigMap changes. Validate the configuration change propagation. ee the Solution below. Solution: 1. Create a ConfigMap for the application: oc create configmap app -config --from-literal=APP_ENV=production 2. Update the DeploymentConfig to include a ConfigMap volume: spec: triggers: - type: ConfigChange 3. Apply the DeploymentConfig: oc apply -f deploymentconfig.yaml 4. Change the ConfigMap and validate the trigger: oc create configmap app-config --from-literal=APP_ENV=staging -o yaml --dry-run=client | oc apply -f - oc get pods Explanation: ConfigChange triggers ensure deployments automatically reflect changes to configuration files, improving responsiveness to updates.

Question 75 🔥

Simulate a failed ImageStream -based deployment and debug the issue using logs. ee the Solution below. Solution: 1. Trigger a deployment with a broken image: oc tag nginx:broken nginx -stream:stable 2. Validate the failed pods: oc get pods 3. Debug the issue using pod logs: oc logs <failed -pod-name> 4. Fix the image and trigger a new deployment: oc tag nginx:1.21 nginx -stream:stable Explanation: Logs provide detailed insights into deployment failures, enabling quick resolution of issues like invalid images or misconfigurations. Implement an ImageStream policy that disables automatic image updates. Validate the manual update process. ee the Solution below. Solution: 1. Create an ImageStream with automatic updates disabled: spec: tags: - name: stable from: kind: DockerImage name: nginx:stable importPolicy:

Question 76 🔥

scheduled: false 2. Apply the ImageStream: oc apply -f imagestream.yaml 3. Manually update the ImageStream: oc import -image nginx -stream:stable --from=nginx:1.21 4. Validate the update: oc get is nginx -stream Explanation: Disabling automatic updates provides more control over when image changes are applied, ensuring deployments occur at planned intervals. Set up a multi -stage pipeline using BuildConfig and ImageStreams to build and deploy an application. Validate the pipeline. ee the Solution below. Solution: 1. Create a BuildConfig for the build stage: spec: output: to: kind: ImageStreamTag name: app -base:latest 2. Create a BuildConfig for the deployment stage: spec: input: from: kind: ImageStreamTag name: app -base:latest 3. Trigger the pipeline: oc start -build app -base oc start-build app-deploy

Question 77 🔥

4. Validate the pipeline output: oc get pods Explanation: Multi -stage pipelines using BuildConfigs and ImageStreams enable modular and efficient application build and deployment workflows. Create a DeploymentConfig with a hook to verify application readiness before completing the deployment. Validate the hook. ee the Solution below. Solution: 1. Add a post -deployment hook to the DeploymentConfig: spec: strategy: type: Rolling rollingParams: post: execNewPod: containerName: app-container command: - curl - http://localhost/health 2. Apply the DeploymentConfig: oc apply -f deploymentconfig.yaml 3. Trigger a deployment and validate the hook execution: oc rollout latest dc/my -app oc get pods Explanation: Post-deployment hooks validate application readiness before completing deployments, reducing the risk of deploying broken applications.

Question 78 🔥

Solution: 1. Create a Headless Service YAML file: apiVersion: v1 kind: Service metadata: name: headless -service spec: clusterIP: None selector: app: my-stateful -app ports: - protocol: TCP port: 80 2. Apply the Service and verify DNS resolution: kubectl apply -f headless -service.yaml kubectl exec <pod -name> -- nslookup headless -service Explanation: Headless Services provide direct access to individual pod IPs, which is essential for StatefulSet workloads. Deploy an application using a Kubernetes CronJob that runs every 5 minutes. Validate its execution. ee the Solution below. Solution: 1. Create a CronJob YAML file cronjob.yaml: apiVersion: batch/v1 kind: CronJob metadata: name: my-cronjob spec: schedule: "*/5 * * * *" jobTemplate: spec: template: spec: containers: - name: my -container

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

© 2024 Exam Prepare, Inc. All Rights Reserved.
EX280 questions • Exam prepare