Code Monkey home page Code Monkey logo

findme-operator's Introduction

Findme Operator POC

During this lab, you will create a local cluster with minikube, install Istio, deploy the operator resources, and then deploy the application the application through CRDs.

Google Slides Preso

Steps

Architectural Overview

Overview of the target endstate. We deploy the findme application and the httpbin application. The sole purpose of the httpbin application is for internal testing from within the cluster. The requests come in through the istio-ingress gateway and are routed accordingly via the configuration specified in the default virtual service. architecture

Minikube Environment

Create a single-node cluster using minikube.

minikube start --cpus=4 --memory=8192

Install Istio

Install a slim version of istio to control cluster level routing. We will install the CRDs for Istio, the control plane, istiod, and then finally the istio-ingress gateway.

# Create istio-system namespace
kubectl create ns istio-system

# Label default namespace to allow sidecars
kubectl label ns default istio-injection=enabled

# Verify Label
kubectl get ns default -ojsonpath='{.metadata.labels.istio-injection}'  

# Install Istio base chart which contains cluster-wide resources use by the istio control plane
helm install istio-base helm-charts/istio -n istio-system

# Verify resource were applied to the cluster
kubectl get crd | grep istio.io

# Install Istio discovery chart which deploys `istiod` service
helm install istiod helm-charts/istiod -n istio-system

# Verify installation
kubectl get svc istiod -n istio-system

# Install Istio ingress gateway
helm install istio-ingress helm-charts/istio-ingress -n istio-system 

# Verify installation
kubectl get svc -n istio-system istio-ingressgateway

Deploy Operator Resources

We will now install the resources necessary to support the Findme operator.

helm install findme helm-charts/findme 

Deploy Findme

This is where we deploy the application from a custom resource definition

kubectl apply -f -<<EOF
apiVersion: application.caseywylie.io/v1alpha1
kind: Findme
metadata:
  name: findme-app
spec: 
  size: 1
EOF

Create a loadbalancer

Istio ingress gateway needs a dedicated IP address, you can expose it as type NodePort or LoadBalancer, with the default being LoadBalancer. In order to a serve the svc/istio-ingressgateway as LoadBalancer we need utlize minikube tunnel on order to expose the service as a LoadBalancer. Run this command in a new terminal.

minikube tunnel

Interact with Apps

While minikube tunnel is running in another terminal.
Call the httpbin service from the terminal.

curl http://localhost/get

Open Findme app in the browser open localhost in your browser.

chromium localhost

Cleanup

This command will clean up the environment.

# Stop the terminal running `minikube tunnel`

# disabled sidecar injection
kubectl label namespace istio-system istio-injection=disabled --overwrite

# Uninstall Istiod
helm uninstall istiod helm-charts/istiod -n istio-system

# Uninstall Istio-Ingress
helm uninstall istio-ingress helm-charts/istio-ingress -n istio-system

# Uninstall Istio base
helm uninstall istio-base helm-charts/istio -n istio-system

# Uninstall Findme Operator
helm uninstall findme helm-charts/findme 

# Delete istio-system namespace
kubectl delete ns istio-system 

# Delete the minikube cluster
minikube delete

findme-operator's People

Contributors

cmwylie19 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.