Skip to content

daggerok/survey

Repository files navigation

yet another k8s playground Build Status

Status: IN PROGRESS

TODO

Implement voting system like that:

   User   voting-system    votes-service      H2 or PG
    */        +----+         +-------+         +----+
   /|  <----> | UI | <-----> | Store | <-----> | DB |
   / \        +----+         +-------+         +----+
        HTTP         RSocket            R2DBC

k8s k3d k3s

Install k8s cluster with Rancher tools: k3d + k3s if you don't have DOcker for Mac or Windows:

# start docker...
brew reinstall k3d
k3d create --api-port 6551 --publish 80:80 --workers 2
# ...
export KUBECONFIG="$(k3d get-kubeconfig --name='k3s-default')"
# ...
k3d stop
k3d delete

k8s dashboard

Install and configure Kubernetes Dashboard if you need:

brew reinstall kubernetes-cli
  1. deploy k8s dashboard in k8s in Docker for Mac:
apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.1/src/deploy/recommended/kubernetes-dashboard.yaml
  1. copy token:
kubectl -n kube-system describe secrets kubernetes-dashboard-token-... | grep 'token:' | awk '{print $2}'
  1. start proxy
kubectl proxy
  1. open k8s dashboard and login using token from previous step:

http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/

start develop

brew reinstall skaffold
skaffold dev # or skaffold run --tail
# ...
skaffold delete

deploy in public cloud

Before deploy to public cloud, you need build and push docker images...

./mvnw clean test jib:build

links