0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Kubernetesの用語あれこれ

Last updated at Posted at 2018-09-18

前の記事((僕にとって)はじめてのKubernetes)で雑な紹介しかしてなかったので少しだけ詳しく書く(足りてるとは思ってない)。

Kubernetes

  • コンテナ管理ツール(オーケストレーションツール)
  • Kubernetesはmasterサーバとnodeサーバ(n台)のクラスタで構成されている

Container

  • コンテナ。Dockerコンテナと同じ(と考えて支障ないよね?)
  • アプリケーションはコンテナにデプロイする

Pod

  • 1つ以上のコンテナを含む入れ物
  • Pod単位でデプロイ、起動、停止、削除をする
  • PodにはIPアドレスが振られていて、Pod同士はKubernetes上の仮想NWでつながっている

Service

  • 複数Podを束ねたもの。サービスディスカバリやロードバランシングを提供する
  • MSA文脈におけるマイクロサービスがこれ
    • ちょっと良く分かってない:DBは別Servceにする?
      • Persistent Volumeで永続化?
  • Pod群の論理的な管理単位であり、Serviceというものがどこかで動いているわけではない
  • Service呼び出し側からみれば、Servce内のPodが物理的にどこにあるかとか知らなくて良い
  • Service作成時に「Cluster IP」と呼ばれる仮想IPが割り振られ、サービス間通信ではこのIPでアクセスする
  • ServiceとPodの紐付けは、Podについているラベルを指定する

apiserver

  • Kubernetesのリソースを管理し、もろもろの操作をする

kubelet

  • 各nodeサーバで動作し、Podの操作(作成・削除など)を行う

kube-proxy

  • 各nodeサーバで動作し、ロードバランシング時の各Podへの転送処理を担う

ネットワーク

  • (もやもや)Kubernetesクラスタ内部の仮想NWには二種類ある?
    • サービス間通信用のネットワーク
      • Cluster IPの振られたServiceが属するNW
      • Service間通信はこっちを使う?
    • コンテナ間通信用のネットワーク
      • flannnel

Podの作成

  • 設定ファイルを書く(yaml)
  • kubectl createコマンドでapiserverに登録する

Serviceの作成

  • Podは作成済
  • 設定ファイルを書く(yaml)
  • kubectl createコマンドでapiserverに登録する
    • kube-dnsにService名が登録される
      • kube-dnsはmasterサーバで稼動するPod
      • Service名で名前解決すると簡単なサービスディスカバリを実現できるらしい

参考URL

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?