Nov 112019

Ok so this is something that I was not really aware on how to do. The assignment was to read the data from the log analytics in azure to show it in one of our application by using c#

The challenge was to understand how to do it. So I started searching google and I found these three very interesting links

this link is mentioned on these SDKs but it limited to limitations in the OpenAPISpecification. I am going to try that out to see if it works or not. I couldn’t quite understand the domain in this part may be its super easy and obvious but as I said I am not fully aware I think I will skip that,

The other way that I found is mentioned on this link

this is the more direct way of accessing it but its more to access via power shell or python. There is still no way mentioned here to access it via c# so I found these two links

from the second link I was able to get the bearer token so I use this link to get the token and from the first link I checked how to use the api call.

Initially I was still getting the 443 forbidden so what I did is I created a new app and allowed the log analytics access to that app. I did another run and it still didn’t work. So then I realized that my log analytics workspace should also that app to access the logs. So I have to add the role assignment in the workspace for that app. I did that and after that I got a 404 because the log table that I accessed doesn’t exists so I added another table name ‘Usage’ in the query and it worked fine.

 Posted by at 10:22 pm
Nov 112019

I was unable to run the functions the HostBuilder was working quite fine but it was unable to connect with the Azure function I was getting the connection refused exception. The thing that I was missing was the storage simulator.

I will start going through in making in hello world azure function



We have now selected the HttpTrigger. Every time a HTTP call is made to the specified URL this function will be triggered. For this demo, we will select the authorization level anonymous meaning anyone can access the function.


Once you start the function you will see a bulk of output in the console. I have explained it later about those options. At the end of the output, you will be able to see the URL that is used to access the function.

Write this URL in a browser or postman and put a breakpoint at the beginning of the option. When you access the URL it will hit the breakpoint.



Let’s see the logs in a bit detail we have

LoggerFilterOptions: with level and rules. This is used for logging if there is any provided. The level of the log and the rules are also mentioned here

FunctionResultAggregatorOptions: The function result aggregator is the option to identify what are the options that should be present in the resulting bulk.

SingletonOptions: These options ensure the singularity of the functions. This ensures only one instance of the function is running.

HttpOptions: we also have HTTP options where we mention the maximum number of current and outstanding requests. You can also define the route prefix here

 Posted by at 2:42 pm
Nov 112019

In docker world to play around where have docker for mac and docker for windows in k8s we have minikube. Minikube will give a master and a node as a vm and then it will also give a container runtime

Now lets install minikube you can download it from here

before you install minikube make sure that the hyper-v is enabled in BIOS. Once you install mini kube these are the step to be

Get the version of the kubernetes

C:\WINDOWS\system32>kubectl version –client

Client Version: version.Info{Major:”1″, Minor:”10″, GitVersion:”v1.10.11″, GitCommit:”637c7e288581ee40ab4ca210618a89a555b6e7e9″, GitTreeState:”clean”, BuildDate:”2018-11-26T14:38:32Z”, GoVersion:”go1.9.3″, Compiler:”gc”, Platform:”windows/amd64″}

So at this point I have the minikube installed I have the kubenetes install

Now I need to start the minikube and to so that I am running the following command

I have used this link to start the minikube but it didn’t work and I found the problem

the problem was that the minikube didn’t started when the firewall was active to I stopeed the firewall started the minikube and then run the command

>kubectl get nodes

To get the nodes. This will get the nodes for the active context you can see all the context in .kube/config file that are available

Now what I want to see is where my kubectl is pointing so to see that I need to see the current context. The following command will show me the context

<kubectl config current-context

And then you can keep on playing with the minikube to try out K8s locally and see how it works on your dev environment.

 Posted by at 2:37 pm
Nov 112019

To understand Kubernetes better let’s discuss an example of football. On a football field, the coach decides where each player will stand and with what qualities. Let’s say the person who is good with goalkeeping will be a goal keeps, the person who is good with attaching will be playing forward. All this orchestration of the player is done by either the coach. Kubernetes is exactly the same where the Kubernetes act as an orchestrator to manage the docker containers.

Kubernetes makes sure that all the required containers are available and suppose to be there to do their job. IN Kubernetes we tell the framework that these are the number of nodes that we want and the rest is handled by Kubernetes itself. It makes sure all the specified number of nodes are up and running. If any of the nodes go down or a scale-up is required k8s takes care of that.

K8s have some basic topic that we need to know before moving forward. These topics recalled K8s objects. In this post, I will stick to the definition and won’t be able to go into more detail.


Pod is the basic execution unit of K8s application. The pod encapsulates the application, storage, network and other strategies that govern the containers. The pod can have one or more than one containers. The objective of the Pod is to run the single instance of the given application if you want multiple instances of the application then you need to add more pods.


An object that acts as an abstraction in running the set of pods a network service. The service is responsible in ensuring that all the network is available between them for proper communication but that decoupling is also enabled.


K8s provide multiple namespaces through which we can classify different resources based on the similar features they have. The namespace is a way to divide the cluster resource between multiple users.

To connect to k8s

1. Before you do that you need to PIM if you have that otherwise, it won’t work

2. Get the configuration from az and to do that you need to run this command. This command will get the config from the az and populate that in the config file as a context. So that, later on, you can switch the context in power shell and connect to it. The name of the resource group should be the same as where you created the culture

az aks get-credentials –resource-group myResourceGroup –name myAKSCluster


3. Once you are done that you can see if the configuration is updated or not (which it will be but we will just look at it to get more information). You can also verify it by running the command to get the current context. The command is as follows

