Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rootsongjc/cloud-native-sandbox
Cloud Native Sandbox can help you setup a standalone Kubernetes and Istio environment with Docker on you own laptop.
https://github.com/rootsongjc/cloud-native-sandbox
cloud-native docker istio kubernetes service-mesh
Last synced: 15 days ago
JSON representation
Cloud Native Sandbox can help you setup a standalone Kubernetes and Istio environment with Docker on you own laptop.
- Host: GitHub
- URL: https://github.com/rootsongjc/cloud-native-sandbox
- Owner: rootsongjc
- License: apache-2.0
- Created: 2019-01-18T09:56:55.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-04-13T02:15:59.000Z (over 3 years ago)
- Last Synced: 2024-10-10T23:55:02.948Z (about 1 month ago)
- Topics: cloud-native, docker, istio, kubernetes, service-mesh
- Homepage:
- Size: 61.5 KB
- Stars: 133
- Watchers: 6
- Forks: 37
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://github.com/rootsongjc/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](https://docs.docker.com/docker-for-mac/#kubernetes).
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.
```bash
kubectl apply -f install/dashboard/
```Get the dashboard token.
```bash
kubectl -n kube-system describe secret default| awk '$1=="token:"{print $2}'
```Expose `kubernetes-dashboard` service.
```bash
kubectl proxy
```Login to Kubernetes dashboard on with the above token.
### Istio(Required)
Install istio service mesh with the default add-ons.
```bash
# Install istio
kubectl apply -f install/istio/
```To expose service `grafana` on .
```bash
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 .
```bash
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 .
```bash
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 , .
```bash
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](https://www.kiali.io/).
```bash
kubectl -n istio-system apply -f install/kiali
```To expose service `kiali` on .
```bash
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](https://istio.io/docs/examples/bookinfo/).
```bash
# Enable sidecar auto injection
kubectl label namespace default istio-injection=enabled
# Deploy bookinfo sample
kubectl -n default apply -f sample/bookinfo
```Visit `productpage` on .
Let's generate some loads.
```bash
for ((i=0;i<1000;i=i+1));do echo "Step->$i";curl http://localhost/productpage;done
```You can watch the service status through .
## Client tools
To operate the applications on Kubernetes, you should install the following tools.
**Required**
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) - Deploy and manage applications on Kubernetes.
- [istioctl](https://istio.io/docs/reference/commands/istioctl/) - Istio configuration command line utility.**Optional**
- [kubectx](https://github.com/ahmetb/kubectx) - Switch faster between clusters and namespaces in kubectl
- [kube-ps1](https://github.com/jonmosco/kube-ps1) - Kubernetes prompt info for bash and zsh