Showing posts with label example. Show all posts
Showing posts with label example. Show all posts

Wednesday, November 10, 2021

What is EKS and How we can create Kubernetes cluster on Amazon EKS ?

 What is EKS?

AWS EKS is a Managed Kubernetes Service from Amazon, which means AWS manages the Master Nodes for you. All the necessary applications/services are already pre-installed like the container runtime or master processes and in addition, it also takes care of scaling and backups. πŸ‘
You only create the Worker Nodes.


If you want to learn in detail you can refer video belowπŸ‘‡πŸ‘‡


How to use Cluster

To create a K8s cluster in EKS you need to do following steps: 1) Setup or preparation steps - create an AWS account - create a VPC - virtual private space - create an IAM role with Security Group (or in other words: create AWS user with list of permissions) 2) Create Cluster Control Plane - Master Nodes - choose basic information like cluster name and k8s version - choose region and VPC for your cluster - set security 3) Create Worker Nodes and connect to cluster The Worker Nodes are some EC2 instances with CPU and storage resources. - Create as a Node Group - Choose cluster it will attach to - Define Security Group, select instance type etc. With NodeGroup you have autoscaling, which means based on your needs depending on how much load the cluster has new Worker Nodes will automatically added or removed in the cluster. - For that you need to define max and minimum number of Nodes.



-------- Complex, but powerful and popular --------


You're right, that's a lot of effort for just creating a simple Kubernetes cluster. Compared to other managed Kubernetes services, like DigitalOcean or Linode it's more complex. So, how to do it, when you just want to create a cluster and start deploying your containers inside as fast as possible. Instead of doing all those steps manually, there is a faster and more efficient way.



Friday, October 29, 2021

Syntax and Comments in PYTHON

What is Syntax?

  In computer science, the syntax of a computer language is the set of rules that defines the combinations of symbols that are considered to be correctly structured statements or expressions in that language.

This applies both to programming languages, where the document represents source code, and to markup languages, where the document represents data.


comments in Python?

  A Python comment is a line of text that appears in a program but is not executed by the program. You can declare a comment using a hashtag (#). Comments can appear on a new line or at the end of an existing line of code.

Comments are used to explain how code works and for testing purposes.


If you want to learn about basic syntax and comments in Python, So here is the video which is based on Python Syntax and Comments.





If you are a beginner and want to learn Python from basics so here is the full series which is for absolute beginners, check out the link below πŸ‘‡πŸ‘‡





If you want to learn other programming languages from basics so check our Youtube channelπŸ‘‡πŸ‘‡




Wednesday, October 27, 2021

What is python ? Introduction to the Python

 What is Python?


In simple words, Python is a computer programming language often used to build websites and software, automate tasks, and conduct data analysis. Python is a general-purpose language, meaning it can be used to create a variety of different programs and isn’t specialized for any specific problems.




Here is Introduction video for python if you are not familiar with that.







You can also visit our youtube channel for learning GCP, AWS, C++ like other programming languages.

Link for Youtube channel- 




Thursday, May 30, 2019

Python paramiko.SSHClient() Examples

Python paramiko Example


### RUN INSTRUCTION###PYTHON PROGRAMNAME.PY <HOST_IP> <HOST_PASSWORD> <LINUX_COMMAND>


######################################################################3
import sys, paramiko

if len(sys.argv) < 4:
    print ("args missing")
    sys.exit(1)
hostname = sys.argv[1]
password = sys.argv[2]
command = sys.argv[3]

username = "root"
port = 22

try:
    client = paramiko.SSHClient()
    client.load_system_host_keys()

    client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  #  client.set_missing_host_key_policy(paramiko.WarningPolicy())
    client.connect(hostname, port=port, username=username, password=password)
    stdin, stdout, stderr = client.exec_command(command)
    print (stdout.read())
finally:
    client.close()
##########################################################

Top ChatGPT Prompts for DevOps Engineers

  As a DevOps engineer, your role involves juggling complex tasks such as automation, infrastructure management, CI/CD pipelines, and troubl...