Skip to content

doublemarket/kuar-examples-1-9

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
This branch is 8 commits ahead, 13 commits behind kubernetes-up-and-running:master.

「入門Kubernetes」サンプルファイル Kubernetes 1.9対応版

  • 正誤表
  • 書籍の補完資料
    • 読みながらこの資料の図を見ると分かりやすいように作りました。

このリポジトリは、オライリー・ジャパン「入門Kubernetes」の原著である「Kubernetes: Up and Running」で提供されているサンプルファイルを、Kubernetes 1.9に対応させて独自に公開しているものです。

元になったリポジトリに置かれているファイルの間違いを修正したり、原著の執筆当時から古くなってしまっている情報を2018年2月時点の情報に更新してあります。

ファイル名の命名規則は原則的に「リスト番号-ファイル名」になっていますが、本文ではリスト番号部分が省かれて書いてあります。ファイル同士が参照する場合もリスト番号なしのファイル名を使用しているので、実際に動かしてみる時はリスト番号を削除してください。

# 例
mv 5-1-kuard-pod.yaml kuard-pod.yaml

第5章

5-1-kuard-pod.yaml

  • インデントの間違いを修正しています。
  • ファイル内に記載されているmy.nfs.server.localというホスト名で名前解決できるNFSサーバを別途用意する必要があります。

第8章

8-1-kuard-rs.yaml

  • APIバージョンの変更(extensions/v1beta1からapps/v1)と、それに伴うspec.selectorを追加しています。

第9章

9-1-fluentd.yaml

  • APIバージョンの変更(extensions/v1beta1からapps/v1)と、それに伴うspec.selectorを追加しています。

9-2-nginx-fast-storage.yaml

  • APIバージョンの変更(extensions/v1beta1からapps/v1)と、それに伴うspec.selectorを追加しています。

第10章

10-4-rs-queue.yaml

  • APIバージョンの変更(extensions/v1beta1からapps/v1)と、それに伴うspec.selectorを追加しています。

10-6-load-queue.sh

  • コメントを日本語化しています。

第11章

11-1-simple-config.txt

  • コメントを日本語化しています。

11-4-kuard-secret-ips.yaml

  • インデントの間違いを修正しています。

第13章

13-1-dns-service.yaml

  • ダブルクォーテーション(")の閉じ忘れを修正しています。

13-2-external-ip-service.yaml

  • spec.portsが必須なため追加しています。

13-4-nfs-volume.yaml

  • ファイル内に記載されている192.168.0.1のNFSサーバを別途用意する必要があります。
  • spec.accessModesが必須なため追加しています。

13-5-nfs-volume-claim.yaml

  • spec.accessModesが必須なため追加しています。

13-6-mysql-replicaset.yaml

  • APIバージョンを変更(extensions/v1beta1からapps/v1)しています。
  • コメントを日本語化しています。

13-8-storageclass.yaml

  • APIバージョンを変更(storage.k8s.io/v1beta1からstorage.k8s.io/v1)しています。

13-10-mongo-simple.yaml

  • APIバージョンの変更(extensions/v1beta1からapps/v1)と、それに伴うspec.selectorを追加しています。

13-12-mongo-configmap.yaml

  • コメントを日本語化しています。

13-13-mongo.yaml

  • APIバージョンの変更(apps/v1beta1からapps/v1)と、それに伴うspec.selectorを追加しています。
  • コメントを日本語化しています。

第14章

14-1-parse.yaml

  • APIバージョンの変更(extensions/v1beta1からapps/v1)と、それに伴うspec.selectorを追加しています。
  • 環境変数名がAPP_IDとなっていたのを、APPLICATION_IDに修正しています。

14-2-parse-service.yaml

  • ファイル名のドット(.)がカンマ(,)になっていたのを修正しています。

14-4-ghost.yaml

  • APIバージョンの変更(extensions/v1beta1からapps/v1)と、それに伴うspec.selectorを追加しています。
  • Ghostのバージョンが変わったこと(0.11.xから1.21.x)に追随するよう変更を加えました。
    • イメージのバージョンを明示的に指定しました。
    • 起動スクリプトのファイル名を変更しました。

なお、本文中では暗黙的にGhost 0.11.xを使用する前提になっていますが、以下のように変更することでGhost 1.21.xを使用できます。

  • 変更前(0.11.x)

    spec:
      containers:
      - image: ghost:0
        name: ghost
        command:
        - sh
        - -c
        - cp /ghost-config/ghost-config.js /var/lib/ghost/config.js
          && docker-entrypoint.sh npm start
    
  • 変更後(1.21.x)

    spec:
      containers:
      - image: ghost
        name: ghost
        command:
        - sh
        - -c
        - cp /ghost-config/ghost-config.js /var/lib/ghost/config.js
          && docker-entrypoint.sh node current/index.js
    

14-5-master.conf

14-6-slave.conf

14-7-sentinel.conf

14-8-init.sh

14-9-sentinel.sh

14-10-redis-service.yaml

  • 元になったリポジトリでファイル名のリスト番号部分が間違っているのを修正しています。
  • APIバージョンの変更(apps/v1beta1からapps/v1)と、それに伴うspec.selectorを追加しています。

14-11-redis.yaml

About

Example code and files from "Kubernetes: Up and Running"

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 50.5%
  • Shell 49.5%