How to get LoadBalancer IP in Kubernetes using Terraform script

0 votes

Hi Guys,

I have exposed the Pod in Kubernetes using the Terraform script. Now I want to get the LoadBalancer IP. How can I do that?

Sep 27, 2020 in Terraform by akhtar
• 38,170 points
228 views

1 answer to this question.

0 votes

Hi@akhtar,

In your Terraform script, you can output parameter to print any result in your command line. In your case, you can get the IP using the below-given example.

output "load_balancer_ip" {
  value = "${kubernetes_service.example.load_balancer_ingress.0.ip}"
}
answered Sep 27, 2020 by MD
• 95,060 points

Related Questions In Terraform

0 votes
1 answer

How to expose a Pod in Kubernetes using Terraform?

Hi@MD, You can use kubernetes_service resource to expose ...READ MORE

answered Sep 27, 2020 in Terraform by akhtar
• 38,170 points
104 views
0 votes
1 answer

How to create one key in AWS using terraform?

Hi@akhtar, You can use aws_key_pair resource n terraform. ...READ MORE

answered Jun 11, 2020 in Terraform by MD
• 95,060 points
559 views
0 votes
1 answer

How to create a folder in S3 bucket using terraform?

Hi@akhtar, You can use aws_s3_bucket_object resource to create one ...READ MORE

answered Jun 11, 2020 in Terraform by MD
• 95,060 points
2,494 views
0 votes
1 answer

How to do ssh in EC2 instance using Terraform?

Hi@akhtar, To ssh in your EC2 instance, you ...READ MORE

answered Jun 15, 2020 in Terraform by MD
• 95,060 points
2,675 views
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
9,916 views
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 11, 2019 in Kubernetes by Kalgi
• 52,310 points

reshown Apr 12, 2019 by Kalgi 3,017 views
0 votes
1 answer

How to attach Elastic IP in EC2 instance using Terraform code?

Hi@akhtar, You can use aws_eip resource in your ...READ MORE

answered Jul 22, 2020 in Terraform by MD
• 95,060 points
2,803 views
0 votes
1 answer

How to create a namespace in the Kubernetes cluster using Terraform?

Hi@akhtar, You can use kubernetes_namespace resource in your ...READ MORE

answered Sep 13, 2020 in Terraform by MD
• 95,060 points
401 views