Results
Sorry, you were so close! Review Your Answers Below!!
Better Luck Next Time!
#1. How can you reduce the size of a Docker image during the build process?
Explanation: Lightweight base images like alpine
reduce the overall image size.
#2. Which provider configuration syntax is correct in Terraform?
Explanation: Provider blocks define configurations for Terraform providers.
#3. How would you prevent sensitive data from being logged in Terraform state files?
Explanation: Marking variables as sensitive ensures they are not logged in plaintext.
#4. What is the primary purpose of a Kubernetes Ingress?
Explanation: Ingress manages HTTP and HTTPS traffic routing to Kubernetes services.
#5. You want to run a container in the background and expose a port. Which command should you use?
Explanation: The -d
flag runs the container in detached mode, and -p
maps ports.
#6. Which backend is commonly used to store Terraform state in AWS?
Explanation: S3 is the most common backend for storing Terraform state files.
#7. Which Terraform command is used to apply changes to infrastructure?
Explanation: terraform apply
applies the planned changes to the infrastructure.
#8. You encounter an issue where a container cannot connect to an external API. What should you check first?
Explanation: Networking issues, including DNS, often cause connectivity problems.
#9. You need to deploy an application with a dependency on a specific version of a library. How do you ensure the container uses the correct version?
Explanation: The FROM
directive determines the base image version, ensuring consistency.
#10. What type of Kubernetes service is used to expose an application to the internet?
Explanation: A LoadBalancer service routes external traffic to the application.
#11. You need to securely inject sensitive data into a Kubernetes pod. What should you use?
Explanation: Secrets are used to manage sensitive data securely in Kubernetes.
#12. Which Docker command would you use to view all running and stopped containers on a host?
Explanation: The -a
flag shows all containers, including stopped ones.
#13. You encounter a lock error when running terraform apply. What might resolve it?
Explanation: Force-unlocking resolves lock contention issues in Terraform state files.
#14. Which Kubernetes object should you use to maintain a specified number of pod replicas running?
Explanation: ReplicaSet ensures a specified number of pod replicas. Deployments use ReplicaSets under the hood.
#15. What happens if a resource is removed from the Terraform configuration?
Explanation: Terraform manages the lifecycle of resources defined in its configuration.
#16. What does the terraform refresh command do?
Explanation: terraform refresh
syncs the state file with actual resource statuses.
#17. How do you define a reusable module in Terraform?
Explanation: Modules are created by grouping Terraform configuration files into directories.
#18. Which command can you use to debug a running Kubernetes pod?
Explanation: Each command provides specific debugging information: logs for output, exec for shell access, and describe for configuration details.
#19. How can you ensure that a pod is scheduled on a specific node?
Explanation: All listed methods can influence pod scheduling on specific nodes.
#20. You notice a pod in the CrashLoopBackOff state. What should you check first?
Explanation: Pod logs often provide the root cause of the failure.