Which TWO statements are correct regarding Docker images and containers? (Choose two.)
Correct Answer: B,C
Which TWO statements are correct regarding Docker images and containers? (Choose two.) Writing and building a new Dockerfile is the only way you can create new Docker images. A container can exist without an image but an image cannot exist without a container. Only one container can be spawned from a given image at a time. If multiple containers are spawned from the same image, then they all use the same copy of that image in memory. (Correct) An image is a collection of immutable layers whereas a container is a running instance of an image. (Correct) ChatGPT The correct statements regarding Docker images and containers are: If multiple containers are spawned from the same image, then they all use the same copy of that image in memory. This statement is correct. When multiple containers are created from the same Docker image, they share the underlying layers of the image in memory. Each container has its own isolated filesystem and runtime environment, but they all use the same base image, which helps in efficient resource utilization. An image is a collection of immutable layers whereas a container is a running instance of an image. This statement is also correct. Docker images are composed of multiple layers, with each layer representing a specific change or addition to the previous layer. These layers are read-only and can be shared among multiple containers. On the other hand, a container is a lightweight and isolated runtime instance created from a specific image. It is a running process that has its own filesystem, network, and runtime configuration. The statements "Writing and building a new Dockerfile is the only way you can create new Docker images" and "A container can exist without an image but an image cannot exist without a container" are incorrect. Docker images can be created in various ways, including using Dockerfiles, importing from existing images, or pulling from registries. Additionally, a container requires an image to run, so an image must exist before a container can be created from it.
Question 22
Your organization has deployed their e-commerce application on Oracle Container Engine for Kubernetes (OKE) and they are using the Oracle Cloud Infrastructure Registry (OCIR) service as their Docker image repository. They have deployed the OKE cluster using the 'custom create' option, and their Virtual Cloud Network (VCN) has three public subnets with associated Route Tables, Security Lists, and Internet Gateway. However, their application containers are failing to deploy. On investigation, they discover that the images are not being pulled from the designated OCIR repository, even though the YAML configuration has the correct path to the images. What is a valid concern here that needs to be further investigated?
Correct Answer: D
A valid concern that needs to be further investigated in this scenario is whether the OKE cluster has a secret with the credentials of the Oracle Cloud Infrastructure Registry (OCIR) repository and if that secret is being used in the Kubernetes deployment manifest. Here's why this concern is relevant: Access to the OCIR repository: In order for the OKE cluster to pull images from the OCIR repository, it needs proper authentication credentials. These credentials are typically provided in the form of a secret, which contains the necessary information to authenticate with the registry. Secret in the deployment manifest: The Kubernetes deployment manifest defines how the application containers should be deployed. It includes specifications such as the container image, resource requirements, and environment variables. To pull images from a private repository like OCIR, the deployment manifest needs to reference the appropriate secret that contains the registry credentials. If the images are not being pulled from the designated OCIR repository, it suggests that either the secret with the OCIR credentials is missing or it is not properly referenced in the deployment manifest. Further investigation should focus on verifying the presence and correctness of the secret, as well as confirming that it is correctly referenced in the deployment manifest for the application containers. By ensuring the presence of the secret and proper configuration in the deployment manifest, the OKE cluster will have the necessary credentials to access the OCIR repository and successfully deploy the application containers.
Question 23
Which statement about microservices is FALSE?
Correct Answer: B
The correct answer is: "Multiple microservices can run in one process." The statement that is FALSE about microservices is: "Multiple microservices can run in one process." Microservices are designed to be independent and autonomous services that can be deployed, scaled, and managed separately. Each microservice typically runs as its own separate process. This separation allows for loose coupling and independent scalability of individual services. Running multiple microservices in a single process would violate the fundamental principle of microservices architecture, which emphasizes the isolation and independence of services. Combining multiple microservices into a single process would tightly couple them, making it difficult to independently manage, scale, and update each service. The other statements provided are true about microservices: It is fairly common for microservices to communicate with HTTP: Microservices often communicate with each other using lightweight protocols like HTTP/REST. This allows for interoperability, flexibility, and ease of communication between microservices. Microservices are typically designed around business capabilities: Microservices architecture advocates designing services based on specific business capabilities or functionalities. Each microservice focuses on a specific business domain or task, enabling modular and scalable development. They are independently deployable: Microservices are designed to be independently deployable units. This means that each microservice can be developed, tested, deployed, and updated separately without affecting other services. This flexibility allows for faster development cycles and more efficient scalability.
Question 24
A service you are deploying to Oracle Cloud Infrastructure (OCI) Container Engine for Kubernetes (OKE) uses a docker image from a private repository in OCI Registry (OCIR). Which configuration is necessary to provide access to this repository from OKE?
Correct Answer: B
The necessary configuration to provide access to a private repository in OCI Registry (OCIR) from OCI Container Engine for Kubernetes (OKE) is to create a docker-registry secret for OCIR with an identity Auth Token on the cluster and specify the imagePullSecret property in the application deployment manifest. Here's the breakdown of the steps: Create a docker-registry secret for OCIR with an identity Auth Token: In order to authenticate with the private repository in OCIR, you need to create a secret in your OKE cluster that contains the necessary credentials. This can be done by generating an identity Auth Token from the OCI Console and creating a secret in the cluster using the kubectl command. Specify the imagePullSecret property in the application deployment manifest: In your application's deployment manifest (such as a Kubernetes Deployment or StatefulSet YAML file), you need to include the imagePullSecret property and specify the name of the secret you created in the previous step. This allows the OKE cluster to use the credentials from the secret to pull the docker image from the private repository in OCIR during deployment. By following these steps, you can ensure that your OKE cluster has the necessary access to the private repository in OCIR, and your application can successfully pull the required docker image during deployment.
Question 25
You are instructed to automate manual tasks and help software teams manage complex environments at scale using the Oracle Cloud Infrastructure (OCI) services. Which THREE OCI services can be leveraged to securely store and version your application's source code, and automate the building, testing, and deployment of applications to the OCI platform? (Choose three.)
Correct Answer: A,B,E
The three OCI services that can be leveraged to securely store and version your application's source code, and automate the building, testing, and deployment of applications to the OCI platform are: DevOps: OCI provides a comprehensive set of DevOps services, including Oracle Developer Cloud Service, which allows you to manage source code repositories, automate builds and testing, and streamline the deployment process. Container Engine for Kubernetes: OCI's Container Engine for Kubernetes (OKE) enables you to deploy and manage containerized applications using Kubernetes. It provides a scalable and reliable platform for automating the deployment of your applications. Oracle Cloud Infrastructure Registry: OCI Registry is a fully managed, private container registry that allows you to securely store and manage Docker images. It integrates with other OCI services, such as Container Engine for Kubernetes, to facilitate seamless deployment and orchestration of containerized applications. These services combined provide the necessary tools and infrastructure to support continuous integration and continuous deployment (CI/CD) workflows, enabling efficient and automated application development and deployment processes in the Oracle Cloud Infrastructure environment.