Coder Social home page Coder Social logo

k3d-istio's Introduction

Getting Started

Deploy a local K3D Kubernetes development cluster that will use Istio as the service mesh.

Pre Requisites

  1. Docker Desktop is an easy-to-install application for your Mac, Linux, or Windows environment that enables you to build and share containerized applications and microservices.
  2. k3s is a efficient and lightweight fully compliant Kubernetes distribution.
  3. k3d is a utility designed to easily run k3s in Docker.It provides a simple CLI to create, run, delete a full compliance Kubernetes cluster with 0 to n worker nodes.
  4. k9s is a terminal based UI to interact with your Kubernetes clusters. It helps to make it easier to navigate, observe and manage deployed applications

Automation All in One Script

Use below script to setup

scripts/all.sh setup

Manual Steps for Learning

Pre Requisites

Install k3d, istio, kubectl, helm. k9s

scripts/pre-requisites.sh setup

k3d

Provision k3d cluster using config/k3d-config.yaml

scripts/k3d.sh setup
source scripts/lib/tools.sh  
kubectl wait --for=condition=Ready pods --all -n kube-system

In Other Terminal

k9s

istio

Provision istio

scripts/istio.sh setup

Apps

Hello World Refernce:

  1. https://github.com/istio/istio/tree/master/samples/helloworld
  2. https://istio.io/latest/docs/tasks/traffic-management/ingress/gateway-api/

Provision App

RESOURCES_PATH=apps
kubectl create namespace apps
kubectl apply  -f $RESOURCES_PATH/helloworld.yaml -n apps

There are two ways to expose Apps

  1. Expose App using Istio Gateway
RESOURCES_PATH=apps
kubectl delete -f $RESOURCES_PATH/helloworld-gateway-api.yaml -n apps
istioctl install --set profile=default -y
kubectl apply  -f $RESOURCES_PATH/helloworld-gateway.yaml -n apps
kubectl wait --for=condition=Ready pods --all -n apps 

OR

  1. Expose App using Kubernetes Gateway API
RESOURCES_PATH=apps
kubectl delete -f $RESOURCES_PATH/helloworld-gateway.yaml -n apps
istioctl install --set profile=minimal -y

kubectl get crd gateways.gateway.networking.k8s.io || \
    { kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd?ref=v0.5.0" | kubectl apply -f -; }
    
kubectl apply  -f $RESOURCES_PATH/helloworld-gateway-api.yaml -n apps
kubectl wait --for=condition=Ready pods --all -n apps 

Test App

source scripts/lib/gateway.sh
curl http://$GATEWAY_URL/hello

Monitoring

kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.15/samples/addons/prometheus.yaml
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.15/samples/addons/grafana.yaml
kubectl apply -f https://raw.githubusercontent.com/istio/istio/master/samples/addons/jaeger.yaml

tekton

https://tekton.dev/

kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml
kubectl get pods --namespace tekton-pipelines --watch

tektron dashboard

kubectl apply --filename https://storage.googleapis.com/tekton-releases/dashboard/latest/tekton-dashboard-release.yaml
kubectl get pods --namespace tekton-pipelines --watch
kubectl port-forward -n tekton-pipelines service/tekton-dashboard 9097:9097

Decision Logs

  1. Istio service mesh included to replicate production setup
  2. Initially /etc/hosts was used for mapping custom domain names to 127.0.0.1 in Host OS. Now it is replaced with https://local.gd/
  3. Use tellerops teller fro AWS secrets Management in place of .env. Ref: https://github.com/tellerops/teller

Under Evaluation

  1. Tektron fro CI/CD

k3d-istio's People

Contributors

rajasoun avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

srozange

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.