KubeWeekly #152

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


# The Headlines

## Annual “CNCF Community Awards” Nominations Kick Off – Winners to be Recognized at KubeCon + CloudNativeCon Seattle - Cloud Native Computing Foundation
<table>
<tr>
  <td colspan="2"><a href="https://www.cncf.io/blog/2018/10/08/annual-cncf-community-awards-nominations-kick-off-winners-to-be-recognized-at-kubecon-cloudnativecon-seattle/">Annual “CNCF Community Awards” Nominations Kick Off – Winners to be Recognized at KubeCon + CloudNativeCon Seattle - Cloud Native Computing Foundation</a></td>
</tr>
<tr>
  <td><img src="https://www.cncf.io/wp-content/uploads/2018/10/cncf_end_user_awards.jpg"></td>
  <td>Nominations open today for the third-annual CNCF Community Awards – sponsored by VMware – honoring those who have made the greatest impact over the last year in the cloud native...</td>
</tr>
</table>

CNCF Community Awardsのノミネートが開始されました。
Top Ambassador, Top Commiter,Chop Wood/Carry Water Awardがあるようです。
`Chop Wood/Carry Water`影の功労者みたいな意味だろうか？

## Introducing the Non-Code Contributor’s Guide
<table>
<tr>
  <td colspan="2"><a href="https://kubernetes.io/blog/2018/10/04/introducing-the-non-code-contributors-guide/">Introducing the Non-Code Contributor’s Guide</a></td>
</tr>
<tr>
  
  <td>Author: Noah Abrahams (InfoSiftr), Jonas Rosland (VMware), Ihor Dvoretskyi (CNCF)
It was May 2018 in Copenhagen, and the Kubernetes community was enjoying the contributor summit at KubeCon/CloudNativeCon, complete with the first run of the New Contributor Workshop. As a time of tremendous collaboration between contributors, the topics covered ranged from signing the CLA to deep technical conversations. Along with the vast exchange of information and ideas, however, came continued scrutiny of the topics at hand to ensure that the community was being as inclusive and accommodating as possible.</td>
</tr>
</table>

Kubernetesプロジェクトに対してソースコード以外にも貢献する方法があることの紹介。

