Let's Learn Kubernetes - Basics - 2
Tags: kubernetes, devops, beginners, go
Published: 2021-10-11 18:43:26

Kubernetes is a container management tool that automates the deployment, scaling, and operations of an application. It has become the de facto container orchestrator, with more than 80% of companies using it in some capacity. 
In the previous blog of ['Let's learn Kubernetes'](https://dev.to/pghildiyal/let-s-learn-kubernetes-basics-part-1-3of7) Series, we have seen the basic definition of Kubernetes, pods, Nodes, controllers among others. 

{% link pghildiyal/let-s-learn-kubernetes-basics-part-1-3of7 %}

In this series we will go a little deeper to understand concepts like services, Load balancers and others. In this we'll give a short explanation of each concept and then post a link that explains the same in-depth. 

Before diving in, it would be great if you can check out our repo Devtron, End-to-End Kubernetes Software Delivery Workflow, which makes the DevOps workflow flawless for Developers, DevOps Engineers.
{% github devtron-labs/devtron no-readme %}

## Services
Kubernetes Services enables a group of pods that provide a specific function to have a unique IP Address and a name. A Kubernetes service can be used to easily expose an application deployed on a set of pods using a single endpoint. Service is both a REST object and an abstraction that defines:

* A set of pods
* A policy to access them

The article discusses what are Kubernetes services, Attributes of the K8s services, Defining them and creating new services.

#### [Kubernetes Services](https://www.bmc.com/blogs/kubernetes-services/)

## Load Balancer, ClusterIP, NodePort

### Load Balancer
Load balancing is a technique for distributing network traffic or client requests among many servers. The load balancer, when utilized correctly, may assist to optimise scalability and availability.  This is a crucial technique that should be correctly implemented in a solution; otherwise, clients will be unable to contact the servers.

### ClusterIP

Within your cluster, a ClusterIP offers network communication. It is generally inaccessible from the outside. You can utilise these services to connect your workloads inside.

### NodePort
Every node in your cluster has an open port called a NodePort. Even if your application is operating on a separate node, Kubernetes transparently redirects incoming traffic on the NodePort to your service.


A Comprehensive video by Nana explaining what is Loadbalancer, ClusterIP & Nodeport and the difference between them.

{% youtube T4Z7visMM4E %}

You can also read a detailed article on ClusterIP here:

#### [Working With ClusterIP Service Type In Kubernetes](https://medium.com/the-programmer/working-with-clusterip-service-type-in-kubernetes-45f2c01a89c8)

## Ingress

Kubernetes Ingress is an API object that provides routing rules to manage external users' access to the services in a Kubernetes cluster, typically via HTTPS/HTTP.

Below write-up gives a comprehensive look of what is Ingress and what is its uses.

#### [What is Kubernetes Ingress?](https://www.ibm.com/cloud/blog/kubernetes-ingress)

## Ingress Controller

An Ingress controller is a specialized load balancer for Kubernetes (and other containerized) environments. An Ingress controller abstracts away the complexity of Kubernetes application traffic routing and provides a bridge between Kubernetes services and external ones.

#### [Ingress controller](https://www.nginx.com/resources/glossary/kubernetes-ingress-controller/)

Below link defines Ingress controller and what it can do.

## DNS for K8s
In the Article below, it is explained how DNS can help make it easier to access services.

#### [Kubernetes DNS for Services and Pods](https://medium.com/kubernetes-tutorials/kubernetes-dns-for-services-and-pods-664804211501)

I will be continuing this series to include more fundamental topics of Kubernetes under 'Let's learn Kubernetes' series title.