Helm-Netflix-Clone

Step 1 : Create cloudformation stack to create vpc and other resources
Use s3 url : https://amazon-eks.s3.us-west-2.amazonaws.com/cloudformation/2020-04-21/amazon-eks-vpc-private-subnets.yaml

Step 2 : Create IAM role

  • helm-eks-cluster-role
  • helm-eks-worker-node-role -> AmazonEC2ContainerRegistryReadOnly, AmazonEKS_CNI_Policy, AmazonEKSWorkerNodePolicy
  • Step 3: Update the config

    aws eks update-kubeconfig --region ap-south-1 --name CLUSTER_NAME --profile PROFILE_NAME 

    Step 4: Create namespace or else work default

     kubectl create ns helm 

    Step 5: Meanwhile, create helm chart

    helm create netflix-clone

    Step 6: Customize chart & values as per our requirement

    Step 7: Package the chart

     helm package netflix-clone 

    Step 8: Once clutser and nodegroup get creates, install package helm chart

     Install clone application - helm install my-netflix-clone ./netflix-clone-0.1.0.tgz

    Step 9 : To check

     kubeclt get pods -n helm 

    Step 12: To verify the deployment, check command

     kubectl get svc 

    Set up Prometheus

  • kubectl create namespace monitoring
  • kubectl config set-context --current --namespace=monitoring
  • helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
  • helm repo update
  • helm install stable prometheus-community/kube-prometheus-stack
  • kubectl get pods -l "release=stable"
  • kubectl edit svc stable-kube-prometheus-sta-prometheus >>>> Change type to LoadBalancer from ClusterIP
  • kubectl get svc
  • Set up Grafana

  • helm repo add grafana https://grafana.github.io/helm-charts
  • helm repo update
  • helm install grafana grafana/grafana
  • kubectl expose service grafana --type=NodePort --target-port=3000 --name=grafana-ext
  • kubectl edit svc stable-grafana
  • kubectl get secret grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
  • If grafana is not accepting the password in the console, do this:
  • kubectl exec --stdin --tty -- /bin/bash
  • grafana-cli admin reset-admin-password
  • Login to your grafana console

  • Navigate to Connections >> Add connections >> Search for 'Prometheus' >> Add New Data Sources
  • Provide Name, Server URL(LoadBalancer of Prometheus Server URL) and Click on 'save & test'
  • Navigate to Home >> Dashboards >> New Dashboard >> Import Dashboard and provide the ID of the the desired dashboard from https://grafana.com/grafana/dashboards/
  • image

    image

    image

    image

    image

    image

    image

    image