Cloud Foundry Certified Developer Exam Questions and Answers, Exams of Technology

A set of questions and answers designed to help individuals prepare for the cloud foundry certified developer exam. It covers key concepts and commands related to cloud foundry, including buildpacks, application deployment, scaling, health checks, service binding, and more. Each question is followed by the correct answer and a brief explanation, making it a valuable resource for exam preparation and understanding cloud foundry fundamentals. The questions cover a range of topics, from basic commands to more advanced concepts, providing a comprehensive review of the material.

Typology: Exams

2024/2025

Available from 09/11/2025

BookVenture
BookVenture 🇮🇳

3.2

(20)

26K documents

1 / 70

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Cloud Foundry Certified Developer Beta Exam
Question 1. What is the primary purpose of a buildpack in Cloud Foundry?
A) To monitor application performance
B) To provide a runtime environment and dependencies for an app
C) To manage application scaling
D) To store application logs
Answer: B
Explanation: Buildpacks are responsible for detecting the application type, supplying necessary
dependencies, and creating a runnable image for deployment in Cloud Foundry.
Question 2. Which file is commonly used to define application attributes such as memory, routes, and
environment variables in Cloud Foundry?
A) config.json
B) manifest.yml
C) application.properties
D) cf-config.yaml
Answer: B
Explanation: The manifest.yml file is used to specify attributes like memory, instances, routes, and
environment variables for Cloud Foundry applications.
Question 3. What command is used to deploy an application to Cloud Foundry?
A) cf deploy
B) cf upload
C) cf push
D) cf add
Answer: C
Explanation: The cf push command is used to deploy (push) an application to Cloud Foundry.
Question 4. When scaling an app horizontally in Cloud Foundry, what are you increasing?
A) Application memory
B) Number of application instances
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46

Partial preview of the text

Download Cloud Foundry Certified Developer Exam Questions and Answers and more Exams Technology in PDF only on Docsity!

Question 1. What is the primary purpose of a buildpack in Cloud Foundry? A) To monitor application performance B) To provide a runtime environment and dependencies for an app C) To manage application scaling D) To store application logs Answer: B Explanation: Buildpacks are responsible for detecting the application type, supplying necessary dependencies, and creating a runnable image for deployment in Cloud Foundry. Question 2. Which file is commonly used to define application attributes such as memory, routes, and environment variables in Cloud Foundry? A) config.json B) manifest.yml C) application.properties D) cf-config.yaml Answer: B Explanation: The manifest.yml file is used to specify attributes like memory, instances, routes, and environment variables for Cloud Foundry applications. Question 3. What command is used to deploy an application to Cloud Foundry? A) cf deploy B) cf upload C) cf push D) cf add Answer: C Explanation: The cf push command is used to deploy (push) an application to Cloud Foundry. Question 4. When scaling an app horizontally in Cloud Foundry, what are you increasing? A) Application memory B) Number of application instances

C) Application disk quota D) Application buildpacks Answer: B Explanation: Horizontal scaling involves increasing the number of running instances of an application. Question 5. What is the default health check type for Cloud Foundry applications? A) HTTP B) Port C) Process D) TCP Answer: B Explanation: The default health check type in Cloud Foundry is the port check, which verifies that the application is listening on the expected port. Question 6. Which command would you use to view recent logs for an application named “my-app”? A) cf log my-app B) cf logs my-app --recent C) cf show-logs my-app D) cf tail my-app Answer: B Explanation: The cf logs <app-name> --recent command displays recent logs for the specified application. Question 7. What is a stack in Cloud Foundry? A) A) A group of buildpacks B) A log aggregation service C) An operating system image for running apps D) A collection of application instances Answer: C

B) It uses the first available buildpack C) It detects the app type and matches with a compatible buildpack D) It prompts the user Answer: C Explanation: Cloud Foundry auto-detects the application type and selects a compatible buildpack if one is not explicitly specified. Question 12. Which command deletes an application and all routes associated with it? A) cf delete <app-name> B) cf remove <app-name> --all-routes C) cf delete <app-name> - r D) cf destroy <app-name> Answer: C Explanation: The cf delete <app-name> - r command deletes both the app and its routes. Question 13. What is a user-provided service instance (UPSI) in Cloud Foundry? A) A service created by the Cloud Foundry marketplace B) An external service registered manually by the user C) A backup of a service D) A managed service with no credentials Answer: B Explanation: A UPSI allows you to connect your app to an external service by manually supplying credentials. Question 14. How do you create a user-provided service instance? A) cf create-user-service B) cf bind-service C) cf create-user-provided-service D) cf create-up-service

