The Wayback Machine - https://web.archive.org/web/20240925233114/https://www.geeksforgeeks.org/kubernetes-service/
Open In App

What are Kubernetes Services? | Complete Guide

Last Updated : 28 May, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

In Kubernetes, each pod is assigned its IP address but the pods are ephemeral that is they can be destroyed easily and when a new pod is created in place of them a new IP address is assigned to them. Here the role of services comes into the picture. A service is like a permanent IP address assigned to a pod. A service IP address is stable. So instead of sending a request to a pod, the client requests a service, and the service forwards that request to the desired pod. Services also help in load-balancing.

What Are Services in Kubernetes?

Service in Kubernetes will expose the application which is running in the pods to the internet. Each service will have its own set of endpoints from where they can be accessed from the internet.

For example, if you deployed a web application in the Kubernetes cluster with five replicas then you can access the five replicas with a single URL. The traffic will be routed to all the pods based on their incoming traffic. You can use ingress control to control the incoming traffic.

How do Kubernetes Service Work?

Kubernetes services act as an abstraction layer that exposes the applications in the running pods to other services or external clients. They provide a stable endpoint and load balancing features for accessing pods within a kubernetes cluster. It provides a seamless communication between different parts of an application. Kubernetes services use labels and selectors for dynamically routing the traffic to the appropriate pods. It ensure high availability and reliability to the application.

kubernetes Service works

How do You Define A Kubernetes Service?

In the kubernetes cluster, there are no.of objects which are having there own use cases and individual advantages. Same way service is part of objects which are present in kubernetes. To create an object or operate an object you can use the kubectl tool.

Example

apiVersion: v1
kind: Service
metadata:
name: deployment-service
spec:
selector:
Tomcat: deploymentapp
ports:
- protocol: TCP
port: 80
targetPort: 8080

In the above we are exposing the Tomcat application deployed in the kubernetes cluster with labels of Tomcat: deployment app port: 80 is the port exposed internally in the cluster and port 8080 is the port of the Tomcat application.

Port Definitions

In the kubernetes service, there is one section called targetPort in the nodePort service instead of using the port number you can directly use the name of the pods.

Example

kind: Pod
metadata:
name: tomcat
labels:
deployemnt: deployemnet-java
spec:
containers:
- name: tomcat
image: tomact:latest
ports:
- containerPort: 8080
name: http-deplyment-port

---
apiVersion: v1
kind: Service
metadata:
name:tomcat-service
spec:
selector:
deployemnt: deployemnet-java
ports:
- name: name-of-service-port
protocol: TCP
port: 80
targetPort:http-deplyment-port

For example, we can see that instead of using the “targetPortnumber” you can use the name of the container as mentioned below. The target port is the port number that the service or pod is forwarding requests to.

Services Without Selectors

This type of service will be exposed to all the pods in the kubernetes cluster. If the service is having selectors then that service will be exposed to only certain pods in the kubernetes cluster. We can use this special case of pods for different situations as the following:

Example

apiVersion: v1
kind: Service
metadata:
name: tomcat-service
spec:
ports:
- protocol: TCP
port: 80
targetPort: 8080

You can map the service to the required object by using the network address and port with the help of the Endpoint slice object manually.

EndpointSlices

EndpontSlices are the object available in the kubernetes cluster from Kubernetes v1.21 [stable]. Endpontslice main function is to break endpoints into smaller manageable segments. The limit of pods that can find in each endpoint slice was 100 pods. The new endpoint slice will be created only when the Endpointslice is filled up with 100 endpoints.

Custom EndpointSlices

The custom name can be given to endpoint slices when you create a new endpoint slice. By using the following EndpointSlices you can create custom Endpoint Slices.

Example

apiVersion: discovery.k8s.io/v1beta1
kind: EndpointSlice
metadata:
name: my-custom-endpointslice
spec:
endpoints:
- addresses:
- 10.1.2.3
ports:
- name: http
protocol: TCP
port: 80

Application Protocol

