Kubernetes rollout means updating any deployment. In Kubernetes, this is done with rolling updates. Rolling updates allow Deployments’ update to take place with zero downtime by incrementally updating Pods instances with new ones. The new Pods will be scheduled on Nodes with available resources.
First, it creates an updated pod and it deletes the old one. It will maintain the balance of the desired pods in a way that 75% of pods should be up. For creating new pods before deletion the allowed surge percentage is 125%.
NOTE: For scalling updation, rollout won't happen
Namespaces are intended for use in environments with many users spread across multiple teams, or projects. Namespaces cannot be nested inside one another and each Kubernetes resource can only be in one namespace. Namespaces are a way to divide cluster resources between multiple users. Kubernetes is using a default namespace as default.
you can create a namespace by using a command prompt or using a YAML file.
kubectl create namespace dev
using yml file
For that create a yml file called namespace.yml and put the following commands in it.
A Kubernetes Deployment is used to tell Kubernetes how to create or modify instances of the pods that hold a containerized application. Deployments can scale the number of replica pods, enable the rollout of updated code in a controlled manner, or roll back to an earlier deployment version if necessary.
you can create a deployment either using a command or using a yaml file.
kubectl create deployment my-webdep --image=nginx --replicas=1 --port=80
For that create a folder and inside that create a yml file as deployment.yml and paste the following command in that
A service is a type of Kubernetes resource that causes a proxy to be configured to forward requests to a set of pods. The set of pods that will receive traffic is determined by the selector, which matches labels assigned to the pods when they were created. A service is a REST object in Kubernetes whose definition can be posted to Kubernetes apiServer on the Kubernetes master to create a new instance.
ClusterIP − This helps in restricting the service within the cluster. It exposes the service within the defined Kubernetes cluster.
NodePort − It will expose the service on…
Kubernetes is a system for managing containerized applications across a cluster of nodes. In simple terms, you have a group of machines and containerized applications (e.g. Dockerized applications), and Kubernetes will help you to easily manage those apps across those machines. It is used as an alternative for the docker swarm.
Kubernetes follows a client-server architecture. The master server consists of various components including a kube-apiserver, an etcd storage, a kube-controller-manager, a cloud-controller-manager, a kube-scheduler, and a DNS server for Kubernetes services.
Docker is a set of the platform as service products that use OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries, and configuration files. They can communicate with each other through well-defined channels.
It allows us to easily create, deploy and run our code/application. Docker gives flexibility and potentially reduces the number of systems needed because of some components called the image, container, and registry.
A Docker image is a read-only template that contains a set of instructions for creating a container that can run on the Docker…
In the previous story, I have briefly mentioned how to install Jenkins and some python configurations. Here I'm gonna directly start by creating a project on Jenkins.
Before that create a repo in Github and add a python file to it.
Then create a new project in Jenkins give a name and description. In the configuration, you have to follow the following steps
Copy your repo URL and paste it here
In this story, we are going to see how to install Jenkins, and running a python job in Jenkins.
DevOps ( “development” and “operations”) is the combination of practices and tools designed to increase an organization’s ability to deliver applications and services faster than traditional software development processes.
MySQL Python/Connector is an interface for connecting to a MySQL database server from Python. It implements the Python Database API and is built on top of MySQL.
For installing MySQL-connector-python first you have to open your terminal and execute the following code
pip install mysql-connector-python
After installation, you have to import that package into your code and define your database name and other entities using connect().
You can establish a connection using the connect() constructor. This accepts the username, password, host and, name of the database you need to connect with (optional) and, returns an object of the MySQLConnection class.