diff --git a/content/ja/docs/tasks/tools/install-kubectl.md b/content/ja/docs/tasks/tools/install-kubectl.md index c41f740487706..6d9c57c4688df 100644 --- a/content/ja/docs/tasks/tools/install-kubectl.md +++ b/content/ja/docs/tasks/tools/install-kubectl.md @@ -9,11 +9,11 @@ card: --- {{% capture overview %}} -The Kubernetes command-line tool, [kubectl](/docs/user-guide/kubectl/), allows you to run commands against Kubernetes clusters. You can use kubectl to deploy applications, inspect and manage cluster resources, and view logs. For a complete list of kubectl operations, see [Overview of kubectl](/docs/reference/kubectl/overview/). +Kubernetesのコマンドラインツールである[kubectl](/docs/user-guide/kubectl/)を使用して、Kubernetesクラスターに対してコマンドを実行することができます。kubectlによってアプリケーションのデプロイや、クラスターのリソース管理および検査を行うことができます。kubectlの操作に関する完全なリストは、[Overview of kubectl](/docs/reference/kubectl/overview/)を参照してください。 {{% /capture %}} {{% capture prerequisites %}} -You must use a kubectl version that is within one minor version difference of your cluster. For example, a v1.2 client should work with v1.1, v1.2, and v1.3 master. Using the latest version of kubectl helps avoid unforeseen issues. +kubectlのバージョンは、クラスターのマイナーバージョンとの差分が1つ以内でなければなりません。たとえば、クライアントがv1.2であれば、v1.1、v1.2、v1.3のマスターで動作するはずです。最新バージョンのkubectlを使うことで、不測の事態を避けることができるでしょう。 {{% /capture %}} {{% capture steps %}} @@ -22,32 +22,33 @@ You must use a kubectl version that is within one minor version difference of yo ### curlを使用してLinuxへkubectlのバイナリをインストールする -1. Download the latest release with the command: +1. 次のコマンドにより、最新リリースをダウンロードしてください: ``` curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl ``` - To download a specific version, replace the `$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)` portion of the command with the specific version. + 特定のバージョンをダウンロードする場合、コマンドの`$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)`の部分を特定のバージョンに書き換えてください。 - For example, to download version {{< param "fullversion" >}} on Linux, type: + たとえば、Linuxへ{{< param "fullversion" >}}のバージョンをダウンロードするには、次のコマンドを入力します: ``` curl -LO https://storage.googleapis.com/kubernetes-release/release/{{< param "fullversion" >}}/bin/linux/amd64/kubectl ``` -2. Make the kubectl binary executable. +2. kubectlバイナリを実行可能にしてください。 ``` chmod +x ./kubectl ``` -3. Move the binary in to your PATH. +3. バイナリをPATHの中に移動させてください。 ``` sudo mv ./kubectl /usr/local/bin/kubectl ``` -4. Test to ensure the version you installed is up-to-date: + +4. インストールしたバージョンが最新であることを確認してください: ``` kubectl version @@ -56,14 +57,14 @@ You must use a kubectl version that is within one minor version difference of yo ### ネイティブなパッケージマネージャーを使用してインストールする {{< tabs name="kubectl_install" >}} -{{< tab name="Ubuntu, Debian or HypriotOS" codelang="bash" >}} +{{< tab name="Ubuntu、DebianまたはHypriotOS" codelang="bash" >}} sudo apt-get update && sudo apt-get install -y apt-transport-https curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list sudo apt-get update sudo apt-get install -y kubectl {{< /tab >}} -{{< tab name="CentOS, RHEL or Fedora" codelang="bash" >}}cat < /etc/yum.repos.d/kubernetes.repo +{{< tab name="CentOS、RHELまたはFedora" codelang="bash" >}}cat < /etc/yum.repos.d/kubernetes.repo [kubernetes] name=Kubernetes baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64 @@ -79,15 +80,15 @@ yum install -y kubectl ### Snapを使用してインストールする -If you are on Ubuntu or another Linux distribution that support [snap](https://snapcraft.io/docs/core/install) package manager, kubectl is available as a [snap](https://snapcraft.io/) application. +Ubuntuまたは[snap](https://snapcraft.io/docs/core/install)パッケージマネージャーをサポートしているLinuxディストリビューションを使用している場合、kubectlは[snap](https://snapcraft.io/)アプリケーションとして利用することもできます。 -1. Switch to the snap user and run the installation command: +1. snapユーザに切り替えて、インストールコマンドを実行してください: ``` sudo snap install kubectl --classic ``` -2. Test to ensure the version you installed is up-to-date: +2. インストールしたバージョンが最新であることを確認してください: ``` kubectl version @@ -97,32 +98,32 @@ If you are on Ubuntu or another Linux distribution that support [snap](https://s ### curlを使用してmacOSへkubectlのバイナリをインストールする -1. Download the latest release: +1. 最新リリースをダウンロードしてください: ``` curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl ``` - To download a specific version, replace the `$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)` portion of the command with the specific version. + 特定のバージョンをダウンロードする場合、コマンドの`$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)`の部分を特定のバージョンに書き換えてください。 - For example, to download version {{< param "fullversion" >}} on macOS, type: + たとえば、macOSへ{{< param "fullversion" >}}のバージョンをダウンロードするには、次のコマンドを入力します: ``` curl -LO https://storage.googleapis.com/kubernetes-release/release/{{< param "fullversion" >}}/bin/darwin/amd64/kubectl ``` -2. Make the kubectl binary executable. +2. kubectlバイナリを実行可能にしてください。 ``` chmod +x ./kubectl ``` -3. Move the binary in to your PATH. +3. バイナリをPATHの中に移動させてください。 ``` sudo mv ./kubectl /usr/local/bin/kubectl ``` -4. Test to ensure the version you installed is up-to-date: +4. インストールしたバージョンが最新であることを確認してください: ``` kubectl version @@ -130,15 +131,15 @@ If you are on Ubuntu or another Linux distribution that support [snap](https://s ### Homebrewを使用してmacOSへインストールする -If you are on macOS and using [Homebrew](https://brew.sh/) package manager, you can install kubectl with Homebrew. +macOSで[Homebrew](https://brew.sh/)パッケージマネージャーを使用していれば、Homebrewでkubectlをインストールすることもできます。 -1. Run the installation command: +1. インストールコマンドを実行してください: ``` brew install kubernetes-cli ``` -2. Test to ensure the version you installed is up-to-date: +2. インストールしたバージョンが最新であることを確認してください: ``` kubectl version @@ -146,16 +147,16 @@ If you are on macOS and using [Homebrew](https://brew.sh/) package manager, you ### MacPortsを使用してmacOSへインストールする -If you are on macOS and using [Macports](https://macports.org/) package manager, you can install kubectl with Macports. +macOSで[MacPorts](https://macports.org/)パッケージマネージャーを使用していれば、MacPortsでkubectlをインストールすることもできます。 -1. Run the installation command: +1. インストールコマンドを実行してください: ``` sudo port selfupdate sudo port install kubectl ``` -2. Test to ensure the version you installed is up-to-date: +2. インストールしたバージョンが最新であることを確認してください: ``` kubectl version @@ -165,25 +166,24 @@ If you are on macOS and using [Macports](https://macports.org/) package manager, ### curlを使用してWindowsへkubectlのバイナリをインストールする -1. Download the latest release {{< param "fullversion" >}} from [this link](https://storage.googleapis.com/kubernetes-release/release/{{< param "fullversion" >}}/bin/windows/amd64/kubectl.exe). +1. [こちらのリンク](https://storage.googleapis.com/kubernetes-release/release/{{< param "fullversion" >}}/bin/windows/amd64/kubectl.exe)から、最新リリースである{{< param "fullversion" >}}をダウンロードしてください。 - Or if you have `curl` installed, use this command: + または、`curl`をインストールされていれば、次のコマンドも使用できます: ``` curl -LO https://storage.googleapis.com/kubernetes-release/release/{{< param "fullversion" >}}/bin/windows/amd64/kubectl.exe ``` - To find out the latest stable version (for example, for scripting), take a look at [https://storage.googleapis.com/kubernetes-release/release/stable.txt](https://storage.googleapis.com/kubernetes-release/release/stable.txt). + 最新の安定版を入手する際は(たとえばスクリプトで使用する場合)、[https://storage.googleapis.com/kubernetes-release/release/stable.txt](https://storage.googleapis.com/kubernetes-release/release/stable.txt)を参照してください。 -2. Add the binary in to your PATH. -3. Test to ensure the version of `kubectl` is the same as downloaded: +2. バイナリをPATHに追加します +3. `kubectl`のバージョンがダウンロードしたものと同じであることを確認してください: ``` kubectl version ``` {{< note >}} -[Docker for Windows](https://docs.docker.com/docker-for-windows/#kubernetes) adds its own version of `kubectl` to PATH. -If you have installed Docker before, you may need to place your PATH entry before the one added by Docker installer or remove the Docker's `kubectl`. +[Docker for Windows](https://docs.docker.com/docker-for-windows/#kubernetes)は、それ自身のバージョンの`kubectl`をPATHに追加します。Dockerをすでにインストールしている場合、Dockerインストーラーによって追加されたPATHの前に追加するか、Dockerの`kubectl`を削除してください。 {{< /note >}} ### PSGalleryからPowerShellを使用してインストールする