Kubernetes – Objects – simplifying concepts

Hi All,
GREETINGS FOR THE DAY 🙂 LIFE IS BEAUTIFUL 🙂
We are discussing Kubernetes. In previous few articles we discussed
- What is Kubernetes ? – https://knowledge-junction.in/2021/09/03/kubernetes-introduction-starting-point-for-beginners-helps-to-prepare-the-interview/
- Setting up local environment for Kubernetes – https://knowledge-junction.in/2021/09/11/kubernetes-simplifying-setting-up-local-environment-creating-kubernetes-cluster-locally-helps-in-interview-preparation-kubernetes-for-beginners/
- Yaml file guide / reference – https://knowledge-junction.in/2021/09/04/complete-guide-to-yaml/
- Kubernetes – Setting up kubernetes cluster for development on Windows 10 box using minikube – https://knowledge-junction.in/2022/05/06/kubernetes-setting-up-kubernetes-cluster-for-development-on-windows-10-box-using-minikube/
- Kubernetes – POD – https://knowledge-junction.in/2022/05/05/kubernetes-pod/
Today in this article we will discuss about – Kubernetes objects. We discussed about Kubernetes – POD which is one of the Kubernetes object
Take away from this article
- What are Kubernetes objects
- How to get list of Kubernetes objects
- How to create Kubernetes objects
What are Kubernetes objects
- Kubernetes objects which are the entities and integral part of Kubernetes cluster
- We can say that Kubernetes objects are building blocks of Kubernetes cluster
- Kubernetes objects are used to
- To deploy our containerised applications (docker images)
- On which node in Kubernetes cluster containerised applications are running
- To maintain the healthy state of Kubernetes cluster
- To make sure our containerised applications are working in healthy state
There are lots of Kubernetes object. We can get list of all kubernetes objects by executing the command
kubectl api-resources
Output of the above CMDLET will be
Following are some/popular Kubernetes objects – Here I am adding just short description for each object and then we will have detailed article for each object like we have separate detailed article for POD
- Namespaces
- Namespaces come into the picture when we want to share single cluster with multiple users / teams
- Namespaces provides us scope for names
- Kubernetes comes with three default namespaces:
default
The default namespace for objects having no namespaceskube-system
The namespace for objects created by the Kubernetes systemkube-public
This namespace is created automatically and is readable by all users (including those not authenticated)
- PODs
- Kubernetes system dosent understand our containerised application, Kubernetes understand PODs, those are wrapper for our containerized application in Kubernetes
- In nutshell, POD contains one more containers
- We have separate detailed article on PODs – https://knowledge-junction.in/2022/05/05/kubernetes-pod/
- Replication Controller
- Allows us to have multiple instances of single pod in Kubernetes cluster
- Replication controller helps new pod instance in case existing pod fails
- Itss make sure that at any given time specified number of Pods are running
- Replica Sets
- Replica sets are the new way to maintain the replicas
- Replica sets are replacement of Replication Controller
- Replica set and Replication controller provide same set of functionality but replica set is more powerful
- Deployments
- Object which represents our running application on cluster
- Deployments are used to manages pods in Kubernetes cluster
- Deployment object creates replica sets and number of pods as specified the value of replicas
- Services
- Service object is logical set of Pod objects
- Service object have unchanged ip address
- Service object specifies how to access the respective Pods
- Service object helps to connect in between applications, like if our application connects any external data source
- It allows the connectivity between frontend and backend group of pods
- Default protocol for services is TCP
- Ingress
- Objects which allows access to Kubernetes services from outside the kubernetes cluster
- This access is allowed via HTTP / HTTPs
- Volumes
- Persistent storage used by Kubernetes to store the data stored in containers
- Data is preserved across container restarts
- Volume is a directory, possibly with some data in it, which is accessible to the containers in a pod
- ConfigMaps
- Used to store non-confidential data in key value pair
- ConfigMap does not provide secrecy or encryption
- Used to store data separately from our application code
- Secrets
- Used to store confidential data
- Basically small amount of data like Password / Token or keys
How the Kubernetes objects are created
- Kubernetes objects can be created , modified or deleted with the help of Kubernetes APIs
- Mostly we / administrators uses kubectl command line utility tool
- Every object in Kubernetes have specification which tells Kubernetes system – the desired state of object
- Most of the time Kubernetes object specification is yaml file – to know more details about yaml files, please have a look of our detailed article – https://knowledge-junction.in/2021/09/04/complete-guide-to-yaml/
Thanks for reading the article !!! Please feel free to discuss in case any issues / suggestions / thoughts / questions !!!
HAVE A GREAT TIME AHEAD !!!
1 Response
[…] ReplicaSet is one of the Kubernetes object. What are Kubernetes object – please refer our previous article – Kubernetes – Objects – simplifying concepts […]