Member-only story
In this blog, we will explore how we can access the kubernetes applications externally using Services
Prerequisite:
- Functional Kubernetes Cluster configured
- Kubernetes’ command-line tool, kubectl, which is the command-line interface for running commands against Kubernetes clusters.
- Clone this git repo for all the yaml files which we will be using in this blog
Agenda:
- Create a Kubernetes Cluster
- Firewall Rules Configured
- Create a POD
- ClusterIp Service
- NodePort Service
- LoadBalancer Service
Create a Kubernetes cluster
To get more details about how to create, please follow this blog.
Create a VPC
gcloud compute networks create vpc-k8s
Create a firewall rule with tag cluster
gcloud compute firewall-rules create allow-ext1 --allow tcp:22,tcp:6443,icmp --network vpc-k8s --target-tags=cluster --source-ranges 0.0.0.0/0