my net house


CRI-O(Container Runtime Interface)

CRIO for Kubernetes is what JRE for Java.

1. Kubernetes connects to kubelet to launch a POD.
POD: Pod is single bock for Kubernetes consisting of one or more container, sharing the same IPC, NET and PID namespaces and living in the same cgroup

2. Kubelet forwards the request to CRIO demon via CRI to launch new POD.

3. CRIO uses the container’s image library to pull the image from the container’s registry.  

4. downloaded image gets unpacked in container’s root file-system.(Just like we install some OS)  

5. after the rootfs is created CRI-O generates the OCI(Open Container interface) specification json-file explaining how to run Container.

6. Each container is maintained by a “conmon” process, it does monitoring,logging and handling PTY for the container.  

7. Networking for the pod is setup through use of CNI(Container network interface)

Now What is CNI and why do we need it?

 CNI concerns itself only with network connectivity of containers and removing allocated resources when the container is deleted.

Application containers on Linux are a rapidly evolving area, and within this area networking is not well addressed as it is highly environment-specific.


After reading the above, the following makes more sense.

Some more Aspects Kubernetes!!

  1. RepicationControler: it is “kind” of kubernetes which is responsible to take care about number of replications to use for service, container-image, Container-port, Service-name
  2. Service: It is responsible to make your Custer talk to outside world, It could be loadBalance, or Proxy service.

Now something a little more about Networking!!

  1. Cluster_IP-> it is the most basic type of service, An IP is assigned to service so Other services Could use this Service. Outside word can talk to your POD but wil have to go through some sort of PROXY!!
  2. TargetPort-> It allows you to separate the port from where you want to expose your service and where it is actually running inside container!!
  3. Nodeport-> it’s bit special and coulb be little scary as well but just hang-tight, nodeport makes service available to each node via statis port, so assume ou have three nodes, IP1, IP2, IP3 each are having same service running inside, You will assign some port number say 8081 and each node will be accessible on same port using Node’s IP and port. something like:

IP1:8081, IP2:8081, IP3:8081

4. ExternalIP: Another approach to making a service available outside of the cluster is via External IP addresses.

5. LoadBalancer: When running in the cloud, such as EC2 or Azure, it’s possible to configure and assign a Public IP address issued via the cloud provider. This will be issued via a Load Balancer such as ELB. This allows additional public IP addresses to be allocated to a Kubernetes cluster without interacting directly with the cloud provider.

For more one can follow following POST on linkedin!

Understanding YAML in-Depth!!

Basically there are three parts of Every YAML file.

  1. MetaData(we define it)
  2. spec (specifications) (we define that too)
  3. state(that depennds on kubernetes brain!! which is “etcd!”)

rest is version and kind, version define which API version we are going to use and kind defines the type of deployment or POD we are going to implement here/!!

When you use the Kubernetes API to create the object (either directly or via kubectl), that API request must include that information as JSON in the request body. Most often, you provide the information to kubectl in a .yaml file. kubectl converts the information to JSON when making the API request.


Metadata: It helps uniquely to understand an object,  in

cluding a name string, UID, and optional namespace

spec – What state you desire for the object

to be continued –>

RUn Nginx in Kubernetes (Deployment and Scaling replicas) Part-2

apiVersion: apps/v1
kind: Deployment
  name: nginx-deployment
    app: nginx
  replicas: 3
      app: nginx
        app: nginx
      - name: nginx
        image: nginx:1.7.9
        - containerPort: 80

Take above yaml file as an example.

Now run Following command to create Deployment.

kubectl create -f nginx-depoy.yaml

Ways to check your pod has been Created or not.

khangura@metal-machine:~$ kubectl get pod

hello-minikube-6ddfcc9757-k7qqv 1/1 Running 0 24h
nginx-deployment-5d59d67564-57sk7 1/1 Running 0 2m3s
nginx-deployment-5d59d67564-6d9t8 1/1 Running 0 2m3s
nginx-deployment-5d59d67564-bpsrj 1/1 Running 0 2m3s

We can always Update the deployment like increase/scale number of replicas.

Use following to update the Deployment.

kubectl edit deployment nginx-deployment # it will use our basic editor

Kubernetes Basics(pods creation and understanding)

Create a Cluster Using MiniKube:

start your Cluster:

$ minikube start # start your Kubernetes cluster

$ kubectl get po -A # get list of all pods and your cluster.

Get to know your cluster.

