GeekCoding101

  • Home
  • GenAI
    • Daily AI Insights
    • Machine Learning
    • Transformer
    • Azure AI
  • DevOps
    • Kubernetes
    • Terraform
  • Technology
    • Cybersecurity
    • System Design
    • Coding Notes
  • About
  • Contact
ExternalName
Kubernetes

ExternalName and LoadBalancer - Ultimate Kubernetes Tutorial Part 5

Introduction Hey, welcome back to my ultimate Kubernetes tutorials! So far, we've explored ClusterIP and NodePort, but what if you need to route traffic outside your cluster or expose your app with a real external IP? That’s where ExternalName and LoadBalancer services come in. ExternalName lets your pods seamlessly connect to external services using DNS, while LoadBalancer provides a publicly accessible endpoint for your app. In this post, we’ll break down how they work, when to use them, and how to configure them in your Kubernetes cluster. Let’s dive in! 🚀 Exploring ExternalName Service Okay, we're still in my nginx/testpod environment in namespace service-type-test In our last post, we have ClusterIP running, let's delete it to get a clean environment to start: kubectl apply -f /home/admin/nginx-deployment/nginx-clusterip-service.yaml kubectl get service -n service-type-test -o wide You should not see any service is running in above output. Now, let's work on  ExternalName! Creating an ExternalName service is simpler than creating NodePort or ClusterIP , a little bit... create a file /home/admin/nginx-deployment/nginx-externalname-service.yaml: apiVersion: v1 kind: Service metadata: name: nginx-service namespace: service-type-test spec: type: ExternalName externalName: my-nginx.external.local Unlike ClusterIP, NodePort, LoadBalancer, or Headless services, this service does not select backend pods. Instead, it just creates a DNS alias that redirects traffic to an external hostname. So: No selector needed → It does not route traffic to Kubernetes pods. No labels needed → There’s no pod matching required since it’s just a DNS pointer. It simply returns the CNAME record when queried inside the cluster. Simpler on Kubernetes side, but more manual steps on your own side…

March 18, 2025 0comments 160hotness 0likes Geekcoding101 Read all
Newest Hotest Random
Newest Hotest Random
A 12 Factor Crash Course in Python: Build Clean, Scalable FastAPI Apps the Right Way Golang Range Loop Reference - Why Your Loop Keeps Giving You the Same Pointer (and How to Fix It) Terraform Associate Exam: A Powerful Guide about How to Prepare It Terraform Meta Arguments Unlocked: Practical Patterns for Clean Infrastructure Code Mastering Terraform with AWS Guide Part 1: Launch Real AWS Infrastructure with VPC, IAM and EC2 ExternalName and LoadBalancer - Ultimate Kubernetes Tutorial Part 5
Mastering Terraform with AWS Guide Part 1: Launch Real AWS Infrastructure with VPC, IAM and EC2Terraform Meta Arguments Unlocked: Practical Patterns for Clean Infrastructure CodeTerraform Associate Exam: A Powerful Guide about How to Prepare ItGolang Range Loop Reference - Why Your Loop Keeps Giving You the Same Pointer (and How to Fix It)A 12 Factor Crash Course in Python: Build Clean, Scalable FastAPI Apps the Right Way
Master Gradient Descent and Binary Classification: Supervised Machine Learning – Day 9 Supervised Machine Learning - Day 1 Weight Initialization: Unleashing AI Performance Excellence Terraform Associate Exam: A Powerful Guide about How to Prepare It Finished Machine Learning for Absolute Beginners - Level 1 Discovering the Joy of Tokens: AI’s Language Magic Unveiled
Newest comment
Tag aggregation
AI Daily.AI.Insight Machine Learning Supervised Machine Learning cybersecurity notes Transformer security

COPYRIGHT © 2024 GeekCoding101. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang