Learning rate schedules and decay using Keras

This article is written solely to brief my comprehension of learning rate schedules, considering my research from many resources, majorly from Adrian Rosebrock’s post. The learning rate is an…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Service Types in Kubernetes?

In kubernetes a service always enables its network access to a pod or set of pods
Services will select the pods based on their labels and when a network is made to those services it selects all Pods in the cluster matching the service’s selector and will choose one of them, and then will forwards the network request to it.

We can use deployment without using service so we can keep a couple of same pods running is K8s cluster

The deployment could be scaled up and down and pods could be replicated.
In kubernetes a single pod can be accessed individually directly via network requests, hence to track pods is a bit difficult

We can always and also use a service type without a deployment part.Here if we do that we would be creating a single pod rather than creating all together like we do in deployment .Then we have alternative that our Service is capable of routing network requests to those pods by selecting on the basis of their labels allocated to them .

In Kubernetes, there are two ways to discover a service:

To understand in a better way with a simple example in the form of the “Hello World” App with help of deployment kind.

As we see the app is deployed and running with Up status, we will NOW create service (ClusterIP) for accessing our application in Kubernetes

Now, let’s create a deployment running

Here this command creates a deployment with two replicas of our application in Kubernetes

Next,

So the app is running now if you want to access the freshly created application, we need to create ClusterIP type of Service

Here, we’ll create a service called example-service with type ClusterIP.

So now we will access our application :

Then, we need to execute command port-forward. Because here our service type is Cluster IP, which can only be accessed within the cluster, we must access our application by forwarding the port to a local port in the cluster .

We can use other types, like “LoadBalanacer”, which will create an LB in AWS or GCP, then we can access the app using the DNS address given to the LB with our port number.

This example YAML creates a Service that is available to external network requests. Here, we mentioned the NodePort with Value so the service is mapped to a port on each node within the cluster.

Here is the example of a yaml code that will show how we use a NodePort service type in Kubernetes.

The type property in the Service's spec determines how the service is exposed to the network. The possibles are ClusterIP, NodePort, and LoadBalancer

If this post was helpful, please click the clap 👏 button below a few times to show your support! ⬇

Add a comment

Related posts:

Dejad de preguntarle a mi hijo si tiene novia

El tema de el amor y los niños es uno de los favoritos de los adultos. El otro día, disfrutando de la nueva anormalidad de paseo por una plaza Coruñesa, me reencontré de lleno con uno de mis viejos…

GYN Appointment

Todays at work I found myself sitting here thinking of you at your GYN appointment today, and how that’s another thing that I took for granted, even the ones that I did go to, I should have gone in…

Social media advertising dashboard

Each of us can have a profile on smm panel social networks. What is the motive of social networks? It can be used to pass by the time, chat with your friends, watch humorous videos, take a look at…