Kubectl config current-context

4. Now if you want to connect to the host you need to first open a proxy with the kubectl. The command to do that is

Kubeclt proxy

5. After that, you can open any browser and type this



6. To get a list of all the context the command is

Kubectl config get-contexts

7. kubectl exec -it {containerid} -n {namespace} powershell (to access the power shell)

 Posted by at 2:35 pm
Nov 112019

Coming back after a few days I totally forgot where I was in the processes and what have I learned so I started by opening the command and started looking at the command to run and the I remember that the first that we run is the docker version to see if the docker is installed properly or not and when I run it I got this message back

  • docker version


Now here is an error mentioned here which I have no clue how to solve so I will start by ripping that apart.

“error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.39/info: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.”

Th restart didn’t work so I am going to reset it to factory setting

Ok I may have missed something but the command works now so this is what I see



Now I am going to

  • docker run hello-world

The client is going to check if the image exists locally or not and it does so what it will do it’s going to fetch the image form the daemon via the API calls and its going to check the local store and its not there  so its going to go to docker hub and in the public registry. And now when I run it again I will see the hello from the docker message from the container. So it was running showed the message and then existed.

Now to show the container who have been running and existed I need to run a different command. Now when I run this command I will be able to see this

  • docker ps -a



To see the image that is already placed I just go to

  • docker images

And I see this



To remove a docker image us this command sometimes you have to force the delete so for that I am going to use this command

  • docker rmi -f image_id

The terminology goes like this the

Images are stopped containers but the containers are running images.


So here I can run the try from the code that I ave from the plural site and for that I can run this command

  • docker run -d –name web -p 90:8080 nigelpoulton/pluralsight-docker-ci

Now in this command as you can see it’s going to make a web container the internal port is outer port to access docker host on port 90 but inside the container, its port is 8080. Once I finish running that command the image is pulled to my local directory.

Now I can check if the container is running or now by running

  • docker ps

In that you can see that the container is running now you have to open the browser and browse to localhost:90 and then you can see that you will be able to access it. Now if you stop the container and browse again you will not be able to access it



The container lifecycle is not that complex. It include only three states.


Other common dockers commands are

  • Docker start
  • Docker stop
  • Docker rm conatiner
 Posted by at 2:30 pm
Nov 112019

A container is a standard unit to package software. Containers were a product to answer the complex business problems and the application you run those complex business applications. To facilitate the one app and server application infrastructure. Lastly to avoid the expensive cost of the hard and maintained.

conventionally we were using VM to run multiple apps on one server. So image a scenario where you have an application that is divided into three tiers.

Backend application, frontend application, database.

In a conventional VM ware case You can run multiple apps on one server by using this scenario

what is container1

Now in this scenario you can that we have hypervisor is installed which is managing all the VMs each VM will have its OS to maintain and on top of those OS the app is installed we can have one backend application on one VM, one front application on the other VM and lastly the database on the last VM.

In this case you have to manage all the OS on our own, we have to worry about the patches and all the os related problem. We also have to maintain all the licenses for the OS as well which will be expensive. The scaling is not fast either in this use case as we have to kick a new VM image a new OS and then we have to start the scalable application.

In case of containers  we will have something like this

what is conatiner2

Now in this scenario we have the server on top of that we only have one OS and the container are running on top of that. The container is a image of the application director to run on the a specific OS. The upside it manageable number of licenses. In this case the scaling is quite fast as we don’t have to start a new VM image a new OS and run the app instead we just need to spin up a new container and that’s it.

 Posted by at 10:16 am
Nov 112019

Today I want to talk about the place where we spend almost eight hours every day or at least from Monday to Friday. There is off course there are some people who work from home but for most of the guys who are doing full time jobs they are normally at their workplace. While staying at work we are mostly working but every now and then we communicate with people around us. Every day we do work discussions, tell jokes, ask for upcoming or previous plans and communicate in many ways.

With all of this constant commination between the work colleagues we make a social or work relation with those people at work even though we are not related or living with our colleagues.

Happiness is working with great people

I am working in Teleopti Sweden (A Calabrio Company) as a Cloud Developer. We have a pretty good amount of people who are in office apart from those who are either travelling for work or working from home. But in the summer the number of people at office decreases substantially due to summer vacations. I am one of the few who are working in those long silent and relaxed sunny summers when most of the office is on vacation. Its not many people around and I would say it’s the best time working at the office. Not many people are around and the one that are around you get the chance to communicate with them. The work environment is less stressful and more quiet. You get more focus on work and self-evaluation. Though both self-evaluation and work are a constant thing that we are doing all the time but during those working days one could take a step back to have more focus.

We are a Team

We are not a team just because we are physically located at one place and working together. We are team because we communicate, we trust, we share jokes, have fun activities and we respect each other. It like having another family at your workplace. We do have a lot of work-related discussions and augments on different things and in the we agree on the common grounds. This is almost like those childhood fight-arguments with our siblings and the next day start without any grudges. This off course gives you the chance to develop that comfort zone which helps you excel.

The Fika policy

‘Fika’ is Swedish is defined as a coffee break. I think this is another healthy tradition that we have at the Swedish work environment. Fika are informal coffee breaks near the kitchen are or the common area. Where you could have work chat to personal chat to mingle more. You normally discuss your weekend, plans for weekend or things in general

With all these things combined I think routine that you have at work in invaluable. It gives you the confidence at drive to work with your team and the people around the office.

 Posted by at 10:08 am