> kubectl get deployment java-demo
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
java-demo 3 3 3 3 1m
> kubectl get pods -l app=java-demo
NAME READY STATUS RESTARTS AGE
java-demo-307071-c93l1 1/1 Running 0 1m
java-demo-307071-f6nfc 1/1 Running 0 1m
java-demo-307071-x4rr8 1/1 Running 0 1m
> kubectl get pods -l app=java-demo -o wide
NAME READY STATUS IP ...
java-demo-307071-c93l1 1/1 Running 10.36.1.80
java-demo-307071-f6nfc 1/1 Running 10.36.1.79
java-demo-307071-x4rr8 1/1 Running 10.36.1.81
Slide 35
Slide 35 text
Prometheus:
what is it?
Slide 36
Slide 36 text
Prometheus:
how it works?
Slide 37
Slide 37 text
Prometheus:
say more?
Slide 38
Slide 38 text
> curl http://35.197.214.121/prometheus
...
# HELP process_starttime_seconds The starttime of the Java
virtual machine
# TYPE process_starttime_seconds gauge
process_starttime_seconds 1.506735317456E9
# HELP process_uptime_seconds The uptime of the Java
virtual machine
# TYPE process_uptime_seconds gauge
process_uptime_seconds 145236.015
Slide 39
Slide 39 text
> curl http://35.197.214.121/prometheus
...
# HELP http_requests_duration_seconds Timer of servlet
request
# TYPE http_requests_duration_seconds summary
http_requests_duration_seconds_count{method="GET",status="
200",uri="/"} 2.0
http_requests_duration_seconds_sum{method="GET",status="20
0",uri="/"} 0.05230485
– gitops theory
• any developer can use git
• anyone can join team and ship a new app or make changes easily
• all changes can be stored, audited and validated in git
and we didn’t have to do anything very new or clever =)
Slide 48
Slide 48 text
– gitops theory
• config is code
• code (& config!) must be version controlled
• CD tools that do not record changes in git are harmful
Slide 49
Slide 49 text
– gitops theory
Continuous Delivery/Deployment
Image
Repo
Orchestrator
Deploy
Synchronizer
Config change
Manual deployment
Git
Code change
Git
Update Hint
Continuous Integration
Deploy
Automator
CI
Pipeline
Slide 50
Slide 50 text
– kube pitfalls
Slide 51
Slide 51 text
I just go and kubectl
all the things; great!
Slide 52
Slide 52 text
Maybe, I should get
my CI to do kubectl!
Slide 53
Slide 53 text
– more gitops
Slide 54
Slide 54 text
– more gitops
•everything is checked in git
•easy to deploy the entire stack locally
•easy to fork a cluster
•easy to detect ad-hoc changes, alert/undo
Slide 55
Slide 55 text
– more gitops
•git is the source of truth
•review process is the same as for code
•infra changes go through review process
•you are free to use whatever tools
Slide 56
Slide 56 text
tutorial part 1:
deploying Spring Boot app to
Kubernetes, step-by-step
http://github.com/errordeveloper/prom-java-demo
Slide 57
Slide 57 text
tutorial part 2:
deploying Socks Shop to
Kubernetes, the gitops way