//Cloud notes from my desk -Maheshk

"Fortunate are those who take the first steps.” ― Paulo Coelho

gRPC using .NET core notes

-gRPC is a framework for RPC calls
-helps to execute a remote method somewhere in the n/w
-born out of goog, gRPC is a open source variant
-MS .NET team is partnering with goog folks and CNCF to make gRPC performant on .NET core
-it has 4 low level primitives
1) Unity calls (single client req, single server response)
2) Client streaming (multiple client req, single server response)
3) Server streaming (single cli-req, multiple server response)
4) full duplex
-it works on top of http2 as a transporter
-gRPC-web preview exist today for browser support but gRPC is pretty for svc-svc communication
-it needs a protobuf file defining the message types used by the gRPC- contract equivalent

  • $ dotnet new grpc -o GrpcServer to generate a sample proj in .NET core
  • building the project generates the code file for most of the languages based on proto contract file
  • protobuf -binary seralization format, https/2, multiplexing, streaming, more efficient, quality of generated code is better for any languages makes gRPC better than REST API’s.
  • REST API’s required path, verb used etc but in gRPC not required
  • – one can expose them as HTTP endpoints or gRPC endpoints – option is there
  • gRPC ->
  • Get started with a gRPC service
  • Introduction to gRPC on .NET Core

2020-06-24 Posted by | Uncategorized | 2 Comments

.NET in 2020 (Build recap)

Announcements from //Build 2020 event, [Video1]  [Video2]

  1. .NET 5 is a path forward (merging .NET core and mono/xamarin), .NET 6 and on.
  2. C# 9 and F#5 released; It will be part of .NET 5
  3. .NET 5 will have lesser container img size
  4. Win Form designer support for .NET Core; you can design winforms using .NET core
  5. Blazor (Web Assembly) – Ready for production. Now, .NET runs on our browser
  6. .NET (MAUI) – Multi platform App UI -> build cross-platform Native UI; build once, deploy to multiple devices
  7. VS 2019 enhancements and mac support

Happy learning !

2020-06-07 Posted by | .NET, .NET General, dotnetcore, Uncategorized | Leave a comment

#KubeCon CNCF – North America 2019 watchlist

(1) Kubecon – KEDA: Event Driven and Serverless Containers in Kubernetes – Jeff Hollan, Microsoft
(2) Supercharge Your Microservices CI/CD with Service Mesh and Kubernetes – Brian Redmond, Microsoft
(3) Scaling Your Cluster (Both Ways) – Scott Coulton & Patrick Chanezon, Microsoft (HPA) – 2 types – VM (nodes) and Virtual Kubelet

(4) Intro: Linkerd – William Morgan, Buoyant

(5) How the Department of Defense Moved to Kubernetes and Istio – Nicolas Chaillan

(6) Am I Using It Right? Checking Best Practices on Live Kuber… Varsha Varadarajan & Adam Wolfe Gordon

(7) Gone in 60 Minutes: Migrating 20 TB from AKS to GKE in an Hour with Vitess – Derek Perkins, Nozzle
(8) Tinder’s Move to Kubernetes – Chris O’Brien & Chris Thomas, Tinder

(9) Kubernetes at Reddit: Tales from Production – Greg Taylor, Reddit, Inc

(10) Introduction to Virtual Kubelet – Featuring Titus by Netflix – Ria Bhatia & Sargun Dhillon
(11) Going Beyond the Node – Using VK to Realize Crazy Ideas – Brian Goff & Deep Kapur

(12) Day 2 Operations with Windows Containers – Michael Michael, VMware & Patrick Lang, Microsoft
(13) Introduction to Windows Containers in Kubernetes – Michael Michael, VMware & Deep Debroy, Docker
(14) Keynote: The Long Road to IPv4/IPv6 Dual-stack Kubernetes – Tim Hockin & Khaled (Kal) Henidak

Here is the complete recording list – (1) KubeCon + CloudNativeCon North America 2019 (327 Videos)  (2) Thanks to cloudyuga for the organized list of  videos and slides on Kubecon’19 San Diego

PS: Stricken once are watched for my tracking. 

2019-11-27 Posted by | kubecon, Kubernetes, Uncategorized | | Leave a comment

AKS CLI Sheetcheat for the labs

az login
az account show
az account select –subscription SUBSCRIPTION_NAME
az group create –name k8s –location eastus2
az aks get-versions –location eastus2 -o table
az aks create –resource-group k8s –name my-cluster –kubernetes-version 1.14.6 –location eastus2 –node-count 3 –generate-ssh-keys
az aks get-credentials –resource-group k8s –name my-cluster
kubectl get nodes
kubectl cluster-info
Download – https://github.com/Azure-Samples/azure-voting-app-redis
mkdir voting-app
cd voting-app
wget https://raw.githubusercontent.com/Azure-Samples/azure-voting-app-redis/master/azure-vote-all-in-one-redis.yaml
kubectl apply -f azure-vote-all-in-one-redis.yaml
kubectl get pods
kubectl get svc / kubectl get svc -w
az group delete –name k8s

2019-11-25 Posted by | Uncategorized | Leave a comment

[Linux] Commands to collect CPU, BIOS, MEM, HW details in one go

At times, you wanted to run a script in on-prem or in cloud to understand the Linux Machine spec, this script (series of commands) helps you to get that info easily.

1. To get the CPU info,
$ lscpu
2. To get the H/w info,
$ lshw -short
3. To get the H/w info2,
$ hwinfo –short
4. To get the Diskblocks,
$ lsblk
5. To get the mounted disk,
$ df -hT
6. To get the attached disk,
$ fdisk -l
7. To get the memory,
$ free -m
8. To get the OSVersion,
$ cat /proc/version
9. To get the HW CPU,
$ dmidecode -t processor (cpu), $ dmidecode -t memory (memory), $ dmidecode -t bios (bios)

Hint: You could save this as bash script(#/bin/bash) and then cat out to individual file to /tmp/ so that we can get all of them in one go.

2019-05-07 Posted by | Linux, Uncategorized | | Leave a comment

Failed to delete virtual network ‘k8s-vkdemo-2-vnet’. Error: Subnet virtual-node-aci is in use by and cannot be deleted

Recently I tried deleting few resource groups(RG) having AKS cluster with ACI enabled. I couldn’t get them deleted completely for some reason leaving Vnet all those RG’s.

Error message was “Failed to delete virtual network ‘k8s-vkdemo-2-vnet’. Error: Subnet virtual-node-aci is in use by and cannot be deleted.” I got the same error for other 2 cluster RG as well. I tried deleting individual sub-nets there I got an error.

With help of support and this article I was able to delete the RG. It’s is documented here -> https://docs.microsoft.com/en-us/azure/container-instances/container-instances-vnet#delete-network-resources.

Here is the revised script.

# Replace <my-resource-group> with the name of your resource group

# Replace <my_vnet_name> with the name of your VNet name

# Replace <my_subnet_name> with the name of your subnet name

# Get network profile ID
NETWORK_PROFILE_ID=$(az network profile list --resource-group $RES_GROUP --query [0].id --output tsv)

# Delete the network profile
az network profile delete --id $NETWORK_PROFILE_ID -y

# Get the service association link (SAL) ID
SAL_ID=$(az network vnet subnet show --resource-group $RES_GROUP --vnet-name $VNET_NAME --name $SUBNET_NAME --query id --output tsv)/providers/Microsoft.ContainerInstance/serviceAssociationLinks/default

# Delete the default SAL ID for the subnet
az resource delete --ids $SAL_ID --api-version 2018-07-01

# Delete the subnet delegation to Azure Container Instances
az network vnet subnet update --resource-group $RES_GROUP --vnet-name $VNET_NAME --name $SUBNET_NAME--remove delegations 0

# Delete the subnet
az network vnet subnet delete --resource-group $RES_GROUP --vnet-name $VNET_NAME --name $SUBNET_NAME

# Delete virtual network
az network vnet delete --resource-group $RES_GROUP --name $VNET_NAME

2019-03-18 Posted by | AKS, Azure, Azure Dev, Uncategorized | Leave a comment

%d bloggers like this: