* update reference to 1.17 (#18791) * update endpoint slices to beta (#18794) * update feature gate to 1.17 (#18799) * update feature gate to 1.17 * Update content/ja/docs/reference/command-line-tools-reference/feature-gates.md Co-Authored-By: inductor <kohei.ota@zozo.com> Co-authored-by: inductor <kohei.ota@zozo.com> * Update links to ja docs (home/, tasks/tools/install-kubectl/, concepts/services-networking/service/) (#18930) * update link to /ja/docs/home/ * update link to /ja/docs/tasks/tools/install-kubectl/ * update link to /ja/docs/concepts/services-networking/service/ * Translate tasks/administer-cluster/enabling-endpointslices.md in Japanese (#18140) (#18873) * Translate tasks/administer-cluster/enabling-endpointslices.md in Japanese (#18140) * Update enabling-endpointslices.md * Update content/ja/docs/tasks/administer-cluster/enabling-endpointslices.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/administer-cluster/enabling-endpointslices.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/administer-cluster/enabling-endpointslices.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/administer-cluster/enabling-endpointslices.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update enabling-endpointslices.md * Update enabling-endpointslices.md * Update content/ja/docs/tasks/administer-cluster/enabling-endpointslices.md Co-Authored-By: Takuya Tokuda <cs.toku.mail@gmail.com> * Update content/ja/docs/tasks/administer-cluster/enabling-endpointslices.md Co-Authored-By: Takuya Tokuda <cs.toku.mail@gmail.com> * Update enabling-endpointslices.md Co-authored-by: Naoki Oketani <okepy.naoki@gmail.com> Co-authored-by: Takuya Tokuda <cs.toku.mail@gmail.com> * update share process namespace (#19011) * Revert trailing whitespaces (#18988) * Correct a wrong resource name: Endpoint (#18954) * Correct a wrong resource name: Endpoint * Revert spaces at end of line * Update links to ja docs (concepts/workloads/) (#18959) * update link to /ja/docs/concepts/workloads/controllers/deployment/ * update link to /ja/docs/concepts/workloads/controllers/replicaset/ * update link to /ja/docs/concepts/workloads/controllers/statefulset/ * update link to /ja/docs/concepts/workloads/controllers/daemonset/ * update link to /ja/docs/concepts/workloads/pods/pod-overview/ * update link to /ja/docs/concepts/workloads/pods/pod/ * revert spaces at end of line * revert spaces at end of line * Replace links with redirect destination * partially update link to /ja/docs/concepts/workloads/pods/pod-lifecycle/ * Update daemonset to 1.17 (#18793) * update daemonset to 1.17 * Update content/ja/docs/concepts/workloads/controllers/daemonset.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/workloads/controllers/daemonset.md Co-Authored-By: nasa9084 <nasa9084@users.noreply.github.com> * apply review Co-authored-by: Naoki Oketani <okepy.naoki@gmail.com> Co-authored-by: nasa9084 <nasa9084@users.noreply.github.com> * remove ctrl-h (#19067) * remove reviewers block (#19091) * update link to /ja/docs/tasks/tools/install-minikube/ (#19147) * translate networking (#19134) * translate networking * apply review * apply review * Update content/ja/docs/concepts/cluster-administration/networking.md Co-Authored-By: nasa9084 <nasa9084@users.noreply.github.com> * nit Co-authored-by: nasa9084 <nasa9084@users.noreply.github.com> * update link to /ja/docs/concepts/overview/components/ (#19194) * fix a wrong field name (#19256) * update link to /ja/docs/concepts/configuration/assign-pod-node/ (#19324) * Translate docs/concepts/storage/persistent-volumes.md into Japanese (#19074) * translate content/ja/docs/concepts/storage/persistent-volumes.md into Japanese * Update content/ja/docs/concepts/storage/persistent-volumes.md translate title Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md fix missing translation Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md conform to translation style guide Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * conform to translation style guide * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: bells17 <bells171@gmail.com> * fix translation refer: https://github.com/kubernetes/website/pull/19074/files#r378950194 * fix translation * fix translation ref: https://github.com/kubernetes/website/pull/19074#discussion_r378931787 * fix translation ref: https://github.com/kubernetes/website/pull/19074#discussion_r378829190 * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * fix translation * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: bells17 <bells171@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: bells17 <bells171@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: bells17 <bells171@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: bells17 <bells171@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: bells17 <bells171@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * fix translation follow https://github.com/kubernetes/website/pull/19074#discussion_r382130660 * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: bells17 <bells171@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: bells17 <bells171@gmail.com> * fix translation https://github.com/kubernetes/website/pull/19074#discussion_r378811021 * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: nasa9084 <nasa9084@users.noreply.github.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: bells17 <bells171@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: bells17 <bells171@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: bells17 <bells171@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: nasa9084 <nasa9084@users.noreply.github.com> * fix translation https://github.com/kubernetes/website/pull/19074/files#r380769175 * fix translation https://github.com/kubernetes/website/pull/19074#discussion_r380745506 * fix translation https://github.com/kubernetes/website/pull/19074#discussion_r381264848 Co-authored-by: Naoki Oketani <okepy.naoki@gmail.com> Co-authored-by: bells17 <bells171@gmail.com> Co-authored-by: nasa9084 <nasa9084@users.noreply.github.com> * update link to /ja/docs/tutorials/hello-minikube/ and /ja/docs/concepts/architecture/nodes/ (#19515) * Translate tasks/configure-pod-container/configure-projected-volume-storage.md into Japanese (#19240) * copy from content/en/docs/tasks/configure-pod-container/configure-projected-volume-storage.md Signed-off-by: Takuma Hashimoto <takumaxd+github@gmail.com> * Translate content/ja/docs/tasks/configure-pod-container/configure-projected-volume-storage.md into Japanese Signed-off-by: Takuma Hashimoto <takumaxd+github@gmail.com> * fix translation https://kubernetes.io/ja/docs/tasks/debug-application-cluster/get-shell-running-container/ にて、「シェルを取得する」という表現が用いられているため、そちらに合わせる Signed-off-by: Takuma Hashimoto <takumaxd+github@gmail.com> * fix terminology 投影 -> Projected (#19641) * translate configure-access-multiple-clusters into Japanese (#19563) * translate configure-access-multiple-clusters into Japanese * reflect PR feedback * Translate concepts/cluster-administration/cluster-administration-overview.md into Japanese #18829 (#19258) * ja-trans: translate concepts/cluster-administration/cluster-administration-overview.md into Japanese (#18829) * ja-trans: Improve Japanese translation in concepts/cluster-administration/cluster-administration-overview.md (#18829) * ja-trans: Improve Japanese translation in concepts/cluster-administration/cluster-administration-overview.md (#18829) * Translate tasks/service-catalog/install-service-catalog-using-helm/ in Japanese (#19776) * issue 18957 * translate a reference file * Update content/ja/docs/reference/glossary/service-catalog.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/reference/glossary/service-catalog.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Apply suggestions from code review Co-Authored-By: Tim Bannister <tim@scalefactory.com> * Apply suggestions from code review Co-Authored-By: Tim Bannister <tim@scalefactory.com> Co-authored-by: Naoki Oketani <okepy.naoki@gmail.com> Co-authored-by: inductor <kohei.ota@zozo.com> Co-authored-by: Tim Bannister <tim@scalefactory.com> * Fix dead link of api-conventions doc (#19801) Co-authored-by: Naoki Oketani <okepy.naoki@gmail.com> Co-authored-by: Jin Hase <hase.jin@jp.fujitsu.com> Co-authored-by: Takuya Tokuda <cs.toku.mail@gmail.com> Co-authored-by: nasa9084 <nasa9084@users.noreply.github.com> Co-authored-by: Takahashi Tomohiko <takahashi@tomohiko.io> Co-authored-by: bells17 <bells171@gmail.com> Co-authored-by: Takuma Hashimoto <takumaxd+github@gmail.com> Co-authored-by: Joe Kamibeppu <joekamibeppu@gmail.com> Co-authored-by: Keita Akutsu <kakts.git@gmail.com> Co-authored-by: SatoruItaya <44042909+SatoruItaya@users.noreply.github.com> Co-authored-by: Tim Bannister <tim@scalefactory.com> Co-authored-by: KoyamaSohei <koyamaso0309@gmail.com>
9.2 KiB
title, content_template, weight
| title | content_template | weight |
|---|---|---|
| kopsを使ったAWS上でのKubernetesのインストール | templates/concept | 20 |
{{% capture overview %}}
This quickstart shows you how to easily install a Kubernetes cluster on AWS.
It uses a tool called kops.
kops is an opinionated provisioning system:
- Fully automated installation
- Uses DNS to identify clusters
- Self-healing: everything runs in Auto-Scaling Groups
- Multiple OS support (Debian, Ubuntu 16.04 supported, CentOS & RHEL, Amazon Linux and CoreOS) - see the images.md
- High-Availability support - see the high_availability.md
- Can directly provision, or generate terraform manifests - see the terraform.md
If your opinions differ from these you may prefer to build your own cluster using kubeadm as a building block. kops builds on the kubeadm work.
{{% /capture %}}
{{% capture body %}}
クラスタの作成
(1/5) kopsのインストール
要件
You must have kubectl installed in order for kops to work.
インストール
Download kops from the releases page (it is also easy to build from source):
On macOS:
Download the latest release with the command:
curl -LO https://github.com/kubernetes/kops/releases/download/$(curl -s https://api.github.com/repos/kubernetes/kops/releases/latest | grep tag_name | cut -d '"' -f 4)/kops-darwin-amd64
To download a specific version, replace the
$(curl -s https://api.github.com/repos/kubernetes/kops/releases/latest | grep tag_name | cut -d '"' -f 4)
portion of the command with the specific version.
For example, to download kops version v1.15.0 type:
curl -LO https://github.com/kubernetes/kops/releases/download/1.15.0/kops-darwin-amd64
Make the kops binary executable.
chmod +x kops-darwin-amd64
Move the kops binary in to your PATH.
sudo mv kops-darwin-amd64 /usr/local/bin/kops
You can also install kops using Homebrew.
brew update && brew install kops
On Linux:
Download the latest release with the command:
curl -LO https://github.com/kubernetes/kops/releases/download/$(curl -s https://api.github.com/repos/kubernetes/kops/releases/latest | grep tag_name | cut -d '"' -f 4)/kops-linux-amd64
To download a specific version, replace the
$(curl -s https://api.github.com/repos/kubernetes/kops/releases/latest | grep tag_name | cut -d '"' -f 4)
portion of the command with the specific version.
For example, to download kops version v1.15.0 type:
curl -LO https://github.com/kubernetes/kops/releases/download/1.15.0/kops-linux-amd64
Make the kops binary executable
chmod +x kops-linux-amd64
Move the kops binary in to your PATH.
sudo mv kops-linux-amd64 /usr/local/bin/kops
You can also install kops using Homebrew.
brew update && brew install kops
(2/5) クラスタ用のroute53ドメインの作成
kops uses DNS for discovery, both inside the cluster and so that you can reach the kubernetes API server from clients.
kops has a strong opinion on the cluster name: it should be a valid DNS name. By doing so you will no longer get your clusters confused, you can share clusters with your colleagues unambiguously, and you can reach them without relying on remembering an IP address.
You can, and probably should, use subdomains to divide your clusters. As our example we will use
useast1.dev.example.com. The API server endpoint will then be api.useast1.dev.example.com.
A Route53 hosted zone can serve subdomains. Your hosted zone could be useast1.dev.example.com,
but also dev.example.com or even example.com. kops works with any of these, so typically
you choose for organization reasons (e.g. you are allowed to create records under dev.example.com,
but not under example.com).
Let's assume you're using dev.example.com as your hosted zone. You create that hosted zone using
the normal process, or
with a command such as aws route53 create-hosted-zone --name dev.example.com --caller-reference 1.
You must then set up your NS records in the parent domain, so that records in the domain will resolve. Here,
you would create NS records in example.com for dev. If it is a root domain name you would configure the NS
records at your domain registrar (e.g. example.com would need to be configured where you bought example.com).
This step is easy to mess up (it is the #1 cause of problems!) You can double-check that your cluster is configured correctly if you have the dig tool by running:
dig NS dev.example.com
You should see the 4 NS records that Route53 assigned your hosted zone.
(3/5) クラスタの状態を保存するS3バケットの作成
kops lets you manage your clusters even after installation. To do this, it must keep track of the clusters that you have created, along with their configuration, the keys they are using etc. This information is stored in an S3 bucket. S3 permissions are used to control access to the bucket.
Multiple clusters can use the same S3 bucket, and you can share an S3 bucket between your colleagues that administer the same clusters - this is much easier than passing around kubecfg files. But anyone with access to the S3 bucket will have administrative access to all your clusters, so you don't want to share it beyond the operations team.
So typically you have one S3 bucket for each ops team (and often the name will correspond to the name of the hosted zone above!)
In our example, we chose dev.example.com as our hosted zone, so let's pick clusters.dev.example.com as
the S3 bucket name.
-
Export
AWS_PROFILE(if you need to select a profile for the AWS CLI to work) -
Create the S3 bucket using
aws s3 mb s3://clusters.dev.example.com -
You can
export KOPS_STATE_STORE=s3://clusters.dev.example.comand then kops will use this location by default. We suggest putting this in your bash profile or similar.
(4/5) クラスタ設定の構築
Run "kops create cluster" to create your cluster configuration:
kops create cluster --zones=us-east-1c useast1.dev.example.com
kops will create the configuration for your cluster. Note that it only creates the configuration, it does
not actually create the cloud resources - you'll do that in the next step with a kops update cluster. This
give you an opportunity to review the configuration or change it.
It prints commands you can use to explore further:
- List your clusters with:
kops get cluster - Edit this cluster with:
kops edit cluster useast1.dev.example.com - Edit your node instance group:
kops edit ig --name=useast1.dev.example.com nodes - Edit your master instance group:
kops edit ig --name=useast1.dev.example.com master-us-east-1c
If this is your first time using kops, do spend a few minutes to try those out! An instance group is a set of instances, which will be registered as kubernetes nodes. On AWS this is implemented via auto-scaling-groups. You can have several instance groups, for example if you wanted nodes that are a mix of spot and on-demand instances, or GPU and non-GPU instances.
(5/5) AWSにクラスタを作成
Run "kops update cluster" to create your cluster in AWS:
kops update cluster useast1.dev.example.com --yes
That takes a few seconds to run, but then your cluster will likely take a few minutes to actually be ready.
kops update cluster will be the tool you'll use whenever you change the configuration of your cluster; it
applies the changes you have made to the configuration to your cluster - reconfiguring AWS or kubernetes as needed.
For example, after you kops edit ig nodes, then kops update cluster --yes to apply your configuration, and
sometimes you will also have to kops rolling-update cluster to roll out the configuration immediately.
Without --yes, kops update cluster will show you a preview of what it is going to do. This is handy
for production clusters!
他のアドオンの参照
See the list of add-ons to explore other add-ons, including tools for logging, monitoring, network policy, visualization & control of your Kubernetes cluster.
クリーンアップ
- To delete your cluster:
kops delete cluster useast1.dev.example.com --yes
フィードバック
- Slack Channel: #kops-users
- GitHub Issues
{{% /capture %}}
{{% capture whatsnext %}}
- Learn more about Kubernetes concepts and
kubectl. - Learn about
kopsadvanced usage - See the
kopsdocs section for tutorials, best practices and advanced configuration options.
{{% /capture %}}