(base) khangura@metal-machine:~$ kubectl get po -A
kube-system coredns-74ff55c5b-zxngm 1/1 Running 1 66d
kube-system etcd-minikube 1/1 Running 1 66d
kube-system kube-apiserver-minikube 1/1 Running 4 66d
kube-system kube-controller-manager-minikube 1/1 Running 1 66d
kube-system kube-proxy-dgvds 1/1 Running 1 66d
kube-system kube-scheduler-minikube 1/1 Running 1 66d
kube-system storage-provisioner 1/1 Running 14 66d
kubernetes-dashboard dashboard-metrics-scraper-c95fcf479-th7gh 1/1 Running 1 66d
kubernetes-dashboard kubernetes-dashboard-6cff4c7c4f-pvs5r 1/1 Running 10 66d

Remember each different service name has different significance.

etcd-minicube – etcd is configuration management system.

apiserver-minicube – for your cluster to interact with clients.

controller-manager-minikube : – A cluster manager node.

there is much ore deep to each node, Need to follow docs to understand things into more deep dive, Right-Now need to remember that Each unit of POD plays significant role in the structure of Cluster.

$ minikube dashboard # To start minikube Dashboard and to analyse how things are going.

$ kubectl create deployment hello-minikube

Create a Sample deploymen, Remember that, You can’ expose Pods You need to expose deployent to external posrts.

$ kubectl expose deployment hello-minikube --type=NodePort --port=8080

Link with external port.

You can check status of your deployment.

 $ kubectl get services hello-minikube

Use kubectl to forwrd your port.

$ kubectl port-forward service/hello-minikube 7080:8080

Dijkastra’s Algorithms! (SPF-hortest Path Finder Algorithm!)

Steps to perform Algorithm:

  1. Mark all nodes as un-Visited.
  2. Set values to all nodes, Set zero for Initial-Node/First-Node, and infinity for all other nodes.
  3. Visit all adjacent-Nodes and update the assigned values if new-found-Value is less than already assigned value.
  4. When completed visit of all adjacent nodes for current-node Mark current Node as Visited and Remove it from UnVisited List.
  5. If the destination node has been marked visited (when planning a route between two specific nodes) or if the smallest tentative distance among the nodes in the unvisited set is infinity (when planning a complete traversal; occurs when there is no connection between the initial node and remaining unvisited nodes), then stop. The algorithm has finished.
  6. Otherwise, select the unvisited node that is marked with the smallest tentative distance, set it as the new “current node”, and go back to step 3.

Quantum Computer Init__

Grover’s Algorithm: Algorithm that runs on Quantum computer to find specific information in Unmanaged Data.

DWave: Dwave is using 533 Qbit Computer to Solve challences in AI and Voice+Image-Recognization!!

Steps to Solve Rubik’s Cube in 2 mintues!(Practice Matters!)

  1. Make a buttefy first: Yellow step in the center and White pieces adjacent to Yello y 90 degree.
  2. Match corner pieces adjacent to White Pieces with Center of other color and make two rotations.
  3. White Cross: After competing the Second step you will be having White Cross.
  4. Keep white cross in the botttom, White cross will remain entirely on the Bottom.
  5. Time to Perform Left-And Right Trigres:
  6. Solve the entire White Face: To sove entire White face you need to match white faces on the upper-most layer with center of same color and perform left-right trigger, which-ever is required.
  7. After completing all left and right triggers you would be having complete White face Solved.
  8. NoN-Yello Pieces on the top: Find out each non-Yeo pieces on the top layer and match corner pieces with center, After that Perform again left and right Corners.

But this time you have to do Left/Right Trigers twice in a Row:

  1. After Completing 8th step you would be having bottom layer and two side layers solved till now.
  2. Get Yello Cross on the top:

Now to get yellow cross on the top you need to perfom few Algorithms:

R = Rotate Right-side cloclwise.

R’ = Rotate Right-side Anti-clockwise.

R2 = Rotate Right-Side twice Clockwise.

So first Notation is as follows:


If you have two Yellow pieces in the Edge which makes Single Yelow Line, turn the Yellow line towards you Again Perform FURU’R’F’

If you have two Edge yellow pieces which perform Backworf L then turn BackWard l away From you and Again Perform FURU’R’F’

After performing above steps you would be Having yellow corss on the Top, There could be other yelow pieces as well.

3. Now Solve the Entire Yellow Side

At this point you have to find Yellow color on the TopMost layer and bring it to lleft Corner and Perform following Algorithm:


Again Perform following if you have Yellow corners on the Upper side layer.


After this you might have got FISH on the Top Yellow Side, Rotate Fish downward towards you down to left and perform algorithm again.


4. Position the Corners of the Cube: (At 19:31) in the Video Link.

on the top side layer you have to match the side pieces. using following Algorithm:


You might find that None of your Side Pieces have Same Color:


5. One of the face matching the the corner Pieces:

Hold the face matchig the Corner Piece on your left hand and perfor the following Algorithm:


6. At this point all of your Corner Pieces Should Match:

If your Corner pieces don’t match you have to Match Step 5’s Algorithm one more time.

7. Final Step: -. Positn the Edges::

If you are having one side solved till now keep it away from you.


after that you need to swap Edge pieces Counter-Clockwise.


If still None of your Side are solved:: -> Perform Counter-Clockwise Algorithm.


You migght have on Solved face, Keep it away from you and Perform Counter-CockWse Algorithm one more Time.


That’s It. Your Cube is Solved till now!!

Heap and Heap Sorts]draft[

Heap Sort is bit different from Other types of SOrts.

Things we need in HeapSort:

  1. Priority Queue: Implement Set S of Elements, Each of Elements is Associated with Key.
  2. Insert Operation(): insert Element x into Set S
  3. Max(S): eturn element of S with largest key.
  4. Extract-Max(S): Extract max and remove it from S.
  5. IncreaseKey() : Increase the value of x’s key to new Value.

Heap a tree: Root of tree First ELement (i=1)

parent of i = i/2

left of i = 2i , right of i = 2i+1

MaxHeap: The key of Node>=Key of Children!

Big Question: how we maintain the Max-Heap() ?

Another Big Question: How we rae gong to Build Max-Heap?


build_max_heap(): Produces Max heap from un-ordered Array()

max_heapify(): Correct the single violation of heap.

Look for the children in the Condition and Check

Convert Array A[….n] into Max-Heap

Code is:

def build_max_heap(A):

for i=n/2 down to 1:

do max_heapify(A,i)

Present-Complexity: O(NlogN)

How to get Better Complexity like: O(N)?

Need to underStand Convergence-Series!

Conclusion in Five-Steps of HeapSorting:

  1. Build Max Heap from un-ordered array.
  2. Find/Assume Max element is A[1]
  3. Swap element A[1] with A[n] now maxElement is at end of the array.
  4. Discard N Element from the array and decrement the heap by n-1
  5. Now new root may violate the max heap but children are “Max-Heap”

Again MaxHeapify() which means Loop to step2 to 5 until array size is not 1!!


IBM Quantum Course Application

My Passion for advanced technologies has grown tremendously from the day my father brought Pentium-3 Intel-based computer at home, I was 14 years old at that time. My curiosity had taken me to complete graduation in Information-Technology and working in the field of Software-Development since 2013. I have taken multiple courses in my graduation like Advanced Data Structures, Machine learning, Discrete Mathematics, Microprocessor and assembly language programming, Digital Circuits, and Logic Design.

My Github Profile Link:

Over the past years, I have worked in multiple roles in the Software industry and taught myself various Programming languages like Python, Julia, C, C++, Scala, and Go-Lang. I have industry-wide experience in Software development, Database-management, System-architecture, Data Operations, and Automated Tests. I always concentrate on using Open-Source technologies to cut down costs and making great use of Automation to decrease the cost across different areas.

I have contributed to Open Source Projects as well like TuxMath, TuxBlocks, Plyer, FreeCAD, and Open Street Mapping

Some of my featured Articles on Python, Julia, and Quantitative Finance has been published at as well.

[Python3 for Text Processing]

[Guide to Julia Programming]

[Hacker’s Guide to Quantitative Finance]

I am working in Finance-Industry and using Machine-learning, Statistics, Applied Mathematics to build financial models since 2017.
The finance industry is already using Pythsics and Applied Mathematics; few Examples are Bolinger Band, Black-Scholes-Merton model, Binomial Distributions, and Bayesian Statistics. Quantum Computing will be more efficient than classical computers to find patterns in data such will lead to the development of better Algorithms.

The detection of fraudulent activities using pattern recognization will be faster using Quantum computers in the financial world. Data will be more secure once encapsulated using quantum-cryptography techniques. One cannot read data encoded in quantum states because they shapeshift by changing states and as such prevent eavesdropping, Usage of quantum computers for “ML and AI models” could lead to more optimized models and will be able to improve the accuracy of the model. I have explored the Applications of Quantum-Technology in Portfolio-optimisation, Credit Risk Analysis, and Time-Series Analysis using Qiskit-Tutorials from Github using this link( Apart from that, I have also completed Qiskit-Foundations on youtube taught by Abraham Asfaw.

Using Quantum Computer technology, I want to develop useful Algorithms for Arbitrage and Portfolio-Rebalance, Which I am considering as the first goal in the journey of learning Quantum Computers.

Looking forward to diving into the Quantum Realm and coming out with new forms of life.

%d bloggers like this: