• Stars
    star
    127
  • Rank 282,790 (Top 6 %)
  • Language
  • License
    Apache License 2.0
  • Created almost 6 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Cloud Native Sandbox can help you setup a standalone Kubernetes and Istio environment with Docker on you own laptop.

Cloud Native Sandbox

Cloud Native Sandbox can help you setup a standalone Kubernetes and Istio environment with Docker on you own laptop.

The sandbox integrated with the following components:

  • Kubernetes v1.10.3
  • Istio v1.0.4
  • Kubernetes dashboard v1.8.3

Differences with kubernetes-vagrant-centos-cluster

As I have created the kubernetes-vagrant-centos-cluster to set up a Kubernetes cluster and istio service mesh with vagrantfile which consists of 1 master(also as node) and 3 nodes, but there is a big problem that it is so high weight and consume resources. So I made this light weight sandbox.

Features

  • No VirtualBox or Vagrantfile required
  • Light weight
  • High speed, low drag
  • Easy to operate

Prerequisite

You only need a laptop with Docker Desktop installed and Kubernetes enabled.

Note: Leave enough resources for Docker Desktop. At least 2 CPU, 4G memory.

Install

To start the sandbox, you have to run the following steps.

Kubernetes dashboard(Optional)

Install Kubernetes dashboard.

kubectl apply -f install/dashboard/

Get the dashboard token.

kubectl -n kube-system describe secret default| awk '$1=="token:"{print $2}'

Expose kubernetes-dashboard service.

kubectl proxy

Login to Kubernetes dashboard on http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/login with the above token.

Istio(Required)

Install istio service mesh with the default add-ons.

# Install istio
kubectl apply -f install/istio/

To expose service grafana on http://localhost:3000.

kubectl -n istio-system port-forward $(kubectl -n istio-system get pod -l app=grafana -o jsonpath='{.items[0].metadata.name}') 3000:3000 &

To expose service prometheus on http://localhost:9090.

kubectl -n istio-system port-forward $(kubectl -n istio-system get pod -l app=prometheus -o jsonpath='{.items[0].metadata.name}') 9090:9090 &

To expose service jaeger on http://localhost:16686.

kubectl -n istio-system port-forward $(kubectl -n istio-system get pod -l app=jaeger -o jsonpath='{.items[0].metadata.name}') 16686:16686 &

To expose service servicegraph on http://localhost:8088/dotviz, http://localhost:8088/force/forcegraph.html.

kubectl -n istio-system port-forward $(kubectl -n istio-system get pod -l app=servicegraph -o jsonpath='{.items[0].metadata.name}') 8088:8088 &

Kiali

Install kiali.

kubectl -n istio-system apply -f install/kiali

To expose service kiali on http://localhost:20001.

kubectl -n istio-system port-forward $(kubectl -n istio-system get pod -l app=kiali -o jsonpath='{.items[0].metadata.name}') 20001:20001 &

Username/password: admin/admin

Bookinfo sample

Deploy bookinfo sample.

# Enable sidecar auto injection
kubectl label namespace default istio-injection=enabled
# Deploy bookinfo sample
kubectl -n default apply -f sample/bookinfo

Visit productpage on http://localhost/productpage.

Let's generate some loads.

for ((i=0;i<1000;i=i+1));do echo "Step->$i";curl http://localhost/productpage;done

You can watch the service status through http://localhost:3000.

Client tools

To operate the applications on Kubernetes, you should install the following tools.

Required

  • kubectl - Deploy and manage applications on Kubernetes.
  • istioctl - Istio configuration command line utility.

Optional

  • kubectx - Switch faster between clusters and namespaces in kubectl
  • kube-ps1 - Kubernetes prompt info for bash and zsh

More Repositories

1

kubernetes-handbook

Kubernetes中文指南/云原生应用架构实战手册 - https://jimmysong.io/kubernetes-handbook
Shell
10,665
star
2

kubernetes-vagrant-centos-cluster

