試験CKA トピック2 問題35 スレッド
Linux Foundation CKAのリアル試験問題集
問題 #: 35
トピック #: 2
問題 #: 35
トピック #: 2
You need to deploy a microservice application that uses a custom DNS service for internal communication between microservices. This DNS service is not a standard Kubernetes DNS service. How would you configure Kubernetes to use your custom DNS service for the internal communication of your application?
おすすめの解答:
See the solution below with Step by Step Explanation.
Explanation:
Solution (Step by Step) :
1. Create a ConfigMap for DNS Configuration:
- Create a ConfigMap to store the DNS configuration details for your custom DNS service.
- Example:

- Replace '10.0.0.1 ,10.0.0.2 with the IP addresses of your custom DNS servers and 'my-app.svc.cluster.local' with the search domain for your application. 2. Create a DaemonSet for DNS Configuration: - Create a DaemonSet that will inject the custom DNS configuration into all pods in your cluster. - Example:

- This DaemonSet will use a 'busybox' container to write the DNS configuration from the 'custom-dns-config' ConfigMap to the '/etc/resolv.conf file in every pod. 3. Deploy your Application: - Deploy your microservice application with the appropriate labels to ensure that the DaemonSet injects the custom DNS configuration into your application's pods. 4. Verify DNS Resolution: - Verify that your application's pods can resolve internal DNS names using your custom DNS service. - Example: - You can use the 'nslookup command within a pod to test DNS resolution. 5. Configure Security: - Implement appropriate security measures to protect your custom DNS service and prevent unauthorized access to your application's internal services. - Example: - Consider using a firewall to restrict access to the custom DNS servers. - Configure access control lists to limit access to the DNS service.
Explanation:
Solution (Step by Step) :
1. Create a ConfigMap for DNS Configuration:
- Create a ConfigMap to store the DNS configuration details for your custom DNS service.
- Example:

- Replace '10.0.0.1 ,10.0.0.2 with the IP addresses of your custom DNS servers and 'my-app.svc.cluster.local' with the search domain for your application. 2. Create a DaemonSet for DNS Configuration: - Create a DaemonSet that will inject the custom DNS configuration into all pods in your cluster. - Example:

- This DaemonSet will use a 'busybox' container to write the DNS configuration from the 'custom-dns-config' ConfigMap to the '/etc/resolv.conf file in every pod. 3. Deploy your Application: - Deploy your microservice application with the appropriate labels to ensure that the DaemonSet injects the custom DNS configuration into your application's pods. 4. Verify DNS Resolution: - Verify that your application's pods can resolve internal DNS names using your custom DNS service. - Example: - You can use the 'nslookup command within a pod to test DNS resolution. 5. Configure Security: - Implement appropriate security measures to protect your custom DNS service and prevent unauthorized access to your application's internal services. - Example: - Consider using a firewall to restrict access to the custom DNS servers. - Configure access control lists to limit access to the DNS service.
星野** 2026-07-19 08:49:48
コメント
他人の解答コメントを賛成するのも、その解答に一票を入れることになります。したがって、すでに同じ意見の投票コメントが存在する場合、新規コメントをする代わりに賛成することもできます。
コメントを通報する
コメント中
今すぐ 新規登録 / ログイン (無料です)。