Code Monkey home page Code Monkey logo

elk-k8s-demo's Introduction

Author - Pavan Surya Prakash Ponnam

Elastic k8s workshop

Prepare cloud VM

# Install on cloud Debian9 machines (2 cores 8GB RAM) - Strigo, GCP, etc
sudo apt install git tmux -y

git clone https://github.com/michaelhyatt/k8s-o11y-workshop.git

</path/to/code>/install/install-debian9.sh
cd ~/k8s-o11y-workshop

kubectl create -f </path/to/code>/kube-state-metrics

Elastic Cloud

Create cloud cluster and record the following to be populated in install/create_secrets.sh script:

cloud_id=...
cloud_auth=...
apm_url=...
apm_token=...

Labs: Prepare the server

# Start minikube locally
</path/to/code>/install/start_k8s.sh

# Update with Cloud cluster details and create secrets credentials
# Use vi, nano, Theia (as below)
nano </path/to/code>/install/create_secrets.sh
</path/to/code>/install/create_secrets.sh

# Init Kibana, Elasticsearch mappings and templates
</path/to/code>/install/init_beats.sh

Labs

# Deploy metricbeat, filebeat and packetbeat
kubectl create -f </path/to/code>/filebeat/filebeat.yml
kubectl create -f </path/to/code>/metricbeat/metricbeat.yml
kubectl create -f </path/to/code>/packetbeat/packetbeat.yml

# Deploy MySQL DB
kubectl create -f </path/to/code>/mysql/mysql.yml

# Deploy petclinic and nginx
kubectl create -f </path/to/code>/petclinic/petclinic.yml
kubectl create -f </path/to/code>/nginx/nginx.yml

Open code editor

Use the public DNS and port 30083 to access web based Theia editor http://public-dns-or-ip-address:30083

Petclinic UI

Use the public DNS and port 30080 to access petclinic UI http://public-dns-or-ip-address:30080

Run Jupyter connected to Elastic Cloud cluster

Start Jupyter pod:

kubectl create --namespace=kube-system -f </path/to/code>/jupyter/jupyter.yml

Use the public DNS and port 30081 to access the Jupyter UI http://public-dns-or-ip-address:30081. Example notebook scripts/example.ipynb shows how to connect to Elastic Cloud cluster and use the data in pandas.

TODO:

  • MySQL slowlog
  • K8s security with beats
  • Security in multi-user multi-namespace deployments
  • On Exception page, transaction is null, layout template needs fix to forward with port number included
  • Redirect at the end of the update is broken
  • Load generator
  • ML and alerting setup

elk-k8s-demo's People

Contributors

pavanponnam avatar

Watchers

James Cloos avatar Pavan Surya Prakash Ponnam avatar

elk-k8s-demo's Issues

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.