Setting up a distributed Kubernetes cluster along with Istio service mesh locally with Vagrant and VirtualBox, only PoC or Demo use.
Shell
1,894
star
3

awesome-cloud-native

A curated list for awesome cloud native tools, software and tutorials. - https://jimmysong.io/awesome-cloud-native/
HTML
1,775
star
4

kubernetes-hardening-guidance

《Kubernetes 加固手册》(美国国家安全局出品)- https://jimmysong.io/kubernetes-hardening-guidance
Shell
476
star
5

migrating-to-cloud-native-application-architectures

《迁移到云原生应用架构》中文版
Shell
242
star
6

cloud-native-library

云原生资料库 - https://lib.jimmysong.io
SCSS
217
star
7

docker-handbook

Docker handbook - https://jimmysong.io/docker-handbook
Shell
147
star
8

opentelemetry-obervability

《OpenTelemetry 可观测性的未来》| O'Reilly 报告
Shell
130
star
9

hugo-handbook

Building static website with hugo - https://jimmysong.io/hugo-handbook
Shell
75
star
10

envoy-handbook

Envoy 基础教程 - https://jimmysong.io/envoy-handbook/
Shell
61
star
11

docker-images

My docker images repo
Dockerfile
42
star
12

cheatsheets

Jimmy's cheatsheet for developers https://jimmysong.io/cheatsheets/
JavaScript
38
star
13

developer-advocacy-handbook

开发者布道手册 - https://jimmysong.io/developer-advocacy-handbook/
Shell
37
star
14

magpie

Yarn on Docker - Managing Hadoop Yarn cluster with Docker Swarm.
Go
35
star
15

guide-to-cloud-native-app

Guide to Cloud Native Application/云原生应用白皮书 - https://jimmysong.io/guide-to-cloud-native-app
CSS
21
star
16

k8s-app-monitor-agent

Kubernetes application monitor agent
Go
20
star
17

k8s-app-monitor-test

A test application for monitoring in kubernetes
HTML
18
star
18

docker-ipam-plugin

Docker network plugin to make a L2 flat network.
Go
14
star
19

qa

Questions & Answers
12
star
20

rootsongjc.github.io

jimmysong.io website
HTML
11
star
21

service-mesh-devsecops

使用服务网格实现微服务应用的 DevSecOps - https://jimmysong.io/service-mesh-devsecops/
Shell
11
star
22

envoy-tutorial

Envoy mesh in kubernetes tutorial
Python
10
star
23

rpi-handbook

Raspberry Pi Handbook/树莓派实践手册 - https://jimmysong.io/rpi-handbook
CSS
10
star
24

kubernetes-client-go-sample

Kubernetes client-go sample
Go
9
star
25

golang-handbook

Go practice.
7
star
26

spark-on-k8s

Spark on kubernetes 中文文档 - https://jimmysong.io/spark-on-k8s
CSS
4
star
27

handbook-template

Handbook template
Shell
4
star
28

cloudinary-go

A Go client library and CLI tool to upload static assets to Cloudinary service.
Go
4
star
29

service-monitor

Monitor services and send SMS when them go down.
Python
3
star
30

yarn-on-docker

Create a hadoop yarn cluster based on docker containers.
Shell
2
star
31

linux-practice

Linux practice.
2
star
32

cloud-native-go

The official website for the book Cloud Native Go. https://jimmysong.io/cloud-native-go
JavaScript
2
star
33

hadoop-cluster-monitor

Hadoop cluster monitor and alert
Python
2
star
34

website

Jimmy Song's website
HTML
1
star
35

cnwordcount

Count Chinese words in a file.
Go
1
star
36

hadoop-all-in-one

Build a hadoop-all-in-one docker image.
Shell
1
star
37

cloud-native-go-hugo

Cloud Native Go hugo source.
Shell
1
star
38

hadoop-docker-client

Build an hadoop-2.6.0-cdh5.5.2 docker client and run it through pass ENV to config.
Shell
1
star
39

catalog-hadoop

Dockerfile and docker compose files for Hadoop.
Shell
1
star