Code Monkey home page Code Monkey logo

minions's Introduction

Minions for minikube

Aims

To make an army of minions in minikube.

Pre-requisites

Docker (https://docs.docker.com/install/) and minikube (https://kubernetes.io/docs/tasks/tools/install-minikube/) installed.

How to Run

Start minikube:

minikube start --memory 4000 --cpus 3

Build minion image for minikube - from this directory run

eval $(minikube docker-env)
docker build . -t minion

Deploy the army

kubectl create -f minion-army.yml

To see the troop types:

open http://$(minikube ip):30080
open http://$(minikube ip):30081
open http://$(minikube ip):30082
open http://$(minikube ip):30083

To see the whole army

kubectl get pods

To Create More Troops

To create more troops of each type do minikube dashboard and go to the deployment and change the number of replicas

One Minion Falls, Another Takes His Place

Choose the host of one the minions open in your browser. To kill it:

kubectl delete pod <host>

Refresh the browser (it will take a little while) and see that another pod is already there

Minion Upgrades

Change the version in the Controller class to 0.2. Do:

docker build . -t minion:0.2

Then open minion-army.yml and find-replace all the "latest" with "0.2". Save the changes and do:

kubectl apply -f minion-army.yml --record

Refresh the browser of one of the minion types to see the version change in line with what you see from kubectl rollout status deployment <deployment_name> where <deployment_name> is a minion type (e.g. one-eyed-minion).

Minion Rollbacks

To see the history of what was deployed do kubectl rollout history deployment <deployment_name> and to rollback do kubectl rollout undo deployment <deployment_name> --to-revision=1 (can take a little while)

To Destroy the Army

kubectl delete -f minion-army.yml

Stop minikube with minikube stop

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.