














































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This exam evaluates the ability to develop, deploy, and manage applications on Cloud Foundry. Areas include buildpacks, manifest configuration, app lifecycle, scaling strategies, service bindings, environment variable management, logging, health checks, and multi-environment promotion workflows. Candidates demonstrate how to integrate CI/CD systems, design cloud-native microservices, and optimize performance within Cloud Foundry’s opinionated ecosystem.
Typology: Exams
1 / 86
This page cannot be seen from the preview
Don't miss anything!















































































Question 1. Which command authenticates a user to a Cloud Foundry API endpoint? A) cf target B) cf login C) cf api D) cf push Answer: B Explanation: cf login prompts for credentials and obtains an OAuth token for the targeted API endpoint. Question 2. What does the cf target command display? A) List of available buildpacks B) Current organization and space C) All running applications D) Service marketplace offerings Answer: B Explanation: cf target shows the API endpoint, org, and space that the CLI is currently scoped to. Question 3. In Cloud Foundry hierarchy, which entity defines resource quotas and billing? A) Space B) Organization C) Application D) Service instance Answer: B Explanation: An Organization groups spaces and holds quota definitions and billing information.
Question 4. Which role can create new spaces within an organization? A) Space Developer B) Org Manager C) Space Auditor D) Org Auditor Answer: B Explanation: The Org Manager role has permission to manage spaces, including creation and deletion. Question 5. Which file is used to declare application settings such as memory, instances, and buildpacks? A) manifest.yml B) cf.yml C) app.json D) deployment.cfg Answer: A Explanation: manifest.yml is parsed by cf push to apply configuration parameters to the app. Question 6. To push an app using a Docker image, which flag is required? A) --docker-image B) --buildpack docker C) --docker-username D) --docker-password Answer: A Explanation: --docker-image specifies the Docker image reference for the app’s container.
A) cf scale - i 4 <APP_NAME> B) cf set-instances 4 <APP_NAME> C) cf scale --instances 4 <APP_NAME> D) Both A and C are correct Answer: D Explanation: Both -i and --instances flags achieve the same result. Question 11. Which flag modifies an app’s memory allocation to 1G? A) - m 1024M B) - m 1G C) --memory 1024M D) Both B and C are correct Answer: D Explanation: Memory can be specified with -m or --memory using units like M or G. Question 12. What does a “droplet” represent in Cloud Foundry? A) The source code repository URL B) The compiled, staged version of an app ready to run C) The container image used for Docker apps D) A log file of the staging process Answer: B Explanation: A droplet contains the compiled code, dependencies, and runtime configuration. Question 13. Which health check type verifies that an app is listening on its assigned port? A) HTTP
B) Process C) Port D) TCP Answer: C Explanation: The “port” health check ensures the app binds to the expected port. Question 14. To set a custom environment variable MY_VAR to “value”, which command is used? A) cf set-env cf set-env assigns a user-defined environment variable to the app. Question 15. Where are platform-provided environment variables such as VCAP_APPLICATION stored? A) In the app’s manifest file B) In the container’s environment at runtime C) In a database service bound to the app D) In the CF CLI configuration file Answer: B Explanation: CF injects VCAP_* variables into the app’s execution environment. Question 16. Which command lists all services available in the marketplace? A) cf services
B) cf delete-binding cf unbind-service disconnects the service from the application. Question 20. What is the purpose of a service key in Cloud Foundry? A) To grant admin rights to the service broker B) To provide non‑binding credentials for external access C) To encrypt data stored in the service D) To create a backup of the service instance Answer: B Explanation: Service keys generate credentials that can be used outside of CF bindings. Question 21. How do you create a user‑provided service named “ext‑api” with a URL endpoint? A) cf create-user-provided-service ext‑api - p '{"url":"https://api.example.com"}' B) cf create-service ext‑api user-provided - c '{"url":"..."}' C) cf create-ups ext‑api - u https://api.example.com D) cf create-user-provided-service ext‑api - u https://api.example.com Answer: D Explanation: The -u flag supplies a URL for a UPSI; additional credentials can be passed with - p. Question 22. Which command shares a service instance “mydb” from space “dev” to space “test”?
A) cf share-service mydb dev test B) cf share-service mydb - s dev - t test C) cf share-service mydb - s dev - t test - o myorg D) cf copy-service mydb dev test Answer: C Explanation: cf share-service requires source and target spaces and the org to which they belong. Question 23. What component routes external HTTP traffic to applications? A) Diego Cell B) Gorouter C) Router Group D) Load Balancer Answer: B Explanation: The Gorouter is the HTTP router that maps URLs to app instances. Question 24. To map a new route “api.example.com” to app “myapp”, which command is used? A) cf map-route myapp example.com --hostname api B) cf create-route example.com --hostname api && cf map-route myapp example.com -- hostname api C) cf bind-route-service myapp example.com api D) cf add-route myapp api.example.com Answer: B Explanation: The route must exist (cf create-route) before it can be mapped to the app.
Explanation: cf bind-route-service takes the service instance first, then the domain and optional hostname. Question 28. What does an Application Security Group (ASG) control? A) Inbound traffic to the app B) Outbound (egress) network traffic from the app C) Authentication of users to the app D) File system permissions inside the container Answer: B Explanation: ASGs define egress rules for apps, limiting which external endpoints they can reach. Question 29. Which CLI command streams live logs from an application? A) cf logs --tail (or -f) streams logs in real time. Question 30. To retrieve the last 100 log lines of an app without streaming, which flag is used? A) cf logs
Answer: A Explanation: --recent fetches recent log entries stored by Loggregator. Question 31. Which of the following is a valid reason for an Out‑Of‑Memory (OOM) error during staging? A) Insufficient disk quota in the org B) Buildpack exceeding the default 1 GB memory limit C) Application not binding to the correct port D) Missing health check definition Answer: B Explanation: Staging uses a temporary container with a memory limit; exceeding it triggers OOM. Question 32. When an app fails to start due to a bad health check, what is the most likely symptom? A) Application shows “Crashed” state B) Application logs show “404 Not Found” C) cf app shows “Staging Failed” D) No route is created for the app Answer: A Explanation: A failing health check causes the app to be marked as “Crashed”. Question 33. Which command displays a chronological list of events for an app? A) cf events
D) In a hard‑coded constant Answer: C Explanation: Factor III mandates storing config in the environment, which Cloud Foundry provides via VCAP_SERVICES or custom env vars. Question 37. Which factor of the 12‑Factor App addresses “Backing services are treated as attached resources”? A) Factor IV B) Factor V C) Factor VI D) Factor VII Answer: A Explanation: Factor IV states that backing services (databases, queues) are attached/detached like resources. Question 38. What is the main advantage of a blue/green deployment in Cloud Foundry? A) Reduces memory usage during deployment B) Enables zero‑downtime releases by swapping routes C) Automatically scales instances based on load D) Provides built‑in rollback of database migrations Answer: B Explanation: Blue/green uses two app versions and switches routes, achieving zero‑downtime. Question 39. Which CLI command creates a one‑off task named “migrate” that runs the command rake db:migrate? A) cf run-task
B) cf create-task cf run-task accepts --name to label the task. Question 40. How can you view the status of all tasks for an application? A) cf tasks cf tasks lists running, completed, and failed tasks for the app. Question 41. Which component is responsible for staging and running application containers? A) Gorouter B) Diego Cell C) UAA D) Loggregator Answer: B Explanation: Diego Cells host the containers that hold staged droplets. Question 42. What does the cf push flag --no-start do? A) Pushes the app but does not start it after staging
B) cf target --api C) cf status D) cf endpoint Answer: A Explanation: cf api without arguments displays the targeted API endpoint. Question 46. What is the purpose of the cf curl command? A) To perform HTTP requests directly against the Cloud Foundry API B) To download application source code from a repository C) To retrieve log files from the Loggregator endpoint D) To upload buildpacks to the marketplace Answer: A Explanation: cf curl is an undocumented helper for raw API interactions. Question 47. Which file format is used for a Cloud Foundry service broker catalog? A) YAML B) JSON C) XML D) TOML Answer: B Explanation: Service broker APIs exchange catalog data as JSON. Question 48. If an app’s health check is set to “process”, what does the platform monitor? A) That the app’s HTTP endpoint returns 200 B) That the app process is running (not exited)
C) That the app is listening on the assigned port D) That the app’s memory usage stays below the limit Answer: B Explanation: “process” health check only verifies that the main process has not terminated. Question 49. Which CLI command lists all routes bound to a specific app? A) cf routes cf routes with the app name displays its mapped routes. Question 50. How can you retrieve the value of a specific environment variable named DATABASE_URL from an app? A) cf env cf env shows all env vars; piping to grep filters the desired one. Question 51. Which of the following is NOT a default Cloud Foundry system buildpack? A) java_buildpack B) nodejs_buildpack
C) cf service-key mydb read‑only D) cf create-service-key mydb read‑only Answer: D Explanation: cf create-service-key creates a key; the -c flag is optional for custom parameters. Question 55. Which flag disables automatic restaging when environment variables are changed? A) --no-restart B) --no-start C) --no-restage D) There is no such flag; a restage is required for env changes Answer: D Explanation: Changing env vars requires a restage (or restart) to take effect; no flag skips this. Question 56. What is the default health check type for apps that do not expose an HTTP endpoint? A) HTTP B) Port C) Process D) None Answer: B Explanation: If no health check is specified, Cloud Foundry defaults to a “port” check. Question 57. Which command shows the current quota limits for the targeted organization? A) cf org <ORG_NAME>
B) cf quotas C) cf org-quota <ORG_NAME> D) cf quota <ORG_NAME> Answer: A Explanation: cf org <ORG_NAME> displays quota details among other organization info. Question 58. In a manifest, which top‑level key defines the stack (operating system) to use? A) stack B) os C) runtime D) platform Answer: A Explanation: The stack attribute selects the base root filesystem (e.g., cflinuxfs3). Question 59. Which command lists all installed CLI plugins? A) cf plugins B) cf plugin-list C) cf plugins --list D) cf plugin list Answer: A Explanation: cf plugins shows name, version, and command extensions. Question 60. To retrieve the OAuth token used by the CLI, which command is appropriate? A) cf oauth-token B) cf token