Skip to main content

Posts

Showing posts from September, 2019

Kubernetes APIs and Access

The entire  Kubernetes architecture is API-driven, the main agent for communication (internal and external) is the Kubernetes-apiserver. There are API groups that may have multiple versions and follow a domain-name format with reserved names such as the empty group and names ending in  .k8s.io . View the API groups with a  curl  query: $ curl https:// 127.0 . 0.1 : 6443 /apis -k ....     {       "name" : "apps" ,       "versions" : [         {           "groupVersion" : "apps/v1beta1" ,           "version" : "v1beta1"          },         {           "groupVersion" : "apps/v1beta2" ,             "version" : "v1beta2"         }       ],      }, .... Make the API calls with  kubectl  (recommended) or use  curl  or other program providing the certificates, keys, and JSON string or file when required. curl --cert userbob.pem \   --k

Push container image to Azure container registry

In this tutorial, we will learn how to push local container image to Azure container registry. You may refer this article to know more about container image creation: Create Container image NOTE: We will use Azure CLI hence install Azure CLI version 2.0.29 or later. Run az --version to find the version. Select your subscription. Replace <<subscription ID>> with your subscription id az account set --s <<subscription ID>> Create resource group az group create --name <resourcegroup> --location <location> Example: az group create --name helloworldRG --location westeurope Create Azure Container registry. Replace <acrname> with unique ACR name az acr create --resource-group <resourcegroup>  --name <acrname> --sku Basic Example: az acr create --resource-group helloworldRG --name helloworldACR1809 --sku Basic Log in to container registry az acr login --name <<acr name>> Example: az acr login

Create Container image

In this tutorial, we will learn to create an image of an application. This application is a simple web application built in node.js. Follow the below steps to create an image of this application: Copy the application's repository. git clone https://github.com/ashish993/helloworld.git Build the container file. The below command will create container image & we will tag it as helloworldapp docker build .\helloworld -t helloworldapp Check docker images. Run the below command and it will list all the docker images. docker images Run the container locally. docker run -d -p 8080:80 helloworldapp Navigate to http://localhost:8080 in your browser. The web page will be opened as shown below.

Comparison between Azure Application Gateway V1 and V2

Microsoft has announced new version of Azure Application Gateway and its Web Application Firewall module (WAF). In this article, we will discuss about the enhancements and new highlights that are available in the new SKUs i.e. Standard_v2 and WAF_v2. Enhancements and new features: Scalability: It allows you to perform scaling of the number of instances on the traffic. Static VIP: The VIP assigned to the Application Gateway can be static which will not change over its lifecycle. Header Rewrite: It allows you to add, remove or update HTTP request and response headers on application gateway. Zone redundancy: It enables application gateway to survive zonal failures which allows increasing the resilience of applications. Improved Performance: Improvement in performance during the provisioning and during the configuration update activities. Cost: V2 SKU may work out to be overall cheaper for you relative to V1 SKU. For more information, refer Microsoft prici

Creating Docker Images

The distributed systems that can be deployed by k8s are made up primarily of  application container images . Applications = language run time + libraries + source code Problems occur when you deploy an application to a machine that doesn’t available on the production OS. Such a program, naturally, has trouble executing. Deployment often involves running scripts which have a set of instructions resulting in a lot of failure cases being missed. The situation becomes messier if multiple apps deployed to a single machine use different versions of the same shared library. Containers help solve the problems described above. Container images A  container image  is a binary package that encapsulates all the files necessary to run an application inside of an OS container. It bundles the application along with its dependencies (runtime, libraries, config, env variables) into a single artefact under a root filesystem. A container in a runtime