Presented by @makocchi Kubernetes Fest Tokyo 2020 2 Makoto Hasegawa Working at // AI Division, CyberAgent, Inc Currently // Develop and maintain private OpenStack cloud. Develop and maintain Kubernetes as a Service platform. CKA (Certified Kubernetes Administrator) CKA-1700-0150-0100 CKAD (Certified Kubernetes Application Developper) CKAD-1800-0005-0100 Job Title // Technical Lead Infrastructure Engineer WHO am I Twitter // @makocchi Facebook // makocchi0923 Hobby // Playing bass
Kubernetes Fest Tokyo 2020 Presented by @makocchi 15 Knowledge as Code (a.k.a Best Practice as Code) いわゆる「ベスト・プラクティス」をコード化することでみんなが様々なメリットを受けれる ようにしようという考え方 クラウドネイティブなチーム作りを目指すには欠かせない要素ではないでしょうか クラウドネイティブなチーム(持論) is スケーラブルで回復性のあるチーム チームにおいて人数を増やせばそれだけチームのパフォーマンスが上がる 誰が作業してもクオリティが変わらない メンバー同士はいい意味で疎結合 各自が自らやるべきことを探し、自立できている
Kubernetes Fest Tokyo 2020 Presented by @makocchi 16 Knowledge as Code (a.k.a Best Practice as Code) IaC もそうですが、大切なのは継続して実践していくこと そしてそれは口で言う程簡単ではないです まずは出来るところから始めていくことが大切なんじゃないでしょうか みなさんの周りにもコード化できる Knowledgs がきっといろいろあるはずです!
Kubernetes Fest Tokyo 2020 Presented by @makocchi 33 Open Policy Agent を Kubernetes に組み込む https://www.openpolicyagent.org/docs/edge/kubernetes-introduction/
Kubernetes Fest Tokyo 2020 Presented by @makocchi 34 Open Policy Agent を Kubernetes に組み込む https://www.openpolicyagent.org/docs/edge/kubernetes-introduction/
Kubernetes Fest Tokyo 2020 Presented by @makocchi 59 Conftest は Rego で記述されたルールを元にマニフェストをチェック(テスト)することができる コマンドラインツールです Rego を使いこなせればこんなこともできる! 要チェックや $ conftest test deployment.yaml FAIL - deployment.yaml - Containers must not run as root FAIL - deployment.yaml - Deployments are not allowed 2 tests, 0 passed, 0 warnings, 2 failures package main deny[msg] { input.kind = "Deployment" not input.spec.template.spec.securityContext.runAsNonRoot = true msg = "Containers must not run as root" } deny[msg] { input.kind = "Deployment" not input.spec.selector.matchLabels.app msg = "Containers must provide app label for pod selectors" } https://github.com/open-policy-agent/conftest