Top Kubectl commands you should know.

Get Contexts kubectl config get-contexts Get Pods kubectl get pods Get Pods' Performance kubectl top pods Get specific Pod Performance while true; do echo "=== $(date '+%Y-%m-%d %H:%M:%S') ===" >> pod_metrics.log; kubectl top pod >> pod_metrics.log; sleep 10; done

Say Hello to Azure Functions

In this post, I am going to describe how you can create and deploy an Azure Function using Http Trigger.


  1. Open Visual Studio
  2. Click on New Project
  3. Select Azure Functions


  4. Select Azure v2 and HttpTrigger

  5. public static class HelloFunctions
        {
            [FunctionName("HelloFunctions")]
            public static IActionResult Run([HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)]HttpRequest req, TraceWriter log)
            {
                log.Info("C# HTTP trigger function processed a request.");
    
                string name = req.Query["name"];
    
                string requestBody = new StreamReader(req.Body).ReadToEnd();
                dynamic data = JsonConvert.DeserializeObject(requestBody);
                name = name ?? data?.name;
    
                return name != null
                    ? (ActionResult)new OkObjectResult($"Hello, {name}")
                    : new BadRequestObjectResult("Please pass a name on the query string or in the request body");
            }
        }