The application protocol is the field where you can mention the type of protocol that a specific service is listening to. The protocol can be anything that depends upon our requirements here are the some of application protocols.

  1. TCP
  2. UDP
  3. HTTP
  4. HTTPS

Mostly the service will listen to the TCP protocol. If the service is TCP protocol the service will be load balancing service and if it is HTTP protocol the service type will be ingress.

Multi-Port Services

Multi-port Service allows you to expose different protocols to the same service or different applications on the same service. You can configure multiple ports using the object in kubernetes called to service.

Example

apiVersion: v1
kind: Service
metadata:
name: tomcat-service
spec:
ports:
- name: http
port: 8080
protocol: TCP
- name: https
port: 43
protocol: TCP

By using the yaml which is mentioned above you can expose multiple ports but the IP address and DNS name will be the only one with that you can use various services.

Load Balancers With Mixed Protocol Types

The service type LoadBalancer can have multiple ports but it should have only one protocol and which is supported by the cloud provider. You can have a kubernetes service that exposes protocols like TCP and UDP ports, which is called a mixed protocol service.

Choosing Your Own IP Address

Kubernetes will assign the IP address from within the service-cluster-ip-range CIDR range or you can choose your own customized IP address. You can reuse the DNS or IP address already in the kubernetes cluster. For reusing, you need to request while creating the service itself.

Example

apiVersion: v1
kind: Service
metadata:
name: tomcat-service
spec:
clusterIP: 10.10.10.10
ports:
- name: http
port: 8080
protocol: TC

Once you applied the above specification after that you can access the Tomcat application from the internet by using the IP address you mentioned in the yaml file our case it will be 10.10.10.10. You can also try the above yaml file to create your own customized IP address.

Choosing Your Own Port

While exposing the pod to the internet we will use service objects in the Kubernetes cluster. We will use mainly the nodePort service in Kubernetes while exposing the pod in Kubernetes. You can mention your own port in the yaml in the section which is called nodePort: <PortNumber>. On this port, the users can access the service from the internet and the service will listen on the port which you have mentioned.

Example

apiVersion: v1
kind: Service
metadata:
name: tomcat-service
spec:
type: NodePort
selector:
app: Webapp
ports:
- port: 80
targetPort: 8080
# Control Plane in kubernetes will allocates an default
IPaddress which is in the range of various between 30000-32767.
nodePort: 300023
Service type

Types of Services

There are four major types of services which are having their advantages in their perspective as explained following.

  1. ClusterIP
  2. NodePort
  3. LoadBalancer
  4. ExternalName
  5. Headless

1. ClusterIP

When we create a service we will get one Virtual IP (Cluster IP) it will get registered to the DNS(kube-DNS). Using this Other Pds can find and talk to the pods of this service using the service name. Service is just a logical concept, the real work is being done by the “kube-proxy” pod that is running on each node. It redirects requests from Cluster IP(Virtual IP Address) to Pod IP.

Example

apiVersion: v1
kind: Service
metadata:
name: nginxsvc
spec:
selector:
app: nginx
type: ClusterIP
ports:
- name: http
port: 80
targetPort: 80
protocol: TCP

ClusterIP Service ( Internal Service)

In this service type when a Client makes a request then that request is first forwarded to the ingress controller and the ingress controller forwards it to the cluster service and then this service forwards it to the appropriate pod. When there are many replicas of a pod then these replicas serve as the endpoints of service and here service also works as a load balancer and forwards requests to the pod replica having the least load. This service is an Internal service because external traffic cannot directly access the cluster service. It can only be accessed via the Ingress Controller.

Example: Let us make a ClusterIP service for the Nginx Web Server using the following configuration:

Nginx Service Yaml File

Also, the ClusterIP service is the default service if we do not specify the service type in the config file as in the example above.

  • Now we can create this service by applying the following command:

$ kubectl apply -f [file-name]

kubectl apply

2. NodePort Service (External Service)

In NodePort Service, external service has access to a fixed port on each Worker Node. In this case, instead of ingress, the browser request will directly come to the node at the port defined in the service config file and be exposed at the node port. The node port can range between 30000 to 32767. 

