Skip to content

gshipley/wild-west-kubernetes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wild West Kubernetes

Wild West Kubernetes is a sample application written in Spring Boot and the Phaser game engine to make killing pods fun. In order to play the game, you need to have a kubernetes cluster running and issue the following command:

kubectl apply -f https://git.io/k8s-wild-west

If you are using OpenShift, you will need to add a role to a service account

oc policy add-role-to-user view system:serviceaccount:wildwest:default

Where wildwest is the name of the project in openshift.

This will create a namespace called wildwest and deploy the gshipley/wildwest:latest docker image with five replicas. This will also create a service and apply the correct RBAC view role to pull information from the kubernetes API. It should be noted that the default kubernetes/k8s.yaml file creates a service using a NodePort. This should work in most minikube environments but you should change it if you are running on a cluster with a LoadBalancer. For an example of an ingress, check out the kubernetes/ingress.yaml file.

By default, the game doesn't actually destroy the pods when you shoot them. If you want to enable destructive mode, issue the following command:

kubectl apply -f https://git.io/k8s-wild-west-destructive

For OpenShift, apply this role for destructive mode

oc policy add-role-to-user edit system:serviceaccount:wildwest:default

Once you have the game deployed, you will need to expose the service so that you can access the web application. If you are using minikube, you could use port-fowarding:

kubectl port-forward -n wildwest svc/wildwest 8080:8080

Happy Pod hunting.

About

A wild west game to kill pods on kubernetes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published