KubeWeekly #170

KubeWeeklyは毎週Kubernetesに関する興味深いニュースを提供しています。（http://bit.ly/kubeweekly ）この記事は 2019/06/06に発行された Kube Weekly #170 ( https://mailchi.mp/cncf/kubeweekly-170 ) を読んで、感じたことをメモ的にまとめたものです。
私の勘違いや説明不足による誤解もあるかと思いますので、この記事読んで「おっ」と思ったらURLを辿って本文を確認してください。

(過去のKubeWeekly読書メモは[こちら](https://qiita.com/tags/kubeweekly))

# KubeWeekly #170

# The Headlines

## Reflections on the Fifth Anniversary of Kubernetes - Cloud Native Computing Foundation
<table>
<tr>
  <td colspan="2"><a href="https://www.cncf.io/blog/2019/06/06/reflections-on-the-fifth-anniversary-of-kubernetes/">Reflections on the Fifth Anniversary of Kubernetes - Cloud Native Computing Foundation</a></td>
</tr>
<tr>
  <td><img src="https://www.cncf.io/wp-content/uploads/2017/12/icon_cncf_twitter.png"></td>
  <td>Guest post from the Kubernetes Project Five years ago, Kubernetes was released into the world. Like all newborns, it was small, limited in functionality, and had only a few people...</td>
</tr>
</table>

Kubernetes生誕5周年だね。という記事。

# The Technical

## Kubernetes admission controllers for secure deployments | Sysdig
<table>
<tr>
  <td colspan="2"><a href="https://sysdig.com/blog/kubernetes-admission-controllers/">Kubernetes admission controllers for secure deployments | Sysdig</a></td>
</tr>
<tr>
  <td><img src="https://sysdig.com/wp-content/uploads/2019/06/admission_controllers_diagram.png"></td>
  <td>By integrating Kubernetes admission controllers with Sysdig Secure image scanning and policies, you can enforce security by default on your deployments.</td>
</tr>
</table>

Admission Controllerの説明としてSysdig Secureがどのように組み込まれているかを紹介している。

## Kyma - extend and build on Kubernetes with ease
<table>
<tr>
  <td colspan="2"><a href="https://kubernetes.io/blog/2019/05/23/kyma-extend-and-build-on-kubernetes-with-ease/">Kyma - extend and build on Kubernetes with ease</a></td>
</tr>
<tr>
  <td><img src="https://kubernetes.io//images/blog/2019-05-23-Kyma-extend-and-build-on-kubernetes-with-ease/kyma-center.png"></td>
  <td>Authors: Lukasz Gornicki (SAP)
According to this recently completed CNCF Survey, the adoption rate of Cloud Native technologies in production is growing rapidly. Kubernetes is at the heart of this technological revolution. Naturally, the growth of cloud native technologies has been accompanied by the growth of the ecosystem that surrounds it. Of course, the complexity of cloud native technologies have increased as well. Just google for the phrase “Kubernetes is hard”, and you’ll get plenty of articles that explain this complexity problem.</td>
</tr>
</table>

先日1.0となった[Kyma](https://github.com/kyma-project/kyma/)の紹介。
モノリスアプリケーションをクラウドネイティブに作り直す時に、全てを書き直すのではなく、イベント駆動スタイルに変更する、というアプローチを取る際に役に立つフレームワークのようだ。

モノリスアプリケーションは従来通り動かして、その周辺のシステムや新機能をクラウドネイティブに作る、というような構成を取る際には有用そう。

## Automated Canary Management to Kubernetes with Flagger, Istio and GitOps Pipelines
<table>
<tr>
  <td colspan="2"><a href="https://www.weave.works/blog/automated-canary-management-to-kubernetes-with-flagger-istio-and-gitops-pipelines">Automated Canary Management to Kubernetes with Flagger, Istio and GitOps Pipelines</a></td>
</tr>
<tr>
  <td><img src="https://www.weave.works/assets/images/blt6f971bc822462071/flagger-load-testing.png"></td>
  <td>Flagger automates traffic routing between canary deployments, reducing the risk of app downtime. This allows your team to confidently test and rollout innovative new features more frequently.  This tutorial walks you through setting up Istio on a Kubernetes cluster, automating canary and A/B deployments with GitOps pipelines.</td>
</tr>
</table>

FluxをつかいGitOpsを実現しつつ、さらにFlaggerを使うことでカナリアリリースを実現している例を紹介。

## A Step-by-Step Guide For AWS Lambda Deployments with Ballerina - The New Stack
<table>
<tr>
  <td colspan="2"><a href="https://thenewstack.io/a-step-by-step-guide-for-aws-lambda-deployments-with-ballerina/">A Step-by-Step Guide For AWS Lambda Deployments with Ballerina - The New Stack</a></td>
</tr>
<tr>
  <td><img src="https://cdn.thenewstack.io/media/2019/05/1f88a89b-ballerina-lambda.jpg"></td>
  <td>WSO2 sponsored this post. Ballerina is a programming language for developers seeking to create and integrate microservices applications in a single interface for cloud-native applications. In addition to ensuring security standards are met before applications can be deployed, the open source language supports APIs, event streams, distributed applications and other functions. In this post, we …</td>
</tr>
</table>

BallerinaでAWS Lambdaの処理を書く方法を紹介。
Ballerinaはそんなこともできるのか。

## How to set up a serious Kubernetes terminal
<table>
<tr>
  <td colspan="2"><a href="https://medium.com/free-code-camp/how-to-set-up-a-serious-kubernetes-terminal-dd07cab51cd4">How to set up a serious Kubernetes terminal</a></td>
</tr>
<tr>
  <td><img src="https://cdn-images-1.medium.com/max/1200/0*tTUoVKGzxtZYA5xp.png"></td>
  <td>All the CLI tools a growing k8s nerd needs</td>
</tr>
</table>

CLIベースのKubernetesツールの紹介。

- [k9s](https://github.com/derailed/k9s)
- [kubectx, kubens](https://github.com/ahmetb/kubectx)
- [kube-ps1](https://github.com/jonmosco/kube-ps1)
- [popeye](https://github.com/derailed/popeye)
- [stern](https://github.com/wercker/stern)

## CI/CD with Argo on Kubernetes
<table>
<tr>
  <td colspan="2"><a href="https://medium.com/swlh/ci-cd-with-argo-on-kubernetes-28c1a99616a9">CI/CD with Argo on Kubernetes</a></td>
</tr>
<tr>
  <td><img src="https://cdn-images-1.medium.com/max/1200/1*0n66zZ2D8-vDkoCDqRbiJQ.png"></td>
  <td>Continuous Integration and Continuous Delivery is something everyone strives to. It makes everything so much easier. Of course there are a…</td>
</tr>
</table>


Argo Workflowを使ってCI/CDを実現する例を紹介。
Argo CIの開発が芳しくないので、代替ツールを自分で作ったらしい。

## Boosting your kubectl productivity
<table>
<tr>
  <td colspan="2"><a href="https://itnext.io/boosting-your-kubectl-productivity-b348f7c25712">Boosting your kubectl productivity</a></td>
</tr>
<tr>
  <td><img src="https://cdn-images-1.medium.com/max/1200/0*ARTbu6hVchCyFGly.jpg"></td>
  <td>This article contains a series of tips and tricks to make your usage of kubectl more efficient and effective.</td>
</tr>
</table>

kubectlの紹介とTips集

- 補完を使う
- kubectl explain
- `-o custom-columns`
- JSONPath (`-o custom-columns`でもJSONPathが使えるのを知らなかった)
- kubectx, kubens
- aliasを活用する
  - aliasの自動生成
- pluginを使う
  - krew
- fzf便利

## Universal CICD pipeline for K8S on AWS
<table>
<tr>
  <td colspan="2"><a href="https://medium.com/swlh/universal-cicd-pipeline-on-aws-and-k8s-7b4129fac5d4">Universal CICD pipeline for K8S on AWS</a></td>
</tr>
<tr>
  <td><img src="https://cdn-images-1.medium.com/max/1200/1*v-kfm5jhb80QPxWIC1r1gA.png"></td>
  <td>At an abstract level, a deployment pipeline is an automated manifestation of your process for getting software from version control into…</td>
</tr>
</table>


AWSで実現するCIとKubernetesへのCD。
Gateway,Lambda,CodePipeline, CodeBuildなどを駆使している。

## Kubernetes — from the beginning, part IV, autoscaling
<table>
<tr>
  <td colspan="2"><a href="https://itnext.io/kubernetes-from-the-beginning-part-iv-autoscaling-7da4160181fc">Kubernetes — from the beginning, part IV, autoscaling</a></td>
</tr>
<tr>
  <td><img src="https://cdn-images-1.medium.com/max/1200/1*pK11p9M_EYNkSs7v-ZA6Rw.jpeg"></td>
  <td>Auto scaling enables you to handle sudden increases in load so that your app is still in business</td>
</tr>
</table>

HPAをつかったオートスケールについてチュートリアルを通して解説している。

## Why I no longer use Terraform for Templating Kubernetes
<table>
<tr>
  <td colspan="2"><a href="https://medium.com/@stobiewankenobi/why-i-no-longer-use-terraform-for-templating-kubernetes-9aef37741447">Why I no longer use Terraform for Templating Kubernetes</a></td>
</tr>
<tr>
  <td><img src="https://cdn-images-1.medium.com/max/1200/1*_d_KxQVEDhWUhJVUPImcaA.jpeg"></td>
  <td>One of the most important principles to being an engineer, is being able to admit when you are wrong. Well folks. I was wrong. Some of you…</td>
</tr>
</table>

helmfileを使ってHelmのリリースパラメータをコードで管理する方法と、クレデンシャルの管理を含めたリリースのワークフローの提案。

`terraform -> ssm <- aws-env -> helmfile -> helm -> k8s`

こういう構成が良さそう、とのこと。


# The Editorial

## Certified Kubernetes Administrator (CKA) Certification is Now Valid for 3 Years - Cloud Native Computing Foundation
<table>
<tr>
  <td colspan="2"><a href="https://www.cncf.io/blog/2019/05/28/certified-kubernetes-administrator-cka-certification-is-now-valid-for-3-years/">Certified Kubernetes Administrator (CKA) Certification is Now Valid for 3 Years - Cloud Native Computing Foundation</a></td>
</tr>
<tr>
  <td><img src="https://www.cncf.io/wp-content/uploads/2017/12/icon_cncf_twitter.png"></td>
  <td>In 2017, CNCF launched the Certified Kubernetes Administrator (CKA) exam which has become one of the most popular Linux Foundation certifications to date. Over 9,000 individuals have registered for the...</td>
</tr>
</table>

CKAの資格は2年間で失効するということだったが、カリキュラムの改定が予定より遅れるということで、3年で失効ということに変更になったようです。
CKADの有効期限については変更なしの2年間なので要注意です。

## Kubernetes Podcast from Google
<table>
<tr>
  <td colspan="2"><a href="https://kubernetespodcast.com/episode/056-openebs/">Kubernetes Podcast from Google</a></td>
</tr>
<tr>
  <td><img src="https://kubernetespodcast.com/_assets/images/Kubernetes-Podcast-Logo_1400x1400.png"></td>
  <td></td>
</tr>
</table>

Kubernetes Podcast
(聞いていない)

## Microservices, Containers and Kubernetes: Which Applications Benefit? - Container Journal
<table>
<tr>
  <td colspan="2"><a href="https://containerjournal.com/2019/06/03/microservices-containers-and-kubernetes-which-applications-benefit/">Microservices, Containers and Kubernetes: Which Applications Benefit? - Container Journal</a></td>
</tr>
<tr>
  <td><img src="https://containerjournal.com/wp-content/uploads/2019/06/Microservices-Containers-Kubernetes.jpg"></td>
  <td>Here's a look at what microservices, containers and Kubernetes do to understand which applications mesh with these emerging technologies.</td>
</tr>
</table>

マイクロサービス化の利点とマイクロサービスを運用していく上でのKubernetesの必要性について説明している。

## Effective strategies for monitoring containerized environments - JAXenter
<table>
<tr>
  <td colspan="2"><a href="https://jaxenter.com/monitoring-containerized-environments-159137.html">Effective strategies for monitoring containerized environments - JAXenter</a></td>
</tr>
<tr>
  <td><img src="https://jaxenter.com/wp-content/uploads/2019/06/shutterstock_635474195.jpg"></td>
  <td>When it comes to containerized environments, one must look in a top-down manner to choose the right tools and strategies to overcome certain challenges.</td>
</tr>
</table>

コンテナ環境においてモニタリングをどのように行うか？という話。

スケールの問題として、メトリクスの量が膨大になるということがある、クラスタ毎にメトリクスを収集することで、分割統治的に負荷を分散することができるが、横断的な検索がしづらくなるという問題がある。ThanosやPrometheusでメトリクスを集約することで、横断的な検索をサポートすることができるが、より良いのは負荷分散されたクラスタにログを集約することである。

頻繁にコンテナがデプロイされることによる問題もあります。これにより長期間のメトリクスの集計に問題が生じることがあります。時系列データとメタデータをを分けて格納することにより性能向上を見込むことができます。
またrecording ruleやpre-aggregationなどを使うことで、集計を簡略化することもできますが、正確性とのトレードオフとなります。

様々なツールの生成する時系列データを横断的に調査できることが重要となっており、そのためにはメタデータの標準化が必要です。

## Blockchain and Kubernetes, the technology behind Positive Energy Ltd
<table>
<tr>
  <td colspan="2"><a href="https://blog.cloud66.com/the-technology-behind-positive-energy/">Blockchain and Kubernetes, the technology behind Positive Energy Ltd</a></td>
</tr>
<tr>
  <td><img src="https://blog.cloud66.com/content/images/2019/03/blockchain-and-cloud66-kubernetes-the-technology-behind-positive-energy-1.png"></td>
  <td>This case study features Positive Energy Ltd, a project that simplifies renewable energy finance. It showcases how Positive Energy uses Blockchain, Cloud 66 Kubernetes solutions, and Google Cloud to achieve unbeatable performance. Positive Energy Ltd Background Nicolas Payen and Vincent Bakker founded Positive Energy Ltd in 2017. Positive Energy helps</td>
</tr>
</table>

Kubernetesの利用事例。 Cloud99 + Google Cloud.

## How big companies are using Kubernetes - JAXenter
<table>
<tr>
  <td colspan="2"><a href="https://jaxenter.com/big-companies-using-kubernetes-159007.html">How big companies are using Kubernetes - JAXenter</a></td>
</tr>
<tr>
  <td><img src="https://jaxenter.com/wp-content/uploads/2019/05/shutterstock_580049185.jpg"></td>
  <td>Kubernetes' increased adoption is showcased by a number of influential companies which have integrated the technology into their services.</td>
</tr>
</table>

Kubernetesを採用することとなった著名なサービスの事例紹介。

- Tinder
- Reddit
- The New York Times
- Airbnb
- Pinterest
- Pokemon Go

## Building a Container Platform at Cruise (Part 1)
<table>
<tr>
  <td colspan="2"><a href="https://medium.com/cruise/building-a-container-platform-at-cruise-part-1-507f3d561e6f">Building a Container Platform at Cruise (Part 1)</a></td>
</tr>
<tr>
  <td><img src="https://cdn-images-1.medium.com/max/1200/0*45lreQU6SPHZG0mt"></td>
  <td>The backend for Cruise self-driving cars runs on Kubernetes.</td>
</tr>
</table>

サンフランシスコの自動運転車を扱う会社CruiseのKubernets導入事例。
Part1ということで、プロジェクトや環境に応じてどのようにKubernetesクラスタを使い分けているのかを紹介している。

## Kubernetes Journey — Up and running out of the cloud — Kubernetes Overview
<table>
<tr>
  <td colspan="2"><a href="https://itnext.io/kubernetes-journey-up-and-running-out-of-the-cloud-kubernetes-overview-5012994b8955">Kubernetes Journey — Up and running out of the cloud — Kubernetes Overview</a></td>
</tr>
<tr>
  <td><img src="https://cdn-images-1.medium.com/max/1200/1*oAPJTuUElDn-FftMNSz1eQ.jpeg"></td>
  <td>We have walked a long path already in this journey. In the first article, we briefly described how the IT industry has evolved to the...</td>
</tr>
</table>

Kubernetesのマスターコンポーネントと主要なリソースの紹介。

## Observability should not slow you down - Cloud Native Computing Foundation
<table>
<tr>
  <td colspan="2"><a href="https://www.cncf.io/blog/2019/05/30/observability-should-not-slow-you-down/">Observability should not slow you down - Cloud Native Computing Foundation</a></td>
</tr>
<tr>
  <td><img src="https://www.cncf.io/wp-content/uploads/2017/12/icon_cncf_twitter.png"></td>
  <td>Originally published on Medium by Travis Jeppson, Sr. Director of Engineering, Nav Inc In any application, the lack of observability is the same as riding a bike with a blindfold...</td>
</tr>
</table>

メトリクスの収集・集約ツールの選定基準と採用したプロダクトの紹介。

- Prometheus
- StatsD
- SignalFx

## A Look Back At KubeCon + CloudNativeCon Barcelona 2019 - Cloud Native Computing Foundation
<table>
<tr>
  <td colspan="2"><a href="https://www.cncf.io/blog/2019/05/31/a-look-back-at-kubecon-cloudnativecon-barcelona-2019/">A Look Back At KubeCon + CloudNativeCon Barcelona 2019 - Cloud Native Computing Foundation</a></td>
</tr>
<tr>
  <td><img src="https://www.cncf.io/wp-content/uploads/2017/12/icon_cncf_twitter.png"></td>
  <td>  Hot off an amazing three days in Barcelona, here is a snapshot into some of the key highlights and news from KubeCon + CloudNativeCon Europe 2019! This year we...</td>
</tr>
</table>

KubeCon + CloudNativeCon Barcelona 2019のまとめ