Example: 

yaml file for node port

  • Now we can create this service by applying the following command

$ kubectl apply -f [file-name]

3. LoadBalancer

Exposes the service externally using a cloud provider’s load balancer. NodePort and ClusterIP services, to which the external load balancer will route, are automatically created. If you are using a custom Kubernetes Cluster (using minikube, kubeadm, or the like). In this case, there is no LoadBalancer integrated (unlike AWS EKS or Google Cloud, KOPS, and AKS). With this default setup, you can only use NodePort.

Example

apiVersion: v1
kind: Service
metadata:
name: javawebappsvc
spec:
ports:
- port: 80
targetPort: 8080
selector:
app: javawebapp
type: LoadBalancer

4. ExternalName

  • An ExternalName is a type of service in kubernetes that maps the service to a DNS name outside the cluster. It redirects the requests to the specified DNS name.
  • The following yaml based configuration file of ExternalName service:
apiVersion: v1
kind: Service
metadata:
name: my-external-service
spec:
type: ExternalName
externalName: example.com

5. Headless Service

Headless is a type of service in kubernetes that doesn’t assign a ClusterIP to the service instead it returns a DNS records for individual pods. It allows the direct communication with pods without using a load balancer.

  • The following yaml based configuration file of Headless service:
apiVersion: v1
kind: Service
metadata:
name: my-headless-service
spec:
clusterIP: None
selector:
app: my-app
ports:
- protocol: TCP
port: 80
targetPort: 8080
  • To know more about the types of services, refer this – Article

How do You Access A Kubernetes Service? A Step-By-Step Guide

We can access the kubernetes service using the services such as ClusterIP, NodePort ot LoadBalancer IP along with defining the port number. Clients within the cluster uses the service name and port. And the clients who are outside the cluster uses the cluster’s external IP or DNS name. The following are the step by step guide for accessing the kubernetes service.

Step 1: Create A Pod

  • Firstly create a yaml file for defining a pod application with a file name my-pod.yaml
  • The following is the pod yaml file code that is used here:
apiVersion: v1
kind: Pod
metadata:
name: my-pod
spec:
containers:
- name: my-container
image: nginx
ports:
- containerPort: 80
  • After once the file has created, then apply the definitions for creating the pod resources using the following command:
kubectl apply -f my-pod.yaml

Accessing Service Using NodePort

Step 2: Create A Service With NodePort

  • For accessing the pod application externally from the cluster, we have to expose the service using NodePort. For that we creating service yaml file with name my-service.yaml .The file code looks as follows:
apiVersion: v1
kind: Service
metadata:
name: my-service
spec:
selector:
app: my-app
ports:
- protocol: TCP
port: 80
targetPort: 80
type: NodePort
  • Apply the service yaml file definitions using the following command:
kubectl apply -f my-service.yaml

Step 3: Access The Service

  • Now, get the NodePort that is assigned to the service:
kubectl get svc my-service
  • Access the service using any node’s IP and the NodePort as shown in below:
curl http://<node-IP>:<NodePort>

Accessing Application Using Service Type ClusterIP

Step 2: Create A Service Using ClusterIP

  • For creating a ClusterIP kind service to communicate with the application within the cluster, create a yaml file with name “my-clusterIP-service.yaml” as shown in the below:
apiVersion: v1
kind: Service
metadata:
name: my-service
spec:
selector:
app: my-app
ports:
- protocol: TCP
port: 80
targetPort: 80
  • Once, the my-clusterIP-service.yaml file is defined, then apply the definition to create the service as per requirement with ClusterIP type using the following command to apply.
kubectl apply -f my-service.yaml

Step 3: Access the Service Using ClusterIP

  • Access the service within the cluster using the service name will looks as follows:
curl http://my-service:80

Accessing Service Using Load Balancer

Step 2: Create A Service With Load Balancer

  • For creating a load balancer service, create a yaml file with name “my-loadbalancer-service.yaml” as shown in the below:
apiVersion: v1
kind: Service
metadata:
name: my-loadbalancer-service
spec:
selector:
app: my-app
ports:
- protocol: TCP
port: 80
targetPort: 80
type: LoadBalancer
  • After once created the my-loadbalancer-service.yaml file then apply the definition changes with the following command:
kubectl apply -f my-loadbalancer-service.yaml

Step 3: Access The Load Balancer

  • Fristly in this get the external IP address of the Load balancer with the following command:
kubectl get svc my-loadbalancer-service
  • Access the application using the service using the LoadBalancer’s External IP:
curl http://<LoadBalancer-External-IP>:80

Accessing Service Using External IP

Step 2: Create A Service External IP

  • For creating a External IP service, create a yaml file with name “external-service.yaml” as shown in the below assuming that the IP is already available:
apiVersion: v1
kind: Service
metadata:
name: my-external-service
spec:
selector:
app: my-app
ports:
- protocol: TCP
port: 80
targetPort: 80
externalIPs:
- <External-IP>
  • After once created the external-service.yaml file then apply the definition changes with the following command:
kubectl apply -f external-service.yaml

Step 3: Access The Service using External IP

  • Access the service using the External IP as shown in the following:
curl http://<External-IP>:80

Accessing Service using Headless Service

Step 2: Create A Service of Headless Type

  • For creating a Headless service, create a yaml file with name “my-headless-service.yaml” as shown in the below assuming that the IP is already available:
apiVersion: v1
kind: Service
metadata:
name: my-headless-service
spec:
selector:
app: my-app
clusterIP: None
ports:
- protocol: TCP
port: 80
targetPort: 80
  • After once created the my-headless-service.yaml file then apply the definition changes with the following command:
kubectl apply -f my-headless-service.yaml

Step 3: Access Pods Directly via Headless Service

  • Now, get the IPs of the pods that are managed by headless service with the following command:
kubectl get pods -o wide
  • Use the Pod IPs to access the pods directly. The URL looks as follows:
curl http://<pod-IP>:80

Headless Services

Headless Services in Kubernetes comes with specifying the setting of `.spec.clusterIP` to None and doesn’t provide the load balancing features with single IP allocation. Instead it facilitates to have a direct connections to the pods individually. It facilitates with interfacing the external service discovery mechanisms. DNS records, DNS services that are managed by Kubernetes provides endpoint IP’s for these Headless Services.

Headless Service With Selector

Deployments are usually used for stateless applications. However, you can save the state of deployment by attaching a Persistent Volume to it and make it stateful, but all the pods of deployment will be sharing the same Volume, and data across all of them will be the same. SatefulSet is a Kubernetes resource used to manage stateful applications. It manages the deployment and scaling of a set of Pods and provides a guarantee about the ordering and uniqueness of these Pods.

Example

apiVersion: v1
kind: Service
metadata:
name: my-service
spec:
clusterIP: None
selector:
app: my-app
ports:
- name: http
port: 80
targetPort: 8080

When we are using the type of service you will use, you need to give the name “clusterIP: None”.

Headless Service Without Selector

On without using the selectors features kubernetes doesn’t able to create the ENdpointSlice objects. The configuration of DNS depends on the type of service, some of them discussed as follows:

  • For ExternalNames services, It configures DNS CNAME records.
  • For other types, DNS will generates A or AAAA records for mapping to all IP addresses of ther Service’s ready endpoints.

How to Create and Use A Kubernetes Service to Expose Your Application?: A Step-By-Step Guide

The following are the steps that guides on how to use a service to expose your application:

Step 1: Deploy your Application

Deploy your application using a Deployment or Pod yaml file. Here we are taking deployment yaml configure file that is provided as follows:

apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
spec:
replicas: 3
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
spec:
containers:
- name: my-app-container
image: nginx
ports:
- containerPort: 80
  • Apply the defined yaml configuration file with the following command:
kubectl apply -f deployment.yaml 

Step 2: Create A Kubernetes Service

Create a yaml file for defining the service to the created deployment and making the application be exposed. The service configured yaml file is given as follows:

