Kubernetes NodePort

My name is Shyju Krishnan having 10+ Years of experience as an IT infrastructure/Solution Architect
Search for a command to run...

My name is Shyju Krishnan having 10+ Years of experience as an IT infrastructure/Solution Architect
No comments yet. Be the first to comment.
In this series, i will brainstorm basic to advanced topics with examples,with commands,with usecases
What is the clusterIP in Kubernetes? Cluster IP is a virtual IP that is allocated by the Kubernetes to a service. It is Kubernetes internal IP. A Cluster IP makes it accessible from any of the Kubernetes cluster’s nodes. The use of virtual IP address...
API (Application Programming Interface) security is critical for protecting sensitive data and maintaining the integrity of systems and applications. APIs are used to connect different systems and applications, and as a result, they can provide a gat...

Well after months of deep slumber, away from social media networks, I had to return to Pune and adapt to hybrid working. I was browsing through meetup.com and was intrigued by one event from AWS user group Pune. It is AWS Reinvent 2022 -Recap on 21st...

Episode 2

Simplify Access Control and Enhance Transparency Over Your ML Projects

Episode 1

# What is a NodePort?
A NodePort is an open port on every node of your cluster. Kubernetes transparently routes incoming traffic on the NodePort to your service, even if your application is running on a different node.
Every Kubernetes cluster supports NodePort, although if you’re running in a cloud provider such as AKS or EKS, you may have to edit your firewall rules. However, a NodePort is assigned from a pool of cluster-configured NodePort ranges (typically 30000–32767). While this is likely not a problem for most TCP or UDP clients, HTTP or HTTPS traffic ends up being exposed on a non-standard port.
Example:
apiVersion: v1
kind: Service
metadata:
name: my-service
spec:
type: NodePort
selector:
app: MyApp
ports:
# By default and for convenience, the `targetPort` is set to the same value as the
`port` field.
- port: 80
targetPort: 8080
# Optional field
# By default and for convenience, the Kubernetes control plane will allocate a port
from a range (default: 30000-32767)
nodePort: 30007

Hope you have got an idea about Kubernetes Nodeport and why it is needed
Thank you !