Many times we have the requirement to use an existing domain with our Azure Active Directory. Following step by step guide will help you to configure your Azure Active Directory service for use with a custom domain name registered with an external domain registrar.

Step 1: Login to Azure Portal

Step 2: Select Azure Active Directory service for your Azure Account

Step 3: Select Custom domain names

Step 4: Click Add custom domain

Step5: Enter your domain name

Step 6: Click Add domain

Image for post
Image for post

Step 7: Now, in order to use the domain with your Azure AD, create a new TXT…


Kubernetes Basics

Using minikube to create a single node cluster

minikube cli screenshot
minikube cli screenshot

Check if minikube is installed

minikube version

Start the cluster

minikube start

Check if kubectl is installed

kubectl version

Check cluster details

kubectl cluster-info

View nodes in the cluster

kubectl get nodes

Deploy an app

kubectl create deployment kubernetes-bootcamp --image=gcr.io/google-samples/kubernetes-bootcamp:v1

List your deployment

kubectl get deployments

Check existing pods

kubectl get podskubectl get pods -o wide

Describe pods

kubectl describe pods

Check logs of a container running in pod

kubectl logs $POD_NAME

Execute command directly inside container running in a pod

kubectl exec $POD_NAME env

Start a bash session in a pod container

kubectl exec -ti $POD_NAME bash

To close your container connection type exit.

List current services from your cluster

kubectl get services

Create a new service and expose it to external traffic with NodePort as paramter

kubectl expose deployment/kubernetes-bootcamp --type="NodePort" --port 8080

Describe a service

kubectl describe services/kubernetes-bootcamp

Test your app on the externally exposed port

curl $(minikube ip):$NODE_PORT

Query list of pods using label

kubectl get pods -l run=kubernetes-bootcamp

Query list of services using label

kubectl get services -l run=kubernetes-bootcamp

Apply a new label to the object

kubectl label pod $POD_NAME app=v1

Deleting a service

kubectl delete service -l run=kubernetes-bootcamp

Scale up the service

kubectl scale deployments/kubernetes-bootcamp --replicas=4

Scale down the service

kubectl scale deployments/kubernetes-bootcamp --replicas=2

Rolling update, Update the image of your application


Fix HNS Related errors

To fix HNS Related errors, Clean Up Windows Server 2016 Host networking configuration

Run following script provide by Microsoft in PowerShell as admin to cleanup your Windows Host (Read the instructions carefully before running this script provided by Microsoft)

(Optionally) Clean Up your host manually -
Run following commands on an administrator PowerShell console :

# MAKE SURE HOST IS NOT IN SWARM MODE
docker swarm leave --force
# removes all container networks on the system.
docker network prune -f
# removes all containers on the system.
docker container prune -f
# stop docker service
net stop docker
# clean…

Image for post
Image for post

Basic docker commands for beginners

Practice these commands yourself, get your hands dirty check out this Hands On YouTube video demonstrating these commands -

  1. Check Docker Version
docker version

2.Check the detailed information of Docker installed

docker info

Docker commands — Images

3. Search an image in Docker hub

docker search <<imagename>> | head -20docker search ubuntu | head -20
# will search ubuntu images in the dockerhub and limit the search result to only 20

Note: head command works on bash terminal, for PowerShell terminal in windows use select -first 10

docker search ubuntu | select -first 10

4. Pull and Image from Docker hub

docker…


Recently I was learning docker on Windows Server 2016 and I realized that official docker docs no longer have information for Docker EE on Windows Server 2016

Microsoft official documentation link for scripted installation of Docker EE is broken.

Image for post
Image for post

Ashish Singh Baghel

Digital Enthusiast

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store