apiVersion: v1
kind: Service
metadata:
name: my-app-service
spec:
selector:
app: my-app
ports:
- protocol: TCP
port: 80
targetPort: 80
type: NodePort
  • Apply the service resource configuration containing yaml file using the following command:
kubectl apply -f service.yaml

Step 3: Access Your Application

  • Findout the NodePort that is exposed to the created service for the application with the following command:
 kubectl get svc my-app-service
  • Now access your application using any node’s IP and the NodePort.
 curl http://<node-IP>:<NodePort>

Step 4: Optional: Use Ingress

  • If you want to provide the more advanced routing and external access control to the cluster. Consider on using the ingress resource along with the your service.

What are the Differences between Kubernetes Service vs pod?

The following are the differences between Kubernetes Service and Kubernetes Pod:

Feature

Kubernetes Service

Kubernetes Pod

Purpose

It abstracts and exposes a set of pods as a network service

It acts as smallest deployable unit with consisting of one or more containers.

Lifecycle

It is persistent and provides the stable endpoints

It is ephemeral, the containers can be restarted individually.

Networking

It provides a single stable IP address

In each pod kubernetes provides it own IP address.

Scaling

It facilitates with laod balancing across the multiple pods

It facilitates with scaling the pods at container level with a pod.

Discovery

It enables service discovery using DNS

These are directly discoverable, it needs a service for exposure.

What are the Differences between a Service and a Deployment?

The following are the differences between a Service and A Deployment:

Features

Service

Deployment

Purpose

It used for exposing a set of pods as a network service

It used for managing the lifecycle of a set of pods

Functionality

It provides the access to the pods via networking

It defines the desired pod state and ensure to maintain the current is equal to desired state.

Scaling

It doesn’t handle the scaling feature

It can scale the pods up or down based on the defined rules

Internal IP

It provides a stable internal IP for pod access

It doesn’t provide the internal IP

Exposing Ports

It facilitates to connect with other services or external users by exposing the ports

It doesn’t expose the ports directly.

What are the Differences of Docker Service and Kubernetes Service?

The following are the differences of Docker Serive and Kubernetes Service:

Features

Docker Service

Kubernetes Service

Orchestration

It uses Docker Swarm for the orchestration

It uses Kubernetes for the orchestration of containers.

Load Balancing

It built-in as a simple load balancer

It come switch multiple types of load balancer such as ClusterIP, NodePort, LoadBalancer

Scaling

It basically scales the capabilities

It advances the auto-scaling with Horizantal Pod Autoscaler

Networking

It comes with simple networking

It comes with advance networking with namespaces and NetworkPolicies

Serivce Discovery

It facilitates with DNS based service discovery

It comes with label and selector-based service discovery.

Discovering services

The kubernetes service can be discovered by using two methods as follows.

  1. DNS discovery
  2. Environmental Variables

DNS discovery

When you first create a service kubernetes will automatically create DNS records for the service. The application finds the service in kubernets with the help of DNS discovery which will point to the IP address of the service.

All the cluster services will be stored in the cluster-wide domain which is svc. cluster. local. The format of the DNS record is as follows.

<service-name>.<namespace>.svc.cluster.local

DNS in Kubernetes assigns the domain and sub-domain name to the pods and for service. By which other objects or resources in the Kubernetes cluster can discover services by the domain names.

Environmental Variables

Environmental variables will be helpful for the DNS discovery to discover the service in the Kubernetes cluster. You need to mention the environmental variables in the service yaml file as follows then only DNS discovery will discover the service which is available in the Kubernetes cluster;

apiVersion: v1
kind: Service
metadata:
name: tomcat-service
spec:
selector:
app: my-app
ports:
- name: http
port: 8080
protocol: TCP
env:
- name: SERVICE_IP
value: "127.0.0.1"
- name: SERVICE_PORT
value: "80"

Kubernetes Service – FAQs

What Is Kubernetes Service discovery spring boot?

Spring-cloud-starter-kubernetes it is a dependency in kubernetes cluster

What is a Kubernetes service vs a pod?

