edb233cac2
* [ja] add basic files for 1.13 (#11571) * [ja] add basic files for 1.13 * [ja] add some base files * Translate setup/independent/_index.md (#11573) * Translate content/ja/docs/home/_index.md in Japanese (#11569) * Translate content/ja/docs/setup/custom-cloud/_index.md in Japanese (#11572) * Translate content/en/docs/setup/on-premises-vm/_index.md in Japanese (#11574) * Translate content/ja/docs/setup/release/_index.md in Japanese (#11576) * ja-trans: Translate content/ja/docs/tutorials/kubernetes-basics/explore/_index.md (#11580) * Translate content/ja/docs/setup/turnkey/_index.md (#11582) * Translate content/ja/docs/tutorials/kubernetes-basics/update/_index.m… (#11579) * Translate content/ja/docs/tutorials/kubernetes-basics/update/_index.md in Japanese * Fix title * Translated Tutorials/Learn Kubenetes Basics/Deploy an App in Japanese. (#11583) * translate tutorials/kubernetes-basics/expose/_index.md (#11584) * Dev 1.13 ja.1 tutorials kubernetes basics scale (#11577) * Translate content/ja/docs/tutorials/kubernetes-basics/scale/_index.md in Japanese * Fix title * translate deprecated state description (#11578) * Fix the build doesn't pass at dev-1.13-ja.1 (#11609) * delete files not at minimum requirements to pass the build. * copy necessary file for pass build from content/en * translate content/ja/_index.html (#11585) * ja-trans: add docs/_index.md (#11721) * Remove copied docs/index.md by mistake. (#11735) * Translate stable state description (#11642) * translate stable state description * Update content/ja/docs/templates/feature-state-stable.txt Co-Authored-By: auifzysr <38824461+auifzysr@users.noreply.github.com> * apply the suggestion directly * Translate alpha state description (#11753) * [ja] add ja section (#11581) * [ja] translate case-studies (#12060) * [ja] translate case-studies * remove comment * fix /ja/docs/ content (#12062) * Translate content/ja/docs/tutorials/kubernetes-basics/create-cluster/_index.md in Japanese (#12059) * [ja] translate supported doc versions (#12068) * [ja] add ja.toml (#11595) * Remove reviewers block from front matter. (#12092) * Translate beta state description (#12023) * [ja] translate setup (#12070) * translate setup * add translation * Update _index.md * Update _index.md * 表記ゆれ * 表記ゆれ * [ja] translate what-is-kubernetes (#12065) * translate what-is-kubernetes * add more translation * finish basic translation * Update content/ja/docs/concepts/overview/what-is-kubernetes.md Co-Authored-By: d-kuro <34958495+d-kuro@users.noreply.github.com> * Update what-is-kubernetes.md * Update content/ja/docs/concepts/overview/what-is-kubernetes.md Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/concepts/overview/what-is-kubernetes.md Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/concepts/overview/what-is-kubernetes.md Co-Authored-By: inductor <kohei.ota@zozo.com> * fix new lines * fix review * Update content/ja/docs/concepts/overview/what-is-kubernetes.md Co-Authored-By: inductor <kohei.ota@zozo.com> * Update what-is-kubernetes.md * Update what-is-kubernetes.md * rephrase プラクティス to 知見 * Update content/ja/docs/concepts/overview/what-is-kubernetes.md Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/concepts/overview/what-is-kubernetes.md Co-Authored-By: inductor <kohei.ota@zozo.com> * italic * オーケストレーション * [ja] tutorials/index (#12071) * translate tutorial index * fix page link * add ja to path for kubernetes-basic because it's already in progress of translation * Update _index.md * review * remove typo * Update content/ja/docs/tutorials/_index.md Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/_index.md Co-Authored-By: inductor <kohei.ota@zozo.com> * [ja] translate cri installation (#12095) * [ja] translate cri installation * Update content/ja/docs/setup/cri.md Co-Authored-By: auifzysr <38824461+auifzysr@users.noreply.github.com> * apply comments * apply comments * [ja]translate tutorials/kubernetes-basics (#12074) * start translation * translate index * wording * wording * cluster-interactive * cluster-intro * update interactive * update some data * fix link * deploy-intro * japanize * fix path for public data * wording * start translation of expose * expose intro * けーしょん * scale-intro * update-intro * fix wrong word * fix wording * translate missing string * Update content/ja/docs/tutorials/kubernetes-basics/_index.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/_index.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/scale/scale-intro.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/expose/expose-intro.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/expose/expose-interactive.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/_index.html Co-Authored-By: inductor <kohei.ota@zozo.com> * fix wording * Update content/ja/docs/tutorials/kubernetes-basics/create-cluster/cluster-intro.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/create-cluster/cluster-intro.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/create-cluster/cluster-intro.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/scale/scale-interactive.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/expose/expose-interactive.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/explore/explore-interactive.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/deploy-app/deploy-interactive.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/create-cluster/cluster-interactive.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/explore/explore-intro.html Co-Authored-By: inductor <kohei.ota@zozo.com> * Update content/ja/docs/tutorials/kubernetes-basics/scale/scale-intro.html Co-Authored-By: inductor <kohei.ota@zozo.com> * lowercase for kubectl * ja-trans: tutorials/hello-minikube.md (#11648) * trns-ja: tutorials/hello-minikube.md * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update hello-minikube.md 大変、大変遅くなりました。丁寧に見ていただいて感謝です。いただいたコメントを反映しました。 * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update hello-minikube.md <修正点> ・10行目の「本チュートリアルでは」を削除 ・クラスターをクラスタに統一 * Update hello-minikube.md 10行目の実践を手を動かすに修正 * Update hello-minikube.md 10行目を「手を動かす準備はできていますか?本チュートリアルでは、Node.jsを使った簡単な"Hello World"を実行するKubernetesクラスタをビルドします。」に差し替え。 * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * Update content/ja/docs/tutorials/hello-minikube.md Co-Authored-By: lkougi <45655192+lkougi@users.noreply.github.com> * ja-trans: setup/custom-cloud/coreos/ (#12731) * ja-trans: setup/release/building-from-source/ (#12721) * translate building-from-source * improve translation * ja-trans: translate setup/certificates/ (#12722) * translate certificates.md * change translation about Paths * ja-trans: setup/custom-cloud/kubespray/ (#12733) * ja-trans: setup/node-conformance/ (#12728) * ja-trans: setup/node-conformance/ * Update content/ja/docs/setup/node-conformance.md LGTM Co-Authored-By: makocchi-git <makocchi@gmail.com> * Update content/ja/docs/setup/node-conformance.md LGTM Co-Authored-By: makocchi-git <makocchi@gmail.com> * Update content/ja/docs/setup/node-conformance.md LGTM Co-Authored-By: makocchi-git <makocchi@gmail.com> * ja-trans: setup/cluster-large/ (#12723) * ja-trans: setup/cluster-large/ * translate quota and addon * ja-trans: setup/pick-right-solution/ (#12729) * ja-trans: setup/pick-right-solution/ * revise translating solutions * ending with a noun * ja-trans: setup/custom-cloud/kops/ (#12732) * ja-trans: setup/custom-cloud/kops/ * improve translation * translate build * translate explore and add-ons * ja-trans: setup/independent/control-plane-flags/ (#12745) * ja-trans: setup/minikube/ (#12724) * ja-trans: setup/minikube/ * Update content/ja/docs/setup/minikube.md LGTM Co-Authored-By: makocchi-git <makocchi@gmail.com> * translate features and add-ons * improve translation * improve translation * fix translation style * ja-trans: setup/multiple-zones/ (#12725) * ja-trans: setup/multiple-zones/ * ja-trans: setup/multiple-zones/ (2) * ending with a noun * fix translation style * ja-trans: setup/scratch/ (#12730) * ja-trans: setup/scratch/ * revise translating connectivity * improve translation * Update content/ja/docs/setup/scratch.md LGTM Co-Authored-By: makocchi-git <makocchi@gmail.com> * Update content/ja/docs/setup/scratch.md LGTM Co-Authored-By: makocchi-git <makocchi@gmail.com> * Update content/ja/docs/setup/scratch.md LGTM Co-Authored-By: makocchi-git <makocchi@gmail.com> * Update content/ja/docs/setup/scratch.md LGTM Co-Authored-By: makocchi-git <makocchi@gmail.com> * revise translation * revert some words to English * fix translation style * fix title * ja-trans: setup/independent/create-cluster-kubeadm/ (#12750) * ja-trans: setup/independent/create-cluster-kubeadm/ * translate Instructions * fix translation style * ja-trans: setup/independent/kubelet-integration/ (#12754) * ja-trans: setup/independent/kubelet-integration/ * fix translation style * ja-trans: setup/independent/setup-ha-etcd-with-kubeadm/ (#12755) * ja-trans: setup/independent/setup-ha-etcd-with-kubeadm/ * fix translation style * ja-trans: setup/independent/troubleshooting-kubeadm/ (#12757) * ja-trans: setup/independent/troubleshooting-kubeadm/ * pod -> Pod * ja-trans: setup/on-premises-vm/cloudstack/ (#12772) * ja-trans: setup/independent/high-availability/ (#12753) * ja-trans: setup/independent/high-availability/ * fix translation style * translate Stacked and worker node * ja-trans: setup/on-premises-metal/krib/ (#12770) * ja-trans: setup/on-premises-metal/krib/ * Update content/ja/docs/setup/on-premises-metal/krib.md Co-Authored-By: makocchi-git <makocchi@gmail.com> * ja-trans: setup/on-premises-vm/ovirt/ (#12781) * ja-trans: setup/on-premises-vm/dcos/ (#12780) * ja-trans: setup/on-premises-vm/dcos/ * fix translation * Update content/ja/docs/setup/on-premises-vm/dcos.md Co-Authored-By: makocchi-git <makocchi@gmail.com> * ja-trans: setup/turnkey/alibaba-cloud/ (#12786) * ja-trans: setup/turnkey/alibaba-cloud/ * tiny fix * Update content/ja/docs/setup/turnkey/alibaba-cloud.md Co-Authored-By: makocchi-git <makocchi@gmail.com> * fix translation * ja-trans: setup/turnkey/aws/ (#12788) * ja-trans: setup/turnkey/aws/ * translate production grade * fix translation * ja-trans: setup/release/notes/ (#12791) * ja-trans: setup/independent/install-kubeadm.md (#12812) * ja-trans: setup/independent/install-kubeadm.md * ja-trans: fix internal links in setup/independent/install-kubeadm.md * ja-trans: setup/turnkey/clc/ (#12824) * ja-trans: setup/turnkey/clc/ * Update content/ja/docs/setup/turnkey/clc.md Co-Authored-By: makocchi-git <makocchi@gmail.com> * Update content/ja/docs/setup/turnkey/clc.md Co-Authored-By: makocchi-git <makocchi@gmail.com> * ja-trans: setup/turnkey/stackpoint/ (#12853) * ja-trans: concepts/ (#12820) * ja-trans: concepts/ * fix translation * ja: fix formatting in what is kubernetes (#12694) * fix formatting in what is kubernetes * Update content/ja/docs/concepts/overview/what-is-kubernetes.md Co-Authored-By: inductor <kohei.ota@zozo.com> * ? * format (#12866) * ja-trans: setup/turnkey/gce.md (#12813) * ja-trans: setup/turnkey/gce.md * Update content/ja/docs/setup/turnkey/gce.md Co-Authored-By: auifzysr <38824461+auifzysr@users.noreply.github.com> * Update content/ja/docs/setup/turnkey/gce.md Co-Authored-By: auifzysr <38824461+auifzysr@users.noreply.github.com> * ja-trans: modify a word in setup/turnkey/gce.md * Translated docs/setup/turnkey/azure.md. (#12951) * Translated docs/setup/turnkey/azure.md. * Update content/ja/docs/setup/turnkey/azure.md Applied a suggestion. Co-Authored-By: dzeyelid <dzeyelid@gmail.com> * Update content/ja/docs/setup/turnkey/azure.md Applied a suggestion. Co-Authored-By: dzeyelid <dzeyelid@gmail.com> * Update content/ja/docs/setup/turnkey/azure.md Applied suggestion. Co-Authored-By: dzeyelid <dzeyelid@gmail.com> * Applied review suggestions. * Applied review suggestions. * fix language setting order.
343 lines
13 KiB
Markdown
343 lines
13 KiB
Markdown
---
|
|
title: CenturyLink Cloud上でKubernetesを動かす
|
|
---
|
|
|
|
{: toc}
|
|
|
|
These scripts handle the creation, deletion and expansion of Kubernetes clusters on CenturyLink Cloud.
|
|
|
|
You can accomplish all these tasks with a single command. We have made the Ansible playbooks used to perform these tasks available [here](https://github.com/CenturyLinkCloud/adm-kubernetes-on-clc/blob/master/ansible/README.md).
|
|
|
|
## ヘルプの検索
|
|
|
|
If you run into any problems or want help with anything, we are here to help. Reach out to use via any of the following ways:
|
|
|
|
- Submit a github issue
|
|
- Send an email to Kubernetes AT ctl DOT io
|
|
- Visit [http://info.ctl.io/kubernetes](http://info.ctl.io/kubernetes)
|
|
|
|
## 仮想マシンもしくは物理サーバーのクラスター、その選択
|
|
|
|
- We support Kubernetes clusters on both Virtual Machines or Physical Servers. If you want to use physical servers for the worker nodes (minions), simple use the --minion_type=bareMetal flag.
|
|
- For more information on physical servers, visit: [https://www.ctl.io/bare-metal/](https://www.ctl.io/bare-metal/)
|
|
- Physical serves are only available in the VA1 and GB3 data centers.
|
|
- VMs are available in all 13 of our public cloud locations
|
|
|
|
## 必要条件
|
|
|
|
The requirements to run this script are:
|
|
|
|
- A linux administrative host (tested on ubuntu and macOS)
|
|
- python 2 (tested on 2.7.11)
|
|
- pip (installed with python as of 2.7.9)
|
|
- git
|
|
- A CenturyLink Cloud account with rights to create new hosts
|
|
- An active VPN connection to the CenturyLink Cloud from your linux host
|
|
|
|
## スクリプトのインストール
|
|
|
|
After you have all the requirements met, please follow these instructions to install this script.
|
|
|
|
1) Clone this repository and cd into it.
|
|
|
|
```shell
|
|
git clone https://github.com/CenturyLinkCloud/adm-kubernetes-on-clc
|
|
```
|
|
|
|
2) Install all requirements, including
|
|
|
|
* Ansible
|
|
* CenturyLink Cloud SDK
|
|
* Ansible Modules
|
|
|
|
```shell
|
|
sudo pip install -r ansible/requirements.txt
|
|
```
|
|
|
|
3) Create the credentials file from the template and use it to set your ENV variables
|
|
|
|
```shell
|
|
cp ansible/credentials.sh.template ansible/credentials.sh
|
|
vi ansible/credentials.sh
|
|
source ansible/credentials.sh
|
|
|
|
```
|
|
|
|
4) Grant your machine access to the CenturyLink Cloud network by using a VM inside the network or [ configuring a VPN connection to the CenturyLink Cloud network.](https://www.ctl.io/knowledge-base/network/how-to-configure-client-vpn/)
|
|
|
|
|
|
#### スクリプトのインストールの例: Ububtu 14の手順
|
|
|
|
If you use an ubuntu 14, for your convenience we have provided a step by step
|
|
guide to install the requirements and install the script.
|
|
|
|
```shell
|
|
# system
|
|
apt-get update
|
|
apt-get install -y git python python-crypto
|
|
curl -O https://bootstrap.pypa.io/get-pip.py
|
|
python get-pip.py
|
|
|
|
# installing this repository
|
|
mkdir -p ~home/k8s-on-clc
|
|
cd ~home/k8s-on-clc
|
|
git clone https://github.com/CenturyLinkCloud/adm-kubernetes-on-clc.git
|
|
cd adm-kubernetes-on-clc/
|
|
pip install -r requirements.txt
|
|
|
|
# getting started
|
|
cd ansible
|
|
cp credentials.sh.template credentials.sh; vi credentials.sh
|
|
source credentials.sh
|
|
```
|
|
|
|
|
|
|
|
## クラスターの作成
|
|
|
|
To create a new Kubernetes cluster, simply run the ```kube-up.sh``` script. A complete
|
|
list of script options and some examples are listed below.
|
|
|
|
```shell
|
|
CLC_CLUSTER_NAME=[name of kubernetes cluster]
|
|
cd ./adm-kubernetes-on-clc
|
|
bash kube-up.sh -c="$CLC_CLUSTER_NAME"
|
|
```
|
|
|
|
It takes about 15 minutes to create the cluster. Once the script completes, it
|
|
will output some commands that will help you setup kubectl on your machine to
|
|
point to the new cluster.
|
|
|
|
When the cluster creation is complete, the configuration files for it are stored
|
|
locally on your administrative host, in the following directory
|
|
|
|
```shell
|
|
> CLC_CLUSTER_HOME=$HOME/.clc_kube/$CLC_CLUSTER_NAME/
|
|
```
|
|
|
|
|
|
#### クラスターの作成: スクリプトのオプション
|
|
|
|
```shell
|
|
Usage: kube-up.sh [OPTIONS]
|
|
Create servers in the CenturyLinkCloud environment and initialize a Kubernetes cluster
|
|
Environment variables CLC_V2_API_USERNAME and CLC_V2_API_PASSWD must be set in
|
|
order to access the CenturyLinkCloud API
|
|
|
|
All options (both short and long form) require arguments, and must include "="
|
|
between option name and option value.
|
|
|
|
-h (--help) display this help and exit
|
|
-c= (--clc_cluster_name=) set the name of the cluster, as used in CLC group names
|
|
-t= (--minion_type=) standard -> VM (default), bareMetal -> physical]
|
|
-d= (--datacenter=) VA1 (default)
|
|
-m= (--minion_count=) number of kubernetes minion nodes
|
|
-mem= (--vm_memory=) number of GB ram for each minion
|
|
-cpu= (--vm_cpu=) number of virtual cps for each minion node
|
|
-phyid= (--server_conf_id=) physical server configuration id, one of
|
|
physical_server_20_core_conf_id
|
|
physical_server_12_core_conf_id
|
|
physical_server_4_core_conf_id (default)
|
|
-etcd_separate_cluster=yes create a separate cluster of three etcd nodes,
|
|
otherwise run etcd on the master node
|
|
```
|
|
|
|
## クラスターの拡張
|
|
|
|
To expand an existing Kubernetes cluster, run the ```add-kube-node.sh```
|
|
script. A complete list of script options and some examples are listed [below](#cluster-expansion-script-options).
|
|
This script must be run from the same host that created the cluster (or a host
|
|
that has the cluster artifact files stored in ```~/.clc_kube/$cluster_name```).
|
|
|
|
```shell
|
|
cd ./adm-kubernetes-on-clc
|
|
bash add-kube-node.sh -c="name_of_kubernetes_cluster" -m=2
|
|
```
|
|
|
|
#### クラスターの拡張: スクリプトのオプション
|
|
|
|
```shell
|
|
Usage: add-kube-node.sh [OPTIONS]
|
|
Create servers in the CenturyLinkCloud environment and add to an
|
|
existing CLC kubernetes cluster
|
|
|
|
Environment variables CLC_V2_API_USERNAME and CLC_V2_API_PASSWD must be set in
|
|
order to access the CenturyLinkCloud API
|
|
|
|
-h (--help) display this help and exit
|
|
-c= (--clc_cluster_name=) set the name of the cluster, as used in CLC group names
|
|
-m= (--minion_count=) number of kubernetes minion nodes to add
|
|
```
|
|
|
|
## クラスターの削除
|
|
|
|
There are two ways to delete an existing cluster:
|
|
|
|
1) Use our python script:
|
|
|
|
```shell
|
|
python delete_cluster.py --cluster=clc_cluster_name --datacenter=DC1
|
|
```
|
|
|
|
2) Use the CenturyLink Cloud UI. To delete a cluster, log into the CenturyLink
|
|
Cloud control portal and delete the parent server group that contains the
|
|
Kubernetes Cluster. We hope to add a scripted option to do this soon.
|
|
|
|
## 例
|
|
|
|
Create a cluster with name of k8s_1, 1 master node and 3 worker minions (on physical machines), in VA1
|
|
|
|
```shell
|
|
bash kube-up.sh --clc_cluster_name=k8s_1 --minion_type=bareMetal --minion_count=3 --datacenter=VA1
|
|
```
|
|
|
|
Create a cluster with name of k8s_2, an ha etcd cluster on 3 VMs and 6 worker minions (on VMs), in VA1
|
|
|
|
```shell
|
|
bash kube-up.sh --clc_cluster_name=k8s_2 --minion_type=standard --minion_count=6 --datacenter=VA1 --etcd_separate_cluster=yes
|
|
```
|
|
|
|
Create a cluster with name of k8s_3, 1 master node, and 10 worker minions (on VMs) with higher mem/cpu, in UC1:
|
|
|
|
```shell
|
|
bash kube-up.sh --clc_cluster_name=k8s_3 --minion_type=standard --minion_count=10 --datacenter=VA1 -mem=6 -cpu=4
|
|
```
|
|
|
|
|
|
|
|
## クラスターの機能とアーキテクチャ
|
|
|
|
We configure the Kubernetes cluster with the following features:
|
|
|
|
* KubeDNS: DNS resolution and service discovery
|
|
* Heapster/InfluxDB: For metric collection. Needed for Grafana and auto-scaling.
|
|
* Grafana: Kubernetes/Docker metric dashboard
|
|
* KubeUI: Simple web interface to view Kubernetes state
|
|
* Kube Dashboard: New web interface to interact with your cluster
|
|
|
|
We use the following to create the Kubernetes cluster:
|
|
|
|
* Kubernetes 1.1.7
|
|
* Ubuntu 14.04
|
|
* Flannel 0.5.4
|
|
* Docker 1.9.1-0~trusty
|
|
* Etcd 2.2.2
|
|
|
|
## 任意のアドオン
|
|
|
|
* Logging: We offer an integrated centralized logging ELK platform so that all
|
|
Kubernetes and docker logs get sent to the ELK stack. To install the ELK stack
|
|
and configure Kubernetes to send logs to it, follow [the log
|
|
aggregation documentation](https://github.com/CenturyLinkCloud/adm-kubernetes-on-clc/blob/master/log_aggregration.md). Note: We don't install this by default as
|
|
the footprint isn't trivial.
|
|
|
|
## クラスターの管理
|
|
|
|
The most widely used tool for managing a Kubernetes cluster is the command-line
|
|
utility ```kubectl```. If you do not already have a copy of this binary on your
|
|
administrative machine, you may run the script ```install_kubectl.sh``` which will
|
|
download it and install it in ```/usr/bin/local```.
|
|
|
|
The script requires that the environment variable ```CLC_CLUSTER_NAME``` be defined
|
|
|
|
```install_kubectl.sh``` also writes a configuration file which will embed the necessary
|
|
authentication certificates for the particular cluster. The configuration file is
|
|
written to the ```${CLC_CLUSTER_HOME}/kube``` directory
|
|
|
|
```shell
|
|
export KUBECONFIG=${CLC_CLUSTER_HOME}/kube/config
|
|
kubectl version
|
|
kubectl cluster-info
|
|
```
|
|
|
|
### プログラムでクラスターへアクセス
|
|
|
|
It's possible to use the locally stored client certificates to access the apiserver. For example, you may want to use any of the [Kubernetes API client libraries](/docs/reference/using-api/client-libraries/) to program against your Kubernetes cluster in the programming language of your choice.
|
|
|
|
To demonstrate how to use these locally stored certificates, we provide the following example of using ```curl``` to communicate to the master apiserver via https:
|
|
|
|
```shell
|
|
curl \
|
|
--cacert ${CLC_CLUSTER_HOME}/pki/ca.crt \
|
|
--key ${CLC_CLUSTER_HOME}/pki/kubecfg.key \
|
|
--cert ${CLC_CLUSTER_HOME}/pki/kubecfg.crt https://${MASTER_IP}:6443
|
|
```
|
|
|
|
But please note, this *does not* work out of the box with the ```curl``` binary
|
|
distributed with macOS.
|
|
|
|
### ブラウザーを使ったクラスターへのアクセス
|
|
|
|
We install [the kubernetes dashboard](/docs/tasks/web-ui-dashboard/). When you
|
|
create a cluster, the script should output URLs for these interfaces like this:
|
|
|
|
kubernetes-dashboard is running at ```https://${MASTER_IP}:6443/api/v1/namespaces/kube-system/services/kubernetes-dashboard/proxy```.
|
|
|
|
Note on Authentication to the UIs: The cluster is set up to use basic
|
|
authentication for the user _admin_. Hitting the url at
|
|
```https://${MASTER_IP}:6443``` will require accepting the self-signed certificate
|
|
from the apiserver, and then presenting the admin password written to file at:
|
|
|
|
```> _${CLC_CLUSTER_HOME}/kube/admin_password.txt_```
|
|
|
|
|
|
### 設定ファイル
|
|
|
|
Various configuration files are written into the home directory *CLC_CLUSTER_HOME* under
|
|
```.clc_kube/${CLC_CLUSTER_NAME}``` in several subdirectories. You can use these files
|
|
to access the cluster from machines other than where you created the cluster from.
|
|
|
|
* ```config/```: Ansible variable files containing parameters describing the master and minion hosts
|
|
* ```hosts/```: hosts files listing access information for the ansible playbooks
|
|
* ```kube/```: ```kubectl``` configuration files, and the basic-authentication password for admin access to the Kubernetes API
|
|
* ```pki/```: public key infrastructure files enabling TLS communication in the cluster
|
|
* ```ssh/```: SSH keys for root access to the hosts
|
|
|
|
|
|
## ```kubectl``` usage examples
|
|
|
|
There are a great many features of _kubectl_. Here are a few examples
|
|
|
|
List existing nodes, pods, services and more, in all namespaces, or in just one:
|
|
|
|
```shell
|
|
kubectl get nodes
|
|
kubectl get --all-namespaces pods
|
|
kubectl get --all-namespaces services
|
|
kubectl get --namespace=kube-system replicationcontrollers
|
|
```
|
|
|
|
The Kubernetes API server exposes services on web URLs, which are protected by requiring
|
|
client certificates. If you run a kubectl proxy locally, ```kubectl``` will provide
|
|
the necessary certificates and serve locally over http.
|
|
|
|
```shell
|
|
kubectl proxy -p 8001
|
|
```
|
|
|
|
Then, you can access urls like ```http://127.0.0.1:8001/api/v1/namespaces/kube-system/services/kubernetes-dashboard/proxy/``` without the need for client certificates in your browser.
|
|
|
|
|
|
## どのKubernetesの機能がCenturyLink Cloud上で動かないのか
|
|
|
|
These are the known items that don't work on CenturyLink cloud but do work on other cloud providers:
|
|
|
|
- At this time, there is no support services of the type [LoadBalancer](/docs/tasks/access-application-cluster/create-external-load-balancer/). We are actively working on this and hope to publish the changes sometime around April 2016.
|
|
|
|
- At this time, there is no support for persistent storage volumes provided by
|
|
CenturyLink Cloud. However, customers can bring their own persistent storage
|
|
offering. We ourselves use Gluster.
|
|
|
|
|
|
## Ansibleのファイル
|
|
|
|
If you want more information about our Ansible files, please [read this file](https://github.com/CenturyLinkCloud/adm-kubernetes-on-clc/blob/master/ansible/README.md)
|
|
|
|
## 参考文献
|
|
|
|
Please see the [Kubernetes docs](/docs/) for more details on administering
|
|
and using a Kubernetes cluster.
|
|
|
|
|
|
|