[community/non-code-contributions.md at master · kubernetes/community · GitHub](https://github.com/kubernetes/community/blob/master/contributors/guide/non-code-contributions.md)

## Deploy Your First Deep Learning Model On Kubernetes With Python, Keras, Flask, and Docker
<table>
<tr>
  <td colspan="2"><a href="https://medium.com/analytics-vidhya/deploy-your-first-deep-learning-model-on-kubernetes-with-python-keras-flask-and-docker-575dc07d9e76">Deploy Your First Deep Learning Model On Kubernetes With Python, Keras, Flask, and Docker</a></td>
</tr>
<tr>
  <td><img src="https://cdn-images-1.medium.com/max/1200/0*hpICfSgnYcww5kt5"></td>
  <td>So Easy Even Your Boss Can Do It!</td>
</tr>
</table>


Kubernetesを使ってディープラーニングをやってみようという記事
[Building a simple Keras + deep learning REST API](https://blog.keras.io/building-a-simple-keras-deep-learning-rest-api.html) をKubernetes上で動かしている

Pythonのライブラリであるkeras, tensorflowなどを使い、モデルはResnet50を使って、与えられた画像に何が写っているかを推定するというWebアプリケーションを作る。ソースコードはたった85行

GKEでのクラスタの作成方法なども紹介されている。

# The Technical
## How to use Envoy as a Load Balancer in Kubernetes
<table>
<tr>
  <td colspan="2"><a href="https://blog.markvincze.com/how-to-use-envoy-as-a-load-balancer-in-kubernetes/">How to use Envoy as a Load Balancer in Kubernetes</a></td>
</tr>
<tr>
  <td><img src="https://blog.markvincze.com//assets/images/markvincze-profile.jpg?v=dcdd9538a2"></td>
  <td>An introduction to using Envoy as a load balancer in Kubernetes, and configuring various load balancing algorithms.</td>
</tr>
</table>

EnvoyをKubernetes上のサービスのロードバランサとして使用する方法。
EnvoyのSTRICT_DNS service discovery modeを使うとDNSから引けるAレコードにロードバランスしてくれる。これはKubernetesのheadless Serviceと相性が良い。
IngressControllerなどは使わず、シンプルにEnvoyをKubernetes内にデプロイしている。
grafanaでメトリクスを確認しつつ、ロードバランスのアルゴリズムを選定するデモ。

## Support for Azure VMSS,  Cluster-Autoscaler and User Assigned Identity
<table>
<tr>
  <td colspan="2"><a href="https://kubernetes.io/blog/2018/10/08/support-for-azure-vmss--cluster-autoscaler-and-user-assigned-identity/">Support for Azure VMSS,  Cluster-Autoscaler and User Assigned Identity</a></td>
</tr>
<tr>
  <td><img src="https://kubernetes.io/images/blog/2018-10-08-support-for-azure-vmss/sample-azure-cluster.png"></td>
  <td>Author: Krishnakumar R (KK) (Microsoft), Pengfei Ni (Microsoft)
Introduction With Kubernetes v1.12, Azure virtual machine scale sets (VMSS) and cluster-autoscaler have reached their General Availability (GA) and User Assigned Identity is available as a preview feature.
Azure VMSS allow you to create and manage identical, load balanced VMs that automatically increase or decrease based on demand or a set schedule. This enables you to easily manage and scale multiple VMs to provide high availability and application resiliency, ideal for large-scale applications like container workloads [1].</td>
</tr>
</table>

Azure virtual machine scale sets (VMSS) と cluster-autoscalerがGAになったので、紹介する。
加えて Azureでのuser assigned identity features についても紹介している。

(Azureに馴染みがないのでいまいちイメージがつかなかった

## Introducing Volume Snapshot Alpha for Kubernetes
<table>
<tr>
  <td colspan="2"><a href="https://kubernetes.io/blog/2018/10/09/introducing-volume-snapshot-alpha-for-kubernetes/">Introducing Volume Snapshot Alpha for Kubernetes</a></td>
</tr>
<tr>
  <td><img src="https://kubernetes.io//images/blog/2018-10-09-volume-snapshot-alpha/snapshot.png"></td>
  <td>Author: Jing Xu (Google) Xing Yang (Huawei), Saad Ali (Google)
Kubernetes v1.12 introduces alpha support for volume snapshotting. This feature allows creating/deleting volume snapshots, and the ability to create new volumes from a snapshot natively using the Kubernetes API.
What is a Snapshot? Many storage systems (like Google Cloud Persistent Disks, Amazon Elastic Block Storage, and many on-premise storage systems) provide the ability to create a “snapshot” of a persistent volume.</td>
</tr>
</table>

1.12でalphaサポートされるようになった、VolumaSnapshotの紹介。
使い方と、それを実現するsnapshotterの動作について説明している。

## Kubernetes | Deploying Prometheus Operator
<table>
<tr>
  <td colspan="2"><a href="https://www.youtube.com/watch?v=xcgrKNUBPvo">Kubernetes | Deploying Prometheus Operator</a></td>
</tr>
<tr>
  <td><img src="https://i.ytimg.com/vi/xcgrKNUBPvo/hqdefault.jpg"></td>
  <td>In this long episode I give a high level overview about Prometheus Operator. I talk through a getting started concept along with how to configure it for your...</td>
</tr>
</table>

YouTube動画。
(みていない)

## How to generate certificates for Kubeadm with Vault - My personal blog - Björn Wenzel
<table>
<tr>
  <td colspan="2"><a href="None">How to generate certificates for Kubeadm with Vault - My personal blog - Björn Wenzel</a></td>
</tr>
<tr>
  <td><img src="https://koudingspawn-blog.firebaseapp.com//assets/img/bjoern-foto.jpg"></td>
  <td>Tutorial on how to use Hashicorp Vault to generate certificates to access Kube-API</td>
</tr>
</table>

HashicorpのVaultを使ってKubernetsの利用者向けの証明書を発行する。kubeadmでクラスタを作ると、証明書は1つで1年の有効期限になるが、この方法を使うとユーザごとに違う証明書を発行でき、期限も任意に設定できる。

## Kubernetes Resource Statistics – ITNEXT
<table>
<tr>
  <td colspan="2"><a href="https://itnext.io/kubernetes-resource-statistics-e8247f92b45c">Kubernetes Resource Statistics – ITNEXT</a></td>
</tr>
<tr>
  <td><img src="https://cdn-images-1.medium.com/max/1200/1*MFNN4s6pld0Svsyz2UWCew.png"></td>
  <td>Gathering resource statistics (e.g., how many pods are running in a certain namespace) can be a useful to sometime necessary activity…</td>
</tr>
</table>


Kubernetes上のリソースの数を数えるだけの簡単なプログラムを作った話。
[GitHub - mhausenblas/krs: A command line tool for capturing and serializing Kubernetes resource statistics in OpenMetrics format](https://github.com/mhausenblas/krs)
内部的にはkubectl getを実行して、Open Metricsの形式で出力しているだけらしい。


大掛かりなものとしては、[GitHub - kubernetes/kube-state-metrics: Add-on agent to generate and expose cluster-level metrics.](https://github.com/kubernetes/kube-state-metrics) や[GitHub - kubernetes-incubator/spartakus: Anonymous Usage Collector](https://github.com/kubernetes-incubator/spartakus) を紹介している。

## Autoscaling Applications on Kubernetes - A Primer
<table>
<tr>
  <td colspan="2"><a href="https://blog.tomkerkhove.be/2018/10/08/autoscaling-applications-on-kubernetes-a-primer/">Autoscaling Applications on Kubernetes - A Primer</a></td>
</tr>
<tr>
  <td><img src="https://blog.tomkerkhove.be/content/images/2018/08/axel-ahoi-50659-unsplash-1.jpg"></td>
  <td>Kubernetes provides different capabilities in terms of scalability. This primer is the first part of a series that introduces you to concepts and how to scale your cluster & applications.</td>
</tr>
</table>


Kubernetesでのスケーリングについて。この記事はシリーズ物でそのうちClusterAutoscalerやHorizontalPodAutoscalerの話などをする予定らしい。
この記事では単にマニュアルでのClusterのスケールと、Podのスケールを紹介している。

## Deploy machine learning models with GKE and Dataiku
<table>
<tr>
  <td colspan="2"><a href="https://longhowlam.wordpress.com/2018/10/08/deploy-machine-learning-models-with-gke-and-dataiku/">Deploy machine learning models with GKE and Dataiku</a></td>
</tr>
<tr>
  <td><img src="https://longhowlam.files.wordpress.com/2018/10/dataikukubernetes03.png"></td>
  <td>Introduction In a previous post I described how easy it is to create and deploy machine learning models (exposing them as REST APIs) with Dataiku. In particular, it was an XGboost model predicting …</td>
</tr>
</table>


Dataikuという機械学習のソフトウェアからDockerImageを作ってKubernetesにデプロイする方法。
単にDataikuからDockerImageをpushしているだけのように見える。

## Manipulating Istio and other Custom Kubernetes Resources in Golang
<table>
<tr>
  <td colspan="2"><a href="http://dwmkerr.com/manipulating-istio-and-other-custom-kubernetes-resources-in-golang/">Manipulating Istio and other Custom Kubernetes Resources in Golang</a></td>
</tr>
<tr>
  <td><img src="http://dwmkerr.com/content/images/2018/10/code-1.jpg"></td>
  <td>In this article I'll demonstrate how to use Golang to manipulate Kubernetes Custom Resources, with Istio as an example. No knowledge of Istio is needed, I'll just use it to demonstrate the concepts! Istio is a highly popular Service Mesh platform which allows engineers to quickly add telemetry, advanced traffic</td>
</tr>
</table>
golangを使ってCRDを変更するチュートリアル。DynamicClientを使うことで簡単にCRDを扱えることがわかる。

## Tooling Spotlight
新コーナーのようです。
### opencredo/kubefuse
<table>
<tr>
  <td colspan="2"><a href="https://github.com/opencredo/kubefuse">opencredo/kubefuse</a></td>
</tr>
<tr>
  <td><img src="https://avatars0.githubusercontent.com/u/104106?s=400&v=4"></td>
  <td>Kubernetes as a FUSE Filesystem. Contribute to opencredo/kubefuse development by creating an account on GitHub.</td>
</tr>
</table>
- KubernetesのマニフェストをLinuxのファイルシステムに見せる。ファイルを変更するとKubernets上のリソースも変更される。2年前から進展がない

### GoogleContainerTools/kubehost
<table>
<tr>
  <td colspan="2"><a href="https://github.com/GoogleContainerTools/kubehost">GoogleContainerTools/kubehost</a></td>
</tr>
<tr>
  <td><img src="https://avatars0.githubusercontent.com/u/38444003?s=400&v=4"></td>
  <td>Expose web services directly on GKE nodes during development. - GoogleContainerTools/kubehost</td>
</tr>
</table>
  - GCPにて、ServiceオブジェクトをhostポートでListenすることができるツール。GCPのLoadBalancerより手軽にサービスを晒すことができる。開発用。

### zegl/kube-score
<table>
<tr>
  <td colspan="2"><a href="https://github.com/zegl/kube-score">zegl/kube-score</a></td>
</tr>
<tr>
  <td><img src="https://avatars1.githubusercontent.com/u/47952?s=400&v=4"></td>
  <td>Kubernetes object static code analysis. Contribute to zegl/kube-score development by creating an account on GitHub.</td>
</tr>
</table>
- Kubernetesのリソースが決められた条件を満たしているかチェックするツール。チェック項目はハードコーディングされているようです。

### mhausenblas/krs
<table>
<tr>
  <td colspan="2"><a href="https://github.com/mhausenblas/krs">mhausenblas/krs</a></td>
</tr>
<tr>
  <td><img src="https://avatars1.githubusercontent.com/u/52594?s=400&v=4"></td>
  <td>A command line tool for capturing and serializing Kubernetes resource statistics in OpenMetrics format - mhausenblas/krs</td>
</tr>
</table>
- 今回の記事で説明されていた、kubernetes常にデプロイされているリソースの数を数え、Metricsとして公開するツール

# The Editorial

## Kubernetes v1.12: Introducing RuntimeClass
<table>
<tr>
  <td colspan="2"><a href="https://kubernetes.io/blog/2018/10/10/kubernetes-v1.12-introducing-runtimeclass/">Kubernetes v1.12: Introducing RuntimeClass</a></td>
</tr>
<tr>
  
  <td>Author: Tim Allclair (Google)
Kubernetes originally launched with support for Docker containers running native applications on a Linux host. Starting with rkt in Kubernetes 1.3 more runtimes were coming, which lead to the development of the Container Runtime Interface (CRI). Since then, the set of alternative runtimes has only expanded: projects like Kata Containers and gVisor were announced for stronger workload isolation, and Kubernetes’ Windows support has been steadily progressing.</td>
</tr>
</table>
1.12でalphaとして実装されたRuntimClassの紹介。
複数のコンテナランタイムが利用できる状況で、どのランタイムを使うかをPodのSpecで設定できるような機能のようです。

## Kubernetes Is a Prime Catalyst in AI and Big Data’s Evolution
<table>
<tr>
  <td colspan="2"><a href="https://www.datanami.com/2018/10/10/kubernetes-is-a-prime-catalyst-in-ai-and-big-datas-evolution/">Kubernetes Is a Prime Catalyst in AI and Big Data’s Evolution</a></td>
</tr>
<tr>
  <td><img src="https://2s7gjr373w3x22jf92z99mgm5w-wpengine.netdna-ssl.com/wp-content/uploads/2018/10/tech_abstract_shutterstock_orange_Olga-Salt.jpg"></td>
  <td>Kubernetes is becoming synonymous with cloud-native computing. As an open-source platform, it enables development, deployment, orchestration and</td>
</tr>
</table>
KubernetesはAIやBigData基盤として使えるよという話。

## Cloud Foundry expands its support for Kubernetes
<table>
<tr>
  <td colspan="2"><a href="http://social.techcrunch.com/2018/10/10/cloud-foundry-expands-its-support-for-kubernetes/">Cloud Foundry expands its support for Kubernetes</a></td>
</tr>
<tr>
  <td><img src="https://techcrunch.com/wp-content/uploads/2018/02/gettyimages-914121086.jpg?w=600"></td>
  <td>Not too long ago, the Cloud Foundry Foundation was all about Cloud Foundry, the open source platform as a service (PaaS) project that’s now in use by most of the Fortune 500 enterprises. This project is the Cloud Foundry Application Runtime. A year ago, the Foundation also announced the Cloud…</td>
</tr>
</table>

CloudFoundlyがKubernetesのサポートを進めている話。

- [Project Eirini | Cloud Foundry](https://www.cloudfoundry.org/project-eirini/)
  - CloudFoundlyとKubernetesをうまいこと使い分けてスケジューリングするツール（少し自信がない・・）
- [CF Containerization | Cloud Foundry](https://www.cloudfoundry.org/cf-containerization/)
  - CloudFoundlyのランタイムをVM上ではなくコンテナとして実行できるようにするプロジェクト

## Kubernetes Podcast from Google
<table>
<tr>
  <td colspan="2"><a href="None">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 Pod Castの紹介
（まだ聞いていない）

## Making the Bet on Open Source - DZone Open Source
<table>
<tr>
  <td colspan="2"><a href="https://dzone.com/articles/making-the-bet-on-open-source">Making the Bet on Open Source - DZone Open Source</a></td>
</tr>
<tr>
  <td><img src="https://dz2cdn2.dzone.com/storage/article-thumb/10383533-thumb.jpg"></td>
  <td>A developer on the Talend team discusses the company's choice to use Docker and Kubernetes before they were enterprise-ready and how to engage untested tools.</td>
</tr>
</table>


OpenSourceと企業の関わり方について。DockerやKubernetesを採用しながら成功してきた経験を語る記事。

## Kubernetes 1.12 Brings Volume Snapshots, TLS Improvements, and More 
<table>
<tr>
  <td colspan="2"><a href="None">Kubernetes 1.12 Brings Volume Snapshots, TLS Improvements, and More </a></td>
</tr>
<tr>
  <td><img src="https://cdn.infoq.com/statics_s2_20181002-0355/styles/i/logo-big.jpg"></td>
  <td>The Cloud Native Community Foundation has announced Kubernetes 1.12. This version brings Snapshot and restore volumes, improvements on TLS, Horizontal Pod Autoscaler (HPA), topology-aware dynamic provisioning, Advanced Auditing, topology support for Container Storage Interface (CSI) plugin, and more.</td>
</tr>
</table>

Kubernetes v1.12の新機能の紹介。

## Imperative vs Declarative – Dominik Tornow – Medium
<table>
<tr>
  <td colspan="2"><a href="https://medium.com/@dominik.tornow/imperative-vs-declarative-8abc7dcae82e">Imperative vs Declarative – Dominik Tornow – Medium</a></td>
</tr>
<tr>
  <td><img src="https://cdn-images-1.medium.com/max/1200/1*fHXSwrmd50BUgxa31tqSRQ.png"></td>
  <td>By Andrew Chen and Dominik Tornow</td>
</tr>
</table>


命令的、宣言的 についての解説。

## Container security starts with Kubernetes - JAXenter
<table>
<tr>
  <td colspan="2"><a href="https://jaxenter.com/container-security-kubernetes-150356.html">Container security starts with Kubernetes - JAXenter</a></td>
</tr>
<tr>
  <td><img src="https://jaxenter.com/wp-content/uploads/2018/10/shutterstock_1033304452.jpg"></td>
  <td>Todd Moreau explains several essential Kubernetes security considerations for any develop looking to adopt this useful technology.</td>
</tr>
</table>


Kubernetesのセキュリティの特徴。どういうことが起こりうるのかなど解説。

## Docker And Kubernetes: Furthering The Goals Of DevOps Automation
<table>
<tr>
  <td colspan="2"><a href="https://www.forbes.com/sites/forbestechcouncil/2018/10/10/docker-and-kubernetes-furthering-the-goals-of-devops-automation/">Docker And Kubernetes: Furthering The Goals Of DevOps Automation</a></td>
</tr>
<tr>
  <td><img src="https://thumbor.forbes.com/thumbor/600x315/https%3A%2F%2Fblogs-images.forbes.com%2Fforbestechcouncil%2Ffiles%2F2018%2F10%2Fcanva-photo-editor-2-2-500x500.png"></td>
  <td>As the buzz around Docker and Kubernetes continues to grow, large enterprises are starting to build container strategies for both development and operations.</td>
</tr>
</table>

DevOpsの文脈でDockerとKubernetesの有用性について説明している。


# バックナンバー

- KubeWeekly #151 https://qiita.com/inajob/items/5b3bb83dcb68818020c0
- KubeWeekly #150 https://qiita.com/inajob/items/bebd4fcca440ec695d34
- KubeWeekly #149 https://qiita.com/inajob/items/d007ba0114dfb5eb77e2
- KubeWeekly #148 https://qiita.com/inajob/items/4f153cb214fd622bdb89
- KubeWeekly #147 https://qiita.com/inajob/items/8148914d7e6b8afc186c
- KubeWeekly #143 https://qiita.com/inajob/items/b93257781552c61da173
- KubeWeekly #142 https://qiita.com/inajob/items/6eac1a856e95f18cd2ca
- KubeWeekly #141 https://qiita.com/inajob/items/7771e5a5a4409f433042