Skip to content

Latest commit

 

History

History
75 lines (54 loc) · 1.91 KB

README.md

File metadata and controls

75 lines (54 loc) · 1.91 KB

Using Kubernetes in Docker for Mac

Look at your Kubernetes configuration

cat /Users/pat/.kube/config
kubectl get nodes

Install the Kubernetes Dashboard

Kubernetes Dashboard documentation Dashboard access control documentation

cd kube/dashboard
kubectl create -f dashboard-admin.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
kubectl proxy

Browse to the dashboard.

Install Helm

Helm install docs Install Helm on your laptop

cd kube/helm
brew install kubernetes-helm
kubectl create -f rbac-config.yaml
helm init

Build a Spring Boot application with Docker

cd java-in-container-dev/spring-doge-workspace/spring-doge/

Look the Dockerfile for multi stage build. This is the file that would be used in a CI/CD pipeline.

docker build -t chanezon/spring-doge .

Or look at Makefile and Dockerfile.dev for manual build using a container: that way the maven cache is reused from one build to the other. You'd use that in development.

make jar
make image

Debug a Spring Boot application in a containerized IDE

see X11 Setup

cd java-in-container-dev/spring-doge-workspace/spring-doge/
startx
docker-compose -f docker-compose.ide.yml up

start debugging in STS.

Deploy a a Spring Boot application in Kubernetes with Docker

cd java-in-container-dev/spring-doge-workspace/spring-doge/
startx
docker stack deploy --compose-file docker-compose.yml doge
docker stack ps doge
kubectl get all