Kubernets service allows virtuals routes to the pods. Pods are smallest execution unit in kubernetes cluster.

How do I list services in Kubernetes?

`kubectl get services` is the command used to list all the services in the kubernets cluster.

What is Kubernetes Service Protocol?

Kubernetes service protocol specifies how the network traffic should be handled that coming to kubernetes service such as TCP and UDP.

What are Kubernetes Service Logs?

Kubernetes service logs are the one that captures the activities and events within the kubernetes API server which helps in troubleshooting and monitoring.

What is Kubernetes service account?

Kubernetes service account is a type of resource in kubernetes that provides the identity for processes running in a pod to interact with kubernetes API server which facilitates with managing the access permissions and security.

What is kubernetes service discovery?

It’s a type of mechanism by which kubernetes enable the communication between the services within the kuberentes. It allow the kubernetes services to discover and connect to each other dynamically.

How do I list all the services in kubernetes?

On using the following kubectl command you can list all the services in kubernetes:

kubectl get services

What is service and ingress in kubernetes?

A Kubernetes service is an abstraction resource that helps in exposing the set of pods as a network service whereas Ingress is a service in kubernetes that manages the external access to services typically via HTTP.

Is a Kubernetes Service a Load Balancer?

Yes, Kubernetes Service is a type of Load Balancer that exposes the service externally using a cloud provider’s load balancer.

What is Azure Kubernetes Service (AKS)?

Azure Kuberentes Service inshortly AKS helps in managing the kubernetes service by simplifying the deploy, manage and operating Kubernetes Clusters in Azure.

What types of workloads can I run on AKS?

You can run containerzied applications, microservices, data processing jobs and other more types of workloads on Azure.



Similar Reads

