Skip to content
forked from qingwave/mygame

Mygame is a sample kubernetes opeartor to manage 2048 game, contains crd, controller and webhook

License

Notifications You must be signed in to change notification settings

t00350320/mygame

 
 

Repository files navigation

Mygame

Simple Kubernetes Operator to manage 2048 game, contains crd, controller and webhook.

Prerequisites

Build and Run operator

build binary

make build

build image

make docker-build

deploy operator in kubernetes clsuter

make deploy

Test

deploy Game CR

kubectl apply -f config/samples/myapp_v1_game.yaml

get games

# get game
kubectl get game
NAME          PHASE     HOST        DESIRED   CURRENT   READY   AGE
game-sample   Running   mygame.io   1         1         1       6m

# get deploy
kubectl get deploy game-sample
NAME          READY   UP-TO-DATE   AVAILABLE   AGE
game-sample   1/1     1            1           6m

# get ingress
kubectl get ing game-sample
NAME          CLASS    HOSTS       ADDRESS        PORTS   AGE
game-sample   <none>   mygame.io   192.168.49.2   80      7m

play the game in your browser (must add <Ingress Address ip> mygame.io in your /etc/hosts)

About

Mygame is a sample kubernetes opeartor to manage 2048 game, contains crd, controller and webhook

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 83.3%
  • Makefile 14.2%
  • Dockerfile 2.5%