How to integrate Google container engine with Stackdriver with kubernaties

Most folks have been using Grafana or something similar to monitor Kubernetes cluster.

If you are using Google cloud container engine, then the standard unified place to monitor all your application and services is Stackdriver.

According to Google’s documentation, when you create a new container cluster using GUI or gcloud, Stackdriver is automatically configured with a sink, however It did not work out of the box for me hence this post :)

Well, the easiest way to check if Stackdriver is configured is to issue a command

Read more →

Binary Search Tree in python

BST data structure supports many dynamic-set operations including

  1. Search
  2. Minimum
  3. Maximum
  4. Predecessor
  5. Successor
  6. Insert
  7. Delete

These basic operations allow us to treat this data structure both as a dictionary and as a priority queue.

Basic operations on a binary tree takes time proportional to the height of the tree, O(lg n) [worst case] and even O(n) if the tree is a linear chain.

If you want to learn more about practical application of these trees check this post out.

Read more →

Heap Sort in python

The (binary) heap data structure is an array object that we can view as a nearly complete binary tree.
Each node of the tree corresponds to an element of the array.
The tree is completely filled on all levels except possibly the lowest, which is filled from the left up to a point.
An array A that represents a heap is an object with two attributes:

  • length, which (as usual) gives the number of elements in the array.

Read more →

Insertion sort in python

Insertion sort is an efficient algorithm for sorting a small number of elements.

Insertion sort works the way many people sort a hand of playing cards. We start with an empty left hand and the cards face down on the table. We then remove one card at a time from the table and insert it into the correct position in the left hand.

To find the correct position for a card, we compare it with each of the cards already in the hand, from right to left.

Read more →