gashirar's blog

ウイスキーがすき/美味しいものがすき/k8sがすき

KubeWeekly #218: May 29, 2020

kubeweekly.io

The Headlines

Helm Project Journey Report

CNCF Helm Project Journey - Cloud Native Computing Foundation

2015年10月19日にコミットがされてから今日までのHelmをあらわす様々な数字。

  • 13,874 Contributors
  • 9,454 Code Commits
  • 14.5K Pull Requests
  • 128.7K Contributions
  • 1,694 Cotributing Companies

Last chance to save 30% on Linux Foundation training!

April 2020 Promo - Linux Foundation - Training

セミナーの受講料や資格の受験料が30%オフ(5/31まで)

ICYMI: CNCF Webinars

(リンクだけ貼っておきます。)

CNCF Member Webinar: Zero Trust Services in Kubernetes

CNCF Member Webinar: Zero Trust Services in Kubernetes - Cloud Native Computing Foundation

CNCF Member Webinar: Integrating multi-location ADC with Prometheus+Grafana

CNCF Member Webinar: Integrating multi-location ADC with Prometheus+Grafana - Cloud Native Computing Foundation

CNCF Member Webinar: Resilient and Fast Persistent Container Storage Leveraging Linux’s Storage Functionalities

CNCF Member Webinar: Resilient and Fast Persistent Container Storage Leveraging Linux’s Storage Functionalities - Cloud Native Computing Foundation

CNCF Member Webinar: Discover, Deliver and Secure your APIs Anywhere

CNCF Member Webinar: Discover, Deliver and Secure your APIs Anywhere - Cloud Native Computing Foundation

CNCF Project Webinar: Harbor, the trusted cloud native registry for Kubernetes

CNCF Project Webinar: Harbor, the trusted cloud native registry for Kubernetes - Cloud Native Computing Foundation

CNCF Community Webinar: How to conduct a great livestream – Open Broadcaster Software(OBS) deep dive

CNCF Community Webinar: How to conduct a great livestream - Open Broadcaster Software(OBS) deep dive - Cloud Native Computing Foundation

Tweet

Kubernetes Beginnerが知っておくべき10のデザインパターン

  • Health Probe
  • Predictable Demands
  • Automated Placement
  • Init Container
  • Sidecar
  • Batch Job
  • Stateful Service
  • Service Discovery
  • Controller
  • Operator

Kubernetes PatternsにあるPatternをいくつかピックアップし一枚にまとめたもののようです。
Kubernetes Patterns [Book]

RedHatよりeBookが公開されていますのでどうぞ。 O’Reilly: Kubernetes patterns for designing cloud-native apps

The Technical

Customise your Kind clusters: networking layer

Customise your Kind clusters: networking layer - The Startup - Medium

Kindのネットワーク周りのコンフィグ設定の話。 Kindではデフォルトでkindnetdと呼ばれるオーバーレイネットワークが利用されるが、他を利用することも可能。

kindnetd、初めて知りました。
Minikubeがコマンドライン引数でクラスタの設定を渡すのに対して、Kindは設定ファイルで渡すのが主ですね。このあたりは個人の好みが結構分かれそう。

kindnetd自体の説明については下記がわかりやすかったです。

kindにkindnetdというCNIプラグインが同梱されていた – repl.info

Kubernetes Backup and Restore with Velero

https://akomljen.com/kubernetes-backup-and-restore-with-velero//

Velelo(以前はHeptio Ark)によるKubernetesクラスタとVolumeのAmazoS3へのバックアップとリストア

以前はHeptio ArkだったVeleroですが、今はVMwareの下でOSSとして開発されています。

https://github.com/vmware-tanzu/velero

Statelessなコンテナを実行するためのDeploymentやServiceなどであればYAMLを管理しているリポジトリからの再配布でも復元できそうですが、Volume周りは難しいのではないでしょうか。その辺りもやってくれるのがこの製品のポイントなのかと思います。

Packaging Cloud-native Applications With Gravity

Packaging Cloud-native Applications With Gravity - InfraCloud Technologies

アプリケーションとその依存関係とともにKubernetesクラスタを単一の.tarファイルにパッケージするGravityというソフトウェアの紹介。

クラスタも含めてパッケージ化というのはなかなか思い切ったソフトウェアです。
Gravity Hubというリポジトリもあるので、そこからまるっと環境をとってくることも可能なようです。

Gravity Hub (Enterprise) - Gravitational Gravity

How VOI went DARK

How VOI went DARK - Voi Engineering - Medium

VOI社のGrafana+Kubernetes事例。DARKとは(Dashboards As Resources in Kubernetes)の略。 DashboardをCustom ResourceとしてKubernetesで管理するソフトウェア。

Grafanaを試しに動かしてみたことがあるのですが、マウスクリックで設定したりするのは確かに何度もやるには少し面倒ですね。 そういった部分を宣言的に管理してしまおうという発想ですね。

You need containers to build an image

https://iximiuz.com/en/posts/you-need-containers-to-build-an-image//

コンテナイメージを構築するためにコンテナが必要であり、その逆ではないという事。

ここで言われているコンテナイメージはアーカイブファイルの意味合いで、コンテナはLinux上で分離し制限されたプロセスを指しているように見えます。
記事中にもあるように、コンテナイメージがなくともAlpineなどのrootfsを取得してどこかのディレクトリにはいちすればコンテナとしては動きます。
ただ、コンテナの能力を最大限に引き出すにはイメージ化の機能が必要ですよ。というお話。

Kubetap Documentation

GitHub - soluble-ai/kubetap: Kubectl plugin to interactively proxy Kubernetes Services with ease

ServiceをProxyするKubetapの紹介。

kubectl proxyよりもさらに機能を盛り込んだようなものにみえます。

Kubernetes Apply vs. Replace vs. Patch

Kubernetes Apply vs. Replace vs. Patch

Kubernetesのapplyとreplaceとpatchの挙動の違いについて。

記事では
・ アトミックな更新が必要な場合はkubectl replacePUTreplaceupdate API
・ そうでないならkubectl applyPATCH API
としています。 関連する内容として、Server-side Applyの記事もどうぞ

Kubernetes 1.18 Feature Server-side Apply Beta 2 - Kubernetes

How We Built SELinux Support for Kubernetes in Gravity 7.0

How We Built SELinux Support for Kubernetes in Gravity 7.0

GravityでSELinuxサポートに取り組んだ時の構築方針や躓いたところ、役立つヒントの紹介。

もともとGravityがSELinux対応のホスト上で実行可能な設計にはされていなかったようです。それを可能にするためにSELinuxのポリシーを一から作成していったとのこと。

How to Autoscale Kubernetes Pods with Keda – Testing with k6

How to Autoscale Kubernetes Pods with Keda - Testing with k6 - DEV

Pod Autoscaling FrameworkであるKEDAと負荷テストのk6を組み合わせたテストの紹介。
- KEDAとPrometheusを使用したPod Autoscaling - Grafanaによる可視化と分析 - アプリケーションおよびサービスからメトリクスを抽出する方法

KEDAですが、2020年4月にCNCFのSandboxプロジェクトになりました。
Kubernetes Event-driven Autoscaling (KEDA) joins the CNCF as a sandbox project

2019年1月の記事ですが、オプティムではk6を利用した負荷試験を行っているそうです。

Load Impact/k6 を使用した負荷試験の実施 - OPTiM TECH BLOG

自分は未だにapache benchやJMeterのイメージが強いので他のもちゃんとやりたい。

The Editorial

Cloud Foundry on Kubernetes, with Chip Childers

https://kubernetespodcast.com/episode/105-cloud-foundry//

CloudFoundryの歴史と特徴について。

