Skip to content

Hazelcast prepared with discovery mechanism for Kubernetes

License

Notifications You must be signed in to change notification settings

herolynx/kubernetes-hazelcast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kubernetes-hazelcast

Hazelcast prepared with discovery mechanism for Kubernetes

Build

  1. Build project
mvn clean build

or

mvn clean istall
  1. Build and push docker image
mvn clean package docker:build -DpushImage -DpushImageTags -DdockerImageTags=<VERSION>

Local development

Pre-requisites:

* [minikube](https://github.com/kubernetes/minikube)
* Maven
* Java 8
  1. Run locally
./run.sh
Run on local Kubernetes (using minikube)
  1. Deploy all
kubectl create -f devops
  1. Access local cluster
minikube dashboard
  1. Checking address of local service
minikube service k8s-java-sample --url

DevOps with Kubernetes

Service is prepared to be deployed in Kubernetes.

  1. Deploy all
kubectl create -f devops
  1. Access cluster
kubectl proxy

Then open dashboard in web-browser: http://localhost:8001/ui

  1. Make new deployment (after changing image version in devops/deployment.yaml)
kubectl apply -f devops/deployment.yaml
Basic operations
  1. Get pods
kubectl get pods
  1. Get services
kubectl get services
  1. Check logs of single pod
kubectl logs -f <pod_name>

If you have many containers in pod, name of container must be specified:

kubectl logs -f <pod_name> -c <container_name>
  1. Deleting stuff
kubectl delete service|deployment|pod <name>
  1. Rollout (provided that revisionHistoryLimit > 0 in devops/deployment.yaml)
kubectl rollout undo deployment/<name>
  1. Scaling
kubectl scale --replicas=<number> deployment/<name>
  1. Get basic info about your services
watch -n 1 kubectl get configmap,secrets,deployments,services,ingress,nodes,pods

About

Hazelcast prepared with discovery mechanism for Kubernetes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published