Google Cloud: Deployment Manager and DaemonSet Creation in Kubernetes Engine

Deployment Manager and DaemonSet Creation in Kubernetes Engine

Question

You are using Deployment Manager to create a Google Kubernetes Engine cluster.

Using the same Deployment Manager deployment, you also want to create a DaemonSet in the kube-system namespace of the cluster.

You want a solution that uses the fewest possible services.

What should you do?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

C.

https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl

To create a DaemonSet in a Google Kubernetes Engine cluster using Deployment Manager, you should choose option D: "In the cluster's definition in Deployment Manager, add a metadata that has kube-system as key and the DaemonSet manifest as value."

Here's why:

A. Add the cluster's API as a new Type Provider in Deployment Manager, and use the new type to create the DaemonSet.

While it's true that you can use Type Providers to create custom resource types in Deployment Manager, this option is overly complex for this use case. It would require creating a new Type Provider for the Kubernetes API, which is unnecessary when you can use the built-in Kubernetes Deployment Manager type instead.

B. Use the Deployment Manager Runtime Configurator to create a new Config resource that contains the DaemonSet definition.

Runtime Configurator is useful for managing dynamic configuration data in a Google Cloud Platform environment, but it's not necessary to create a DaemonSet in a Kubernetes cluster using Deployment Manager. You can define the DaemonSet directly in the Deployment Manager manifest.

C. With Deployment Manager, create a Compute Engine instance with a startup script that uses kubectl to create the DaemonSet.

While this option is technically feasible, it's not the best approach for creating a DaemonSet in a Kubernetes cluster. Creating a Compute Engine instance would add unnecessary complexity and cost to the deployment, and it's not an efficient way to manage Kubernetes resources.

D. In the cluster's definition in Deployment Manager, add a metadata that has kube-system as key and the DaemonSet manifest as value.

This is the best option for creating a DaemonSet in a Kubernetes cluster using Deployment Manager. You can define the DaemonSet in the Deployment Manager manifest and specify it as a metadata value in the Kubernetes cluster's definition. This will create the DaemonSet in the kube-system namespace of the Kubernetes cluster.

Overall, Option D is the simplest and most efficient way to create a DaemonSet in a Kubernetes cluster using Deployment Manager.