Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Start a fullnode on GKE in <2 min - Alexander P...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
GoDays
January 30, 2019
Technology
110
0
Share
Start a fullnode on GKE in <2 min - Alexander Peters, IOV
Start a fullnode on GKE in <2 min - Alexander Peters, IOV
GoDays
January 30, 2019
More Decks by GoDays
See All by GoDays
Standing on the shoulders of giants - Tomasz Janiszewski - D2IQ
godays
1
140
How to instrument Go code in 2020 - Björn Rabenstein - Grafana Labs
godays
1
270
12 Factor CLI Apps with Cobra - Markus Zimmermann - cosee
godays
0
430
Integration and end-to-end testing with TestContainers-Go - Nikolay Kuznetsov & Erdem Toraman - Zalando
godays
1
1.1k
Fun with Functions - Frank Müller - Loodse
godays
0
140
Amazon SNS/SQS with Go - Paul Borlin - Compassion International
godays
1
340
Writing a language parser in 15min (or less) - Xavier Coulon - Red Hat
godays
0
130
A story about distributed computing before the cloud arrived - Rogier Lommers - bol.com
godays
0
130
Serverless Ops – Bye-bye Bash, Hello Go! - Rob Sutter - Amazon
godays
0
110
Other Decks in Technology
See All in Technology
Don't Just Patch — MOTTAINAI! Learn Security from Laravel CVE Diffs
codmoninc
0
140
AI時代から振り返るTerraform drift運用の歴史 / AI Age Reflections on the History of Terraform Drift Operations
aeonpeople
0
540
LLM時代のリファクタリング戦略_AIエージェントによる段階的・安全なTS移行方法
play_inc
0
300
long-running-tasks
cipepser
2
420
電子辞書Brainをネットに繋げてみた(自力編)
raspython3
0
270
Java正規表現エンジン(NFA)の仕組みと パフォーマンスを維持するための最適化手法
takeuchi_132917
0
130
Javaコミュニティをもっと楽しむための9箇条
takasyou
0
320
Sony_KMP_Journey_KotlinConf2026
sony
0
130
形式手法特論:公平性制約の位相的特徴づけ #kernelvm / Kernel VM Study Kansai 12th
ytaka23
1
520
オンコールの負荷軽減のためのBits Assistant 活用方法 / How to Use Bits Assistant to Reduce the Workload on On-Call Staff
sms_tech
1
260
はじめてのDatadog
kairim0
0
150
さきさん文庫の書籍ができるまで
sakiengineer
0
280
Featured
See All Featured
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
200
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
The Language of Interfaces
destraynor
162
26k
Git: the NoSQL Database
bkeepers
PRO
432
67k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Are puppies a ranking factor?
jonoalderson
1
3.4k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
370
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
190
Mobile First: as difficult as doing things right
swwweet
225
10k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
55k
Transcript
Start a full node on GKE in <2 min 2019
- Alexander Peters
About Me Alexander Peters Backend lead at IOV.one Go, K8s,
DevOps and Security
Architecture V S S iNet S L B
Architecture V S S iNet S L B
Containers
Minimal Container Images • Scratch Image • Alpine Linux when
OS required https://alpinelinux.org • Distroless base images https://github.com/GoogleContainerTools/distroless
State
State transfer • VolumeSnapshot Controller • VolumeSnapshot Provisioner > Disk
snapshots #FTW https://github.com/kubernetes-incubator/external-storage
Best height? F F F F F C
Take snapshot F F F C V
CRDs: VolumeSnapshots + Data > kubectl get volumesnapshots NAME AGE
godays-snap-1548763215780962127 17m godays-snap-1548763506627916883 12m godays-snap-1548763807378144367 7m apiVersion: volumesnapshot.external-storage.k8s.io/v1 kind: VolumeSnapshotData spec: gcePersistentDisk: snapshotId: pvc-d92e9529-2033-11e9-8eb6-42010a8400241548763507112695918
Let’s use it!
VolumeSnapshot Provisioning kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: name: snapshot-promoter provisioner:
volumesnapshot.external-storage.k8s.io/snapshot-promoter reclaimPolicy: Delete volumeBindingMode: Immediate parameters: type: pd-ssd https://github.com/kubernetes-incubator/external-storage/blob/master/snapshot/doc/user-guide.md
Sentry - Full Node Config apiVersion: apps/v1 kind: StatefulSet spec:
... volumeClaimTemplates: spec: storageClassName: snapshot-promoter selector: matchLabels: group: "godays" matchExpressions: - {key: approved, operator: Exists}
Not a live demo
PVC - Provisioning > kubectl get pvc -w ... godays-fullnode-xrpc-0
Pending snapshot-promoter 19s godays-fullnode-xrpc-0 Pending snapshot-promoter 22s godays-fullnode-xrpc-0 Pending snapshot-promoter 24s godays-fullnode-xrpc-0 Pending snapshot-promoter 26s godays-fullnode-xrpc-0 Pending snapshot-promoter 28s godays-fullnode-xrpc-0 Pending snapshot-promoter 30s godays-fullnode-xrpc-0 Pending snapshot-promoter 32s godays-fullnode-xrpc-0 Pending pvc-23c64f9c-2308-11e9-8eb6-42010a840024 0 snapshot-promoter 34s godays-fullnode-xrpc-0 Bound pvc-23c64f9c-2308-11e9-8eb6-42010a840024 33Gi RWO snapshot-promoter 34s godays-fullnode-xrpc-0 Bound pvc-23c64f9c-2308-11e9-8eb6-42010a840024 33Gi RWO snapshot-promoter 34s
Pod - Deployment > kubectl get pods -w godays-fullnode-xrpc-0 0/3
Pending 0 0s godays-fullnode-xrpc-0 0/3 Pending 0 34s godays-fullnode-xrpc-0 0/3 Init:0/2 0 34s godays-fullnode-xrpc-0 0/3 Init:0/2 0 44s godays-fullnode-xrpc-0 0/3 Init:1/2 0 45s godays-fullnode-xrpc-0 0/3 PodInitializing 0 46s godays-fullnode-xrpc-0 2/3 Running 0 47s godays-fullnode-xrpc-0 3/3 Running 0 59s
• Rolling snapshots *) • PVC not deleted • Data
integrity issues • Security concerns • High frequency Problems *) https://github.com/kubernetes-incubator/external-storage/issues/875
Summary • All good now! • Fast startup time <
2min • Works well with Horizontal Pod Autoscaler • Kubernetes v1.12 as an alpha feature
Thanks!
Bonus: Merkle tree https://en.wikipedia.org/wiki/Merkle_tree
Bonus: Working With Scratch Image • Go static compilation •
COPY ca-bundle.pem /etc/ssl/certs/ca-certificates.crt https://curl.haxx.se/docs/caextract.html • ENV ZONEINFO /zoneinfo.zip COPY zoneinfo.zip / In $GOROOT/lib/time/zoneinfo.zip https://golang.org/pkg/time/#LoadLocation