PermalinkWhat are Services in K8s?
In Kubernetes, Services are objects that provide stable network identities to Pods and abstract away the details of Pod IP addresses. Services allow Pods to receive traffic from other Pods, Services, and external clients.
instead of the todo-app, I have chosen the vk-notes-app to complete this task.
Step 1: Create a Service YAML File (service.yml)
Step 2: Apply the Service Definition
kubectl apply -f service.yml -n <namespace-name>
Step 3: Verify the Service
minikube service notes-app-service -n <namespace-name>
Step 1: Update the ClusterIP Service YAML File (cluster-ip-service.yml)
Step 2: Apply the Updated ClusterIP Service Definition
kubectl apply -f cluster-ip-service.yml -n <namespace-name>
Step 3: create a simple test Pod
Step 4: Apply the test Pod YAML
kubectl apply -f test-pod.yml -n <namespace-name>
Step 5: Once the test Pod is running, you can use kubectl exec
to access it
kubectl exec -it test-pod -n <namespace-name> -- /bin/sh
Yes, it appears that we have successfully accessed the test Pod named "test-pod" within the "my-notes-app" namespace. we are now inside the test Pod, as indicated by the / #
prompt.
Step 1: Create a NodePort Service YAML File (load-balancer-service.yml)
Step 2: Apply the LoadBalancer Service Definition
Step 3: Verify the LoadBalancer Service
Thank you so much for reading
Follow me on LinkedIn to see interesting posts like this : )
Subscribe to our newsletter
Read articles from Vrishni Blog directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Article Series
DevOps, Day - 80 to 90
"We've successfully conquered every task in this epic challenge! From Day 80 to 90, we've dedicated β¦
DevOps, Day - 79
The architecture of Prometheus Monitoring: Prometheus follows a pull-based model that scrapes metricβ¦
DevOps, Day - 77
Grafana Alerting allows you to learn about problems in your systems moments after they occur. Createβ¦
DevOps, Day - 76
A dashboard gives you an at-a-glance view of your data and lets you track metrics through different β¦
DevOps,Day - 75
Hope you all have docker installed by this time : ) Now Download the Loki Config file into your currβ¦
DevOps, Day - 74
Launch EC2 Instances: Launch an Amazon Linux EC2 instance for the Linux server and a Windows EC2 inβ¦
DevOps, Day - 73
Hope you are now clear with the basics of grafana, like why we use it, where we use it, what can we β¦
DevOps, Day - 72
Today letβs monitor the resources in a smart way with - Grafana π Grafana is an open-source, featβ¦
DevOps, Day - 71
What is Terraform and how is it different from other IaaC tools? Terraform is an Infrastructure as β¦
DevOps, Day - 70
Modules are containers for multiple resources that are used together. A module consists of a collectβ¦
DevOps, Day - 69
Count The count meta-argument accepts a whole number and creates the number of instances of the resoβ¦
DevOps, Day - 68
Understanding Scaling Scaling is the process of adding or removing resources to match the changing dβ¦
DevOps, Day - 67
Create a main.tf file as shown. Run terraform init Before running terraform apply command, create β¦
DevOps, Day - 66
I would request you to see my blog on this project here Thank you so much for reading Follow me on β¦
DevOps, Day - 65
Understanding Terraform Resources A resource in Terraform represents a component of your infrastructβ¦
DevOps, Day - 64
Create a main.tf file and add the following Terraform configuration provider "aws" { region = "us-β¦
DevOps, Day - 63
Using Map Data Type stop and remove the running container docker stop <container_id> docker rm <conβ¦
DevOps, Day - 62
Terraform needs to be told which provider to use in the automation, hence we need to give the providβ¦
DevOps, Day - 61
terraform init: Purpose: Initializes a new or existing Terraform working directory. Use: You run tβ¦
DevOps, Day - 60
What is Terraform? Terraform is an infrastructure as code (IaC) tool that allows you to create, manaβ¦
DevOps, Day - 59
1. Create 3 EC2 Instances with the Same Key Pair You can use AWS CLI or AWS Management Console to crβ¦
DevOps, Day - 58
Ansible playbooks run multiple tasks, assign roles, and define configurations, deployment steps, andβ¦
DevOps, Day - 56,57
Ansible ad hoc commands are one-liners designed to achieve a very specific task they are like quick β¦
DevOps, Day - 55
What is Ansible? Ansible is an open-source automation tool, or platform, used for IT tasks such as cβ¦
DevOps, Day - 54
What's the difference? When it comes to the cloud, Infrastructure as Code (IaC) and Configuration Maβ¦
DevOps, Day - 50,51,52,53
AWS Codecommit, Codebuild, Codedeploy and CodePipeline Showcasing the power of seamless DevOps automβ¦
DevOps, Day - 49
AWS Services and Use Cases: Amazon S3 (Simple Storage Service): Used for object storage. You can stβ¦
DevOps, Day - 48
What is ECS? ECS (Elastic Container Service) is a fully managed container orchestration service proβ¦
DevOps, Day - 47
1. Launch an EC2 Instance: 2. Install a Web Server and Deploy a Web Application: Update the Packagβ¦
DevOps, Day - 46
What is Amazon CloudWatch? Amazon CloudWatch monitors your Amazon Web Services (AWS) resources and tβ¦
DevOps, Day - 45
You can use the same instance and RDS which was created in the previous blog :) OR You can create a β¦
DevOps, Day - 44
Step 1: Create a Free Tier RDS instance of MySQL Log in to your AWS Management Console. Navigate tβ¦
DevOps, Day - 43
S3 Amazon Simple Storage Service (Amazon S3) is an object storage service that provides a secure andβ¦
DevOps, Day - 42
IAM Programmatic access To access your AWS account from a terminal or system, you can use AWS Accessβ¦
DevOps, Day - 41
What is Load Balancing? Load balancing is the distribution of workloads across multiple servers to eβ¦
DevOps, Day - 40
Automation in EC2 Amazon EC2 or Amazon Elastic Compute Cloud can give you secure, reliable, high-perβ¦
DevOps, Day - 39
By this time you have created multiple EC2 instances, and post installation manually installed appliβ¦
DevOps, Day - 38
AWS Amazon Web Services is one of the most popular Cloud Providers that has a free tier for studentsβ¦
DevOps, Day - 37
What is Kubernetes and why it is important? Kubernetes is an open-source container orchestration plβ¦
DevOps, Day - 36
What are Persistent Volumes in k8s In Kubernetes, a Persistent Volume (PV) is a piece of storage in β¦
DevOps, Day - 35
What are ConfigMaps and Secrets in k8s In Kubernetes, ConfigMaps and Secrets are used to store confiβ¦
DevOps, Day - 34
What are Services in K8s? In Kubernetes, Services are objects that provide stable network identitiesβ¦
DevOps, Day - 33
What are Namespaces and Services in k8s? Namespaces in Kubernetes are a way to create virtual clustβ¦
DevOps, Day - 32
Step 1: Create a deployment file. Step 2: Apply the Service. Step 3: Retrieve information about thβ¦
DevOps, Day - 31
Minikube is a tool which quickly sets up a local Kubernetes cluster on macOS, Linux, and Windows. Itβ¦
DevOps, Day - 30
What is Kubernetes? Write in your own words and why do we call it k8s? 1. What is Kubernetes (K8s)? β¦
DevOps, Day - 29
Whatβs the difference between continuous integration, continuous delivery, and continuous deploymentβ¦
DevOps, Day - 28
Setting Up Jenkins Agent on AWS EC2 and Running Jobs with Master-Triggered Builds Jenkins Master β¦
DevOps, Day - 27
Day 26 was all about a Declarative pipeline, now it is time to level up things, let's integrate Dockβ¦
DevOps, Day - 26
As we previously used a Jenkins Freestyle project, today we will be selecting a Jenkins Pipeline insβ¦
DevOps, Day - 23, 24 & 25
What is CI/CD? CI (Continuous Integration) - Developers frequently combine their code changes into aβ¦
DevOps, Day - 22
Refer to this blog for installation in your OS (land on 5th point)--> Jenkins installation After insβ¦
DevOps, Day - 21
Let's see some interesting interview questions on docker π Interview Questions With Deep Meaningfulβ¦
DevOps, Day - 20
Here are the most commonly used docker commands : ) Thank you so much for reading. Follow me oβ¦
DevOps, Day - 19
Docker volumes are a way to store data generated by containers. Volumes can be shared between contaβ¦
DevOps, Day - 18
Docker compose Docker Compose is a tool for managing complex multi-container Docker applications. β¦
DevOps, Day - 17
Dockerfile A Dockerfile is a text file that contains instructions for building a Docker image. Thβ¦
DevOps, Day - 16
Docker Docker is a software platform that enables you to create, deploy, and run applications in isβ¦
DevOps, Day - 15
Reading JSON and YAML in Python Basic differences between YAML and JSON As a DevOps Engineer, you β¦
DevOps, Day - 14
Please go through Python data typesβ‘οΈ Here Data Structures in Python In Python, a data structure is β¦
DevOps, Day - 13
what is Python? Python is a type of computer language that people use to tell computers what to do. β¦
DevOps, Day - 12
Basic Linux Commands Basic Git & Github Commands Thank you so much for reading. Follow me on Linkeβ¦
DevOps, Day - 11
What is git stash? git stash is a command in Git that allows you to save your changes without comβ¦
DevOps, Day - 10
what is git branching? Git branching is a feature of the Git version control system that allows yβ¦
DevOps, Day - 8 & 9
What is Git? Git is like a digital filing cabinet for code. It helps keep track of changes made tβ¦
DevOps, Day - 7
What is a package manager in Linux? Linux uses packages to install and run the software. A packageβ¦
DevOps, Day - 6
A part of File Permissions was previously covered in my blog, please have a look here --> file_permiβ¦
DevOps, Day - 5
Shell script to create multiple directories at once Here $1 is directory_name(d) $2 is start_direβ¦
DevOps, Day - 4
What is Linux shell scripting?Linux shell scripting is a way to tell your computer what to do by wriβ¦
DevOps, Day - 3
CommandPermissionOperationsDescription chmod(symbolic codes) u /g /o /a users/group/others/allr β¦
DevOps, Day - 2
What is Linux?Linux is a free and open-source operating system. it is known for its stability, securβ¦
DevOps, Day - 1
What is DevOps? It's a cultural practice in an organization for the development and operation teams β¦