
Answer-first summary for fast verification
Answer: Create a Kubernetes Service of type NodePort for your application, and a Kubernetes Ingress to expose this Service via a Cloud Load Balancer.
The correct answer is A. By creating a Kubernetes Service of type NodePort and using a Kubernetes Ingress, you can expose the service via a Cloud Load Balancer, which supports HTTPS and provides the necessary load balancing for public access. Option B is incorrect as ClusterIP only provides an internal IP and cannot expose the service externally. Option C is also incorrect because configuring the public DNS name with the IP of every node does not provide proper load balancing. Option D is not suitable either, as HAProxy does not support HTTPS, and configuring iptable rules is more suitable for on-premises setups than for cloud environments.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You have deployed a new application on Google Kubernetes Engine (GKE) with autoscaling enabled for handling variable workloads effectively. Your goal is to make this application accessible to the public over the internet using HTTPS, secured on a public IP address. What steps should you take to achieve this?
A
Create a Kubernetes Service of type NodePort for your application, and a Kubernetes Ingress to expose this Service via a Cloud Load Balancer.
B
Create a Kubernetes Service of type ClusterIP for your application. Configure the public DNS name of your application using the IP of this Service.
C
Create a Kubernetes Service of type NodePort to expose the application on port 443 of each node of the Kubernetes cluster. Configure the public DNS name of your application with the IP of every node of the cluster to achieve load-balancing.
D
Create a HAProxy pod in the cluster to load-balance the traffic to all the pods of the application. Forward the public traffic to HAProxy with an iptable rule. Configure the DNS name of your application using the public IP of the node HAProxy is running on.
No comments yet.