Code Monkey home page Code Monkey logo

kubernetes_shiny_example's Introduction

Shiny App on Kubernetes Example

Example R Shiny app that has been dockerized and is run using Kubernetes. Useful for deployment of R Shiny apps on Kubernetes.

File uses dockerized shiny app that can be found here:

Getting Kubernetees to run on WSL

  • install docker desktop for windows with WSL enabled
  • install minikube for windows
  • start docker desktop
  • in PowerShell in Admin mode:
    • set default driver for minikube to docker using minikube config set driver docker
    • run minikube start
  • copy %USERPROFILE%.kube\config from Windows to ~/.kube/config but change directory structure to WSL to point to Windows files. You may need to do this everytime you start up docker to update the IP:port.

To get docker image from docker hub for kubernetes cluster

image: bbcho/docker_shiny_example:0.2.0 # tag is required

Running the App

in WSL:

kubectl create -f deployment.yaml
kubectl create -f loadbalancer.yaml

Then in PowerShell

minikube service shiny-loadbalancer

References

To get Kubernetes to pull from local docker registry

https://medium.com/swlh/how-to-run-locally-built-docker-images-in-kubernetes-b28fbc32cc1d

Getting Node IP Address

kubectl get nodes -o yaml

Connecting to Node

Use either the internal IP that you get from the kubectl get nodes -o yaml command or the url from minikube service shiny-loadbalancer --url via powershell.

kubernetes_shiny_example's People

Contributors

bbcho avatar

Stargazers

 avatar

Watchers

 avatar

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.