Kubernetes - Creating Deployment and Services using Helm in Kubernetes
Prerequisite: Kubernetes Helm is used for managing your Kubernetes Deployment. With helm, we can tear down and create a deployment with a single command. we will be creating deployment and services using Helm in Kubernetes. For simplicity, we will be using the nginx image. Deployment of nginx using HelmStep 1: We need to install the Helm. You can i
4 min read
Kubernetes NameSpace: Complete Guide.
In Kubernetes, Namespaces are used to organize resources. You can have multiple Namespaces in a Cluster And these Namespaces are kind of virtual Clusters of their own. The official definition of Namespace says "In Kubernetes, namespaces provide a mechanism for isolating groups of resources within a single cluster". Within a Kubernetes Namespace, re
12 min read
What is Kubernetes API ?Complete Guide
Kubernetes API is an application that serves Kubernetes functionality through a RESTful interface and stores the state of the cluster via HTTP. Users can directly interact with the Kubernetes API or via tools like kubectl. It supports retrieving, creating, updating, and deleting primary resources via POST, PUT, PATCH, DELETE, and GET. Kubernetes re
14 min read
AWS Database Services: Complete Guide
AWS Database Services is a group of cloud-based services offered by Amazon Web Services (AWS). These services help businesses and developers manage, process, and analyze their data efficiently and securely. Amazon Web Services (AWS) offers a variety of database services to cater to different application needs. These services are designed to be scal
15 min read
Kubernetes - Monolithic Architecture of Kubernetes
There is a new way of developing software apps using a microservices architecture. That's when all the buzz around containers and container orchestration has increased but we have been developing and using these large software apps even before most of us were born. So in this article, we will be discussing what is that old software architecture we
7 min read
Why Kubernetes? Benefits of using Kubernetes
The popularity of container orchestration technologies specially Kubernetes comes from its use cases and the problems that it solves. Kubernetes is the most popular container orchestration and is widely used by Cloud Native Computing Foundation (CNCF), the foundation to which Kubernetes as a project was donated by Google, estimates that about 92% b
8 min read
Kubernetes Controller VS Kubernetes Operator
Kubernetes Controllers are ideal for managing stateless apps and maintaining the correct number of copies, but Kubernetes Operators are more appropriate for complicated, stateful applications that require human-like decision-making abilities. Kubernetes ControllerKubernetes Controllers are ideal for managing stateless apps and maintaining the corre
4 min read
Kubernetes - Services
Software deployment, scaling, and management are all automated using Kubernetes, an open-source container orchestration system. K8s is another name for Kubernetes. Kubernetes was initially developed by Google and is now managed by the Cloud Native Computing Foundation. Despite the fact that it now supports CRI-O in addition to the Docker runtime, w
3 min read
Kubernetes Ingress Controllers: Routing And Load Balancing For Services
In the dynamic landscape of containerized applications, efficiently orchestrating and managing services is critical. As an effective platform for container orchestration, Kubernetes offers a stable foundation for launching, growing, and overseeing containerized applications. The Ingress controller is a crucial part of Kubernetes that helps with eff
6 min read
Step-by-Step Guide to Access Application Logs in Kubernetes Pods
In a Kubernetes environment monitoring application logs is essential for debugging performance tuning and maintaining the overall health of our application. The Kubernetes pods which are the smallest deployable units in Kubernetes can generate logs that provide valuable insights inside them. In this article we explain about process of accessing the
5 min read
Python For DevOps:  A Complete Guide For Beginners
Today, Python is one of the fastest-growing programming language and Python justify this as well with its wide use in all aspect of the programming domain whether it is software development, data handling, data analysis, or AI. Python is also used by all kinds of departments whether it is operations or IT. This advantage of Python is also helpful i
10 min read
Docker Cheat Sheet : Complete Guide (2024)
Docker is a very popular tool introduced to make it easier for developers to create, deploy, and run applications using containers. A container is a utility provided by Docker to package and run an application in a loosely isolated environment. Containers are lightweight and contain everything needed to run an application, such as libraries and oth
11 min read
Complete Guide To Create AWS API Gateway With Terraform
AWS Application Programming Interface (API) Gateway is a completely managed service presented by Amazon Web Services (AWS) that empowers developers to create, monitor, deploy, and secure APIs at any scale. It goes about as a gateway for managing and routing HTTP and WebSocket traffic to backend service, including AWS Lambda function, Amazon EC2 ins
7 min read
What Is Gitlab? Complete Guide
In the present speedy software development scene, effective coordinated effort, streamlined work processes, and automated processes are fundamental for teams to deliver high-quality software products. GitLab arises as a complete arrangement that coordinates version control, issue tracking, continuous integration/continuous deployment (CI/Cd), and c
8 min read
What Is AWS CLI (Command Line Interface) ? Complete Guide
AWS CLI is a command line tool that is used for managing the AWS Services from the command line. On downloading the AWS CLI software and configuring it with your AWS credentials you can control the AWS services from the command line and can automate the work through scripts. Whether you are launching EC2 instances, attaching the EBS Volumes, or man
13 min read
30 Days of Jenkins: A Complete Guide for Beginners
Ever wondered how these smoothly running applications and systems are deployed and managed effectively? In most cases, continuous integrations and continuous delivery likes of Jenkins have been on the front line of this revolution. Jenkins is an open-source, server-based automation system that developers use in building, testing, and deploying cons
6 min read
100 Days Of DevOps – A Complete Guide For Beginners
In the fast-paced digital world, enterprises survive on agility and innovation. Here is where DevOps comes in; it is a new approach that bridges development and operations. It makes software delivery seamless and enables rapid application deployment. Nevertheless, how do you navigate as an aspiring DevOps practitioner through this exciting, yet int
10 min read
How Raspberry Pi and Kubernetes Work Together?
Pre-requisite: Kubernetes and Raspberry Pi Kubernetes and Raspberry Pi are two popular technologies that can be used together to create powerful and scalable applications. In this article, we will look at what each technology is, how they work together, and the benefits and challenges of using the two technologies together. KubernetesKubernetes is
3 min read
Kubernetes - Kubectl Commands
Pre-requisites: Kubernetes The Kubernetes command-line tool, kubectl, allows you to run commands against Kubernetes clusters. You can use kubectl to deploy applications, inspect and manage cluster resources, and view logs. Some basic Kubectl commands in a Kubernetes cluster are as follows: kubectl Commands The most popular kubectl commands and flag
5 min read
Google Cloud Platform - Using Config Sync for Managing Kubernetes
In this article, we will look into how we can manage Kubernetes using Config Sync. To do so let's create a problem statement and resolve the same. Problem Statement: Ravi has a new role, Platform Administrator, and he is tasked with ensuring all the infrastructure created by all of his company's teams is in compliance with governance requirements.
3 min read
Kubernetes - Introduction to Container Orchestration
In this article, we will look into Container Orchestration in Kubernetes. But first, let's explore the trends that gave rise to containers, the need for container orchestration, and how that it has created the space for Kubernetes to rise to dominance and growth. The growth of technology into every aspect of our lives and days has created immense d
4 min read
Microsoft Azure - Starting & Stopping a Azure Kubernetes Service Cluster
In this article, we will learn how to stop and start Azure Kubernetes Service(AKS) clusters. You can stop your entire Azure Kubernetes Service cluster to save costs. To follow along, you will need an existing Azure Kubernetes service that is running. To use start and stop for AKS, we need the AKS preview extension for the Azure CLI. It can be insta
2 min read
Microsoft Azure - Introduction to Kubernetes Diagnostics
In this article, we will learn how to use Azure Kubernetes Service Diagnostics. A solution that runs inside a Kubernetes cluster can quickly become complex. Azure Kubernetes diagnostics can help you to investigate, diagnose and resolve issues in your cluster quickly. Here we have an AKS cluster running, and it is running a sample application. Let u
2 min read
Microsoft Azure - Availability Zones For Kubernetes Cluster
In this article, we will learn how to create a highly available Kubernetes cluster with availability zones. When you create an Azure Kubernetes service or AKS cluster in Azure, its nodes and storage all reside in the same datacenter. The cluster is protected from hardware failure and maintenance within the data center because the nodes and storage
2 min read
Kubernetes - Autoscaling
Pre-requisite: Kubernetes Life before Kubernetes is like writing our code and pushing the code into physical servers in a data center and managing the resources needed by that server to run our application smoothly and another type is deploying our code in virtual machines(VM). With VMs also have problems with hardware and software components requi
8 min read
Kubernetes - Physical Servers vs Virtual Machines vs Containers
Kubernetes is an open-source framework for managing containerized workloads and services that allows declarative configuration as well as automation. It has a huge and fast-expanding ecosystem. Services, support, and tools for Kubernetes are widely available. Kubernetes is a Greek word that means "helmsman" or "pilot." The acronym K8s comes from co
3 min read
Kubernetes - Taint and Toleration
A pod is a group of one or more containers and is the smallest deployable unit in Kubernetes. A node is a representation of a single machine in a cluster (we can simply view these machines as a set of CPU and RAM). A node can be a virtual machine, a physical machine in a data center hosted on a cloud provider like Azure. When a user runs the below-
6 min read
Microsoft Azure Arc Enabled Kubernetes
In this article we will learn how to get started with Azure Arc enabled Kubernetes in the Azure Portal. Azure Arc enables Kubernetes lets you connect to Azure those Kubernetes clusters which are running outside of Azure. So, these clusters could be running on-premises, on the edge, or on other clouds, and you can use Azure Arc to enable Kubernetes
3 min read
How to Enable JMX For Java Application Running in the Kubernetes Cluster?
Many times we want to monitor our application's CPU utilization, background thread behavior, and most importantly memory consumptions for tasks that deal with loads for data (500MB - 1GB) or much more data. Such monitoring helps to find which operation is causing heavy CPU or Memory utilization and helps to find the reason behind Memory leak issues
3 min read
Enable Remote Debugging For Java Application Deployed in Kubernetes Environment
During Development, developers have to debug their applications to resolve code problems. In order to debug a java application which is deployed on remote machine in a Kubernetes cluster, first developer has to do some steps to enable its application ready for debugging. Below are the manual steps to enable remote debugging for any java application
2 min read