Ingress and the Service APIs, with Bowei Du

https://kubernetespodcast.com/episode/104-ingress-and-service-apis//

GKEのテクニカルリードであるBowei Du氏によるネットワーク関連の説明。
またIngress GA化への取り組みについて。

  • EndpointSliceが追加されたが、なぜEndpointsを変更しなかったのか

    • そういった変更を行うと、多くのユーザに影響があると考えたため
    • コミュニティ全体がEndpointSliceに移行し、EndpointSliceがスタンダードになるまではEndpointsもEndpointSliceも共存していくと思う
  • IngressTLSのサポートは443のみであるが何故か。

    • 443ポートによるTLSは腫瘍プロバイダでサポートされる一般的な方法であるため
    • Ingressの哲学として、lowest common denominatorでなければいけない(いわゆる最低の基準に合わせるといった意味か。)
  • GatewayClassについては、SIG Storageの担当者とも話し合って検討した。

新しいAPI Conceptsについては下記にまとまっていますのでどうぞ。

API concepts - Kubernetes Service API Evolution

The Wrong Question About Docker and Kubernetes

The Wrong Question About Docker and Kubernetes - DEV

If the technology you want to work with isn’t valuable to the shop you work in, perhaps that’s a signal for you to consider other employment, not a signal for the business to change value streams.

From Containers to Kubernetes with Node.js

From Containers to Kubernetes with Node.js eBook | DigitalOcean

Node.jsとMongoDBwo利用したアプリケーション開発と、その管理方法について。
最初はDockerで構築し、次にDocker Compose、そしてKubernetesを使用しての稼働を行う。

上記ページからeBookがダウンロードできます。
Docker→Docker Compose→Kubernetesと順を追っていくのは良いですね。
Docker ComposeやKubernetesのようなソフトウェアが出てきた背景が少しわかるかも。

LOTE #7: Developer Experience, PaaS, and Testing in Production

https://www.getambassador.io/podcasts/kelsey-hightower-on-developer-experience-paas-and-testing-in-production//

Kelsey Hightower氏が語るCloud Developer Experience、最新のPaaSについて。

Recognizing the needs of the customers (the developers) is key to building an effective platform.

とありますが、技術の導入が目的になってしまう状況はままあるので自分も気をつけたいですね。

GitOps Deployment and Kubernetes

GitOps Deployment and Kubernetes - Riskified Technology - Medium

HelmとArgoCDによるGitOps。

そもそものGitOpsとは?という方には、下記もどうぞ。

Kubernetes で実践するクラウドネイティブ DevOps / Cloud Native DevOps with Kubernetes (DevOps, CloudNative and GitOps) - Speaker Deck

Logging in Kubernetes: EFK vs PLG Stack

Logging in Kubernetes: EFK vs PLG Stack - InfraCloud Technologies

EFK(Elasticsearch/Fluentd/Kibana)とPLG(Promtail/Loki/Grafana)の比較記事

さまざまな目的に利用できるEFKスタックに対して、よりKubernetesに特化したものがPLGスタックといった紹介でした。
PrometheusとPromtailですが、ラベルのつけ方などは同じメカニズムで動作しているため、ユーザがメトリクスとログをいききするのが楽になりそうで良いですね。

NATS, the simple, secure, scalable and open source queue message with Ivan Kozlovic

NATS, le message queue simple, sécurisé, scalable et open source avec Ivan Kozlovic | Electro Monkeys

フランス語のためスキップ。

NATS - Open Source Messaging System | Secure, Native Cloud Application Development

NATSはメッセージングのためのソフトウェアですNeural Autonomic Transport Systemの略だとか。
サイバーエージェントのテストベッドにも含まれていましたね。
Kubernetes-nativeなアーキテクチャ導入の手引き 先進的なクラウド環境を最強テストベッドで体験 - エンジニアHub|若手Webエンジニアのキャリアを考える!