Answer: C Explanation: The cf create-user-provided-service command creates a UPSI. Question 15. Which CLI command is used to bind a service instance to an application? A) cf bind-app B) cf bind-service C) cf attach-service D) cf connect-service Answer: B Explanation: cf bind-service binds a service instance to an application. Question 16. What does the cf restage command do? A) Stops the application B) Rebuilds the droplet using the latest buildpack and environment C) Deletes the application D) Rescales the application Answer: B Explanation: cf restage restarts the staging process, rebuilding the app with the current buildpack and environment. Question 17. Which command allows you to change the memory allocated to a running app? A) cf set-memory B) cf scale C) cf resize D) cf update-app Answer: B Explanation: cf scale can be used to change resources like memory and instance count for an app. Question 18. What is the purpose of application manifests in Cloud Foundry?

Answer: A Explanation: cf logs <app-name> shows a live stream of logs. Question 22. What is the purpose of the Cloud Foundry Marketplace? A) Deploying applications B) Provisioning managed services C) Monitoring application health D) Scaling applications Answer: B Explanation: The Marketplace lists managed services that can be provisioned and bound to applications. Question 23. Which resource cannot be scaled using cf scale? A) Memory B) Disk C) Buildpack D) Instances Answer: C Explanation: Buildpacks cannot be scaled; cf scale adjusts memory, disk, and instance count. Question 24. What command restores an app from a stopped state? A) cf start B) cf resume C) cf push D) cf launch Answer: A Explanation: cf start resumes a stopped app. Question 25. Which environment variable contains information about the application instance in Cloud Foundry?

A) CF_ENV

B) VCAP_APPLICATION

C) APP_INFO

D) CF_INFO

Answer: B Explanation: VCAP_APPLICATION contains metadata about the running app instance. Question 26. How can you view the currently bound services for an application? A) cf list-services B) cf services C) cf env <app-name> D) cf show-services Answer: C Explanation: cf env <app-name> displays the environment variables, including bound services. Question 27. Which command creates a service key for an existing service instance? A) cf create-service-key B) cf add-service-key C) cf bind-key D) cf generate-key Answer: A Explanation: cf create-service-key creates credentials for a service instance. Question 28. What does the --no-start flag do when used with cf push? A) Pushes the app and immediately starts it B) Pushes the app but does not start it C) Pushes the app and deletes existing routes D) Pushes the app with zero instances Answer: B

B) Port C) Process D) File Answer: D Explanation: File is not a valid health check type; valid types are port, process, and HTTP. Question 33. Which command allows you to SSH into an application container? A) cf ssh B) cf login-app C) cf connect D) cf app-ssh Answer: A Explanation: cf ssh opens an SSH session into an app container for debugging. Question 34. What happens if two apps are mapped to the same route in Cloud Foundry? A) Both receive traffic via round-robin B) Only the first app receives traffic C) Apps will not start D) The route is deleted Answer: A Explanation: Requests are load balanced between all apps mapped to the same route. Question 35. What is the correct command to remove a route from an application? A) cf unmap-route B) cf remove-route C) cf delete-route D) cf detach-route Answer: A Explanation: cf unmap-route removes a route from an app.

Question 36. How can you view detailed API requests for a cf CLI command for troubleshooting? A) Set CF_DEBUG=true B) Set CF_TRACE=true C) Set DEBUG= D) Use cf logs Answer: B Explanation: CF_TRACE provides detailed request/response info for CLI troubleshooting. Question 37. Which of the following commands updates an existing service instance? A) cf update-service B) cf upgrade-service C) cf edit-service D) cf modify-service Answer: A Explanation: cf update-service updates the configuration of a service instance. Question 38. When binding a service to an app, what must happen before binding? A) The app must be stopped B) The service instance must exist C) The app must be deleted D) The app must be scaled Answer: B Explanation: The service instance must be created before it can be bound to an app. Question 39. Which command removes a service binding from an app? A) cf delete-binding B) cf unbind-service C) cf remove-binding

A) Injects them into VCAP_SERVICES B) Enters them into the manifest.yml C) Writes them to disk D) Requires manual input Answer: A Explanation: Service credentials are injected into the app environment via the VCAP_SERVICES variable. Question 44. Which command lists all apps in the current space? A) cf list-apps B) cf apps C) cf show-apps D) cf display-apps Answer: B Explanation: cf apps lists all apps in the current space. Question 45. What happens if a health check fails for an app instance? A) The app instance is restarted B) The app is deleted C) The app is scaled down D) Nothing happens Answer: A Explanation: Failed health checks trigger a restart of the affected app instance. Question 46. What is the maximum number of routes that can be mapped to a single app? A) 1 B) 2 C) 10 D) Unlimited (subject to quota) Answer: D

Explanation: An app can have multiple routes mapped, limited only by quota or platform restrictions. Question 47. Which buildpack is selected if multiple buildpacks match an app? A) The first matching buildpack in the buildpack list B) The last buildpack in the list C) The default buildpack D) All matching buildpacks Answer: A Explanation: The first matching buildpack in the buildpack order is chosen. Question 48. Which property in manifest.yml sets the number of app instances? A) instances B) count C) replicas D) nodes Answer: A Explanation: The instances property sets how many app instances to run. Question 49. What does the cf delete-service command do? A) Deletes the service broker B) Deletes a service instance C) Deletes all apps using a service D) Deletes service bindings only Answer: B Explanation: cf delete-service deletes a specific service instance. Question 50. What is the effect of using the - f flag with cf delete? A) Forces deletion without confirmation prompt B) Deletes all apps in the org

Question 54. What is the result of mapping multiple routes to a single application? A) Multiple apps are created B) The app can be accessed via multiple endpoints C) The app cannot be started D) Health checks fail Answer: B Explanation: Multiple routes allow the app to be accessed via different URLs. Question 55. How does container-to-container networking benefit inter-app communication? A) Reduces app memory usage B) Enables secure, direct communication between apps C) Increases app startup time D) Deletes unused containers Answer: B Explanation: Container-to-container networking allows direct, secure traffic between apps in the same space. Question 56. Which command lists available buildpacks? A) cf buildpacks B) cf list-buildpacks C) cf show-buildpacks D) cf buildpack-list Answer: A Explanation: cf buildpacks lists all buildpacks available in the platform. Question 57. Which Cloud Foundry component is responsible for routing external traffic to apps? A) Diego B) Router C) Loggregator

D) BOSH

Answer: B Explanation: The Router directs incoming traffic to the appropriate application instances. Question 58. What is the minimum required information to create a user-provided service? A) Name and credentials B) Name only C) Credentials only D) Name and manifest Answer: A Explanation: UPSIs require a name and at least one credential or connection detail. Question 59. What is the result of cf push when the app is already running? A) The app is stopped and redeployed B) The app is deleted C) Nothing happens D) The app is updated and restaged Answer: D Explanation: cf push updates the running app with new code and restages it. Question 60. What is the purpose of domains in Cloud Foundry? A) Isolating apps B) Defining address space for routes C) Managing buildpacks D) Scaling apps Answer: B Explanation: Domains define the address space used for app routes (e.g., example.com). Question 61. How do you view which buildpack was used to stage your app?

Answer: B Explanation: - i specifies the number of instances to run. Question 65. Which command deletes a route from the platform? A) cf delete-route B) cf remove-route C) cf unmap-route D) cf destroy-route Answer: A Explanation: cf delete-route removes the route from Cloud Foundry. Question 66. What information is required when creating a service key? A) Key name B) Key name and service instance C) Key name and manifest D) Key name and route Answer: B Explanation: Service key creation requires specifying a key name and the target service instance. Question 67. What happens if you try to bind a service to an app before the service instance exists? A) The binding succeeds B) The binding fails C) The app restarts D) Nothing happens Answer: B Explanation: The service instance must exist; otherwise, binding will fail. Question 68. Which file must be present to use a custom stack? A) manifest.yml specifying stack

B) custom-stack.yml C) cf-stack.json D) app.env Answer: A Explanation: The stack can be specified in the manifest.yml under the stack: key. Question 69. What is the purpose of the “cf marketplace” command? A) Lists all available orgs B) Lists all available services and service plans C) Lists all apps D) Lists all users Answer: B Explanation: cf marketplace shows all available services and plans in the Marketplace. Question 70. Which command displays detailed information about an application, including its routes, stack, and instances? A) cf show-app B) cf app <app-name> C) cf describe-app D) cf info-app Answer: B Explanation: cf app <app-name> displays comprehensive info about the app. Question 71. How can you set an environment variable for an already-deployed app? A) cf set-env B) cf add-env C) cf env-set D) cf update-env Answer: A