Giter VIP home page Giter VIP logo

sidebyside's Introduction

Side By Side Demo

Offers Kubernetes Deployments and Knative Serving services of:

  • dotnetcore

  • Go

  • Nodejs

  • Python

  • Quarkus

  • Spring Boot

Quickstart with Knative Serving

kubectl create namespace sidebyside
kubens sidebyside

OR

oc new-project sidebyside

Node.js

cd hello/nodejs
kubectl apply -f kubefiles/knService_docker.yml
# the last I checked, Knative Serving worked best with docker hub due to registry API v2_2
./knpoller_ocp4.sh
# there other poller scripts depending on your Kubernetes variant
Node Hello on noded-wj854-deployment-569f8cd6cd-vn9g9:1
Node Hello on noded-wj854-deployment-569f8cd6cd-vn9g9:2

Quarkus

cd hello/quarked
kubectl apply -f kubefiles/knService_docker.yml
./knpoller_ocp4.sh
Aloha quarked-qwt7d-deployment-6f4ccfffc5-g2xxg:1
Aloha quarked-qwt7d-deployment-6f4ccfffc5-g2xxg:2

Spring Boot

cd hello/booted
kubectl apply -f kubefiles/knService_docker.yml
./knpoller_ocp4.sh
Hola Boot booted-kskv5-deployment-68f8f944ff-h8lvs:1
Hola Boot booted-kskv5-deployment-68f8f944ff-h8lvs:2

Burst

The Knative Service yaml definition includes the following:

        metadata:
          annotations:
            autoscaling.knative.dev/target: "10"

The out-of-the-box default is 100 which is hard to "overload" and cause more than 1 pod to spawn.

The knBurst scripts use a tool called siege to send in 40 concurrent requests, causing Knative to scale to 4 pods.

Terminal 1:

watch kubectl get pods

Terminal 2:

./knburst_ocp4.sh
** SIEGE 4.0.4
** Preparing 40 concurrent users for battle.
The server is now under siege..

Terminal 1:

NAME                                      READY   STATUS              RESTARTS   AGE
noded-wj854-deployment-569f8cd6cd-9bwtl   1/2     Running             0          11s
noded-wj854-deployment-569f8cd6cd-db7vl   1/2     Running             0          10s
noded-wj854-deployment-569f8cd6cd-j4bsm   0/2     ContainerCreating   0          8s
noded-wj854-deployment-569f8cd6cd-kxr2f   1/2     Running             0          10s

Dashboards

Prometheus

open https://$(oc -n openshift-monitoring get route prometheus-k8s -o jsonpath='{..spec.host}')

Or else you can open the integrated prometheus dashboard within OpenShift:

openshift menu

Metrics

The PromQL is

container_memory_rss{namespace="sidebyside",container="user-container"}

You should then see a graph like this one:

prometheus memory query

Grafana

open https://$(oc -n openshift-monitoring get route grafana -o jsonpath='{..spec.host}')

Select Kubernetes / Compute Resources / Namespace (Pods)

Kubernetes / Compute Resources / Namespace (Pods)

sidebyside's People

Contributors

burrsutter avatar kdubois avatar yanaga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sidebyside's Issues

Node JS creation step

Using crc couldn't execute this step.
$ kubectl apply -f kubefiles/knService_docker.yml
error: unable to recognize "kubefiles/knService_docker.yml": no matches for kind "Service" in version "serving.knative.dev/v1alpha1"

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.