Simplest k8s deployment as described in this article https://itnext.io/simplest-minimal-k8s-app-tutorial-with-rancher-desktop-in-5-min-5481edb9a4a5
The declarative yaml manifests in this repo are:
jade-shooter-deployment.yaml
: deploys a scalabledeployment
of a simple app which creates a scalable number of K8spod
s which respond to port 80 and encapsulate a containerjade-shooter-service.yaml
: creates aservice
that allows this webapp's port 80 to communicate outside of its K8s namespace (AKA dedicated secure cluster) via port 8080jade-shooter-ingress.yaml
: creates aningress
that exposes theservice
to requests outside of the K8s cluster at https://jade-shooter.rancher.localhost
-
Install Rancher Desktop https://rancherdesktop.io/, the easiest way to get a local K8s lab imo. Here's how I set mine up: https://medium.com/macoclock/rancher-desktop-setup-for-k8s-on-your-macos-laptop-6f1c576ceb48
-
Clone this repo
git clone https://github.com/jwsy/simplest-k8s.git
-
Apply the manifests in this repo
cd simplest-k8s/ kubectl apply -f .
-
Browse to https://jade-shooter.rancher.localhost
- The app is this customizable Kaboom space shooter created in this article: https://javascript.plainenglish.io/kaboom-js-repl-it-custom-top-down-shooter-in-5-min-ebad8157073a?postPublishedType=repub