Author : MD TAREQ HASSAN | Updated : 2021/04/15

Be Aware of Managed Load Balancer

Although Managed Load Balancer has a public IP and therefore exposed to internet, AKS cluster is protected by K8s RBAC (@Azure AD RBAC, if enabled)

Secure Access to API Server Using Authorized IP Address Ranges

Set authorized IP ranges

See: Secure access to the API server using authorized IP address ranges

Create Namespace

Using yaml (depolyment / resource definition)

apiVersion: v1
kind: Namespace
metadata:
  name: xyz
  labels:
    name: xyz

kubectl command

kubectl create namespace xyz

Set Autoscaling

Set Admin Azure AD Groups

Create Load Balancer

A public Load Balancer when integrated with AKS serves two purposes:

public-svc.yaml

apiVersion: v1
kind: Service
metadata:
  name: public-svc
spec:
  type: LoadBalancer
  ports:
  - port: 80
  selector:
    app: public-app

Create a public Service of type LoadBalancer: kubectl apply -f public-svc.yaml

kubectl get service public-svc

See:

Enable Ingress Controller for HTTP Traffic

See: