LCA Cloud Integration & Deployment 3 — Questions and Answers
Question 1: What is the function of a Kubernetes ConfigMap?
- To store TLS certificates for ingress controllers
- To provide non-sensitive configuration data to pods as environment variables or files (Correct answer)
- To define resource limits for containers
- To manage network policies between namespaces
Correct answer: To provide non-sensitive configuration data to pods as environment variables or files
A ConfigMap stores non-confidential key-value pairs that can be injected into pods as environment variables, command-line arguments, or config files.
Question 2: Which AWS service provides a managed Kubernetes control plane?
- AWS ECS
- AWS EKS (Correct answer)
- AWS Fargate
- AWS Batch
Correct answer: AWS EKS
Amazon Elastic Kubernetes Service (EKS) provides a managed Kubernetes control plane, removing the need to install and operate your own.
Question 3: In a CI/CD pipeline, what is the purpose of the 'build' stage?
- To deploy artifacts to production servers
- To compile source code and create deployable artifacts (Correct answer)
- To run integration tests against a live environment
- To monitor application performance after deployment
Correct answer: To compile source code and create deployable artifacts
The build stage compiles source code, resolves dependencies, and packages the application into a deployable artifact such as a container image or binary.
Question 4: What does the '--rm' flag do when running a Docker container?
- Removes the Docker image after the container exits
- Automatically removes the container filesystem after it stops (Correct answer)
- Runs the container in read-only mode
- Removes all stopped containers on the host
Correct answer: Automatically removes the container filesystem after it stops
The '--rm' flag tells Docker to automatically remove the container and its filesystem when it exits, preventing accumulation of stopped containers.
Question 5: Which Ansible module is used to copy files from the control node to managed hosts?
- ansible.builtin.fetch
- ansible.builtin.file
- ansible.builtin.copy (Correct answer)
- ansible.builtin.template
Correct answer: ansible.builtin.copy
The 'ansible.builtin.copy' module copies files from the Ansible control node (or local files) to remote managed hosts.
Question 6: What is the role of an Ingress resource in Kubernetes?
- To expose pods directly using NodePort
- To manage external HTTP/HTTPS access to services within a cluster (Correct answer)
- To define persistent volume claims for stateful applications
- To restrict pod-to-pod communication within a namespace
Correct answer: To manage external HTTP/HTTPS access to services within a cluster
An Ingress resource manages external HTTP and HTTPS routing to Kubernetes services, enabling host-based and path-based routing rules.
Question 7: Which environment variable is commonly used by AWS CLI and SDKs to specify the target AWS region?
- AWS_ZONE
- AWS_DEFAULT_REGION (Correct answer)
- AWS_LOCATION
- AWS_AVAILABILITY_ZONE
Correct answer: AWS_DEFAULT_REGION
The 'AWS_DEFAULT_REGION' environment variable sets the default AWS region for CLI commands and SDK calls when no region is explicitly specified.
What is the function of a Kubernetes ConfigMap?