> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ale.run/llms.txt
> Use this file to discover all available pages before exploring further.

# 準備事項

> AWS EKSクラスターにエールをインストールするための準備事項です。

<Info>
  **案内**

  * このガイドは**Kubernetes v1.30**を基準に作成されました。
</Info>

***

## ツールのインストール

<Warning>
  Windowsの場合はWSL2をインストールし、Linux環境でエールを利用することをお勧めします。
  [こちら](https://learn.microsoft.com/ja-jp/windows/wsl/install)を参照してWSL2を先にインストールしてください。
</Warning>

<AccordionGroup>
  <Accordion title="AWS CLI">
    以下のコマンドを入力してAWS CLIをインストールします。

    ```bash theme={null}
    curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg" && \
    sudo installer -pkg AWSCLIV2.pkg -target /
    ```
  </Accordion>

  <Accordion title="eksctl">
    ```bash theme={null}
    ARCH=amd64
    # ARCH=arm64 (macOS-Apple Silicon または arm64 アーキテクチャのLinux)
    PLATFORM=$(uname -s)_$ARCH
    curl -sLO "https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_$PLATFORM.tar.gz"
    tar -xzf eksctl_$PLATFORM.tar.gz -C /tmp && rm eksctl_$PLATFORM.tar.gz
    sudo mv /tmp/eksctl /usr/local/bin
    ```
  </Accordion>

  <Accordion title="kubectl">
    使用しているOSおよびアーキテクチャに合わせてkubectlをインストールします。

    **macOS**

    <CodeGroup>
      ```bash macOS(Apple Silicon) theme={null}
      curl -LO "https://dl.k8s.io/release/v1.30.2/bin/darwin/arm64/kubectl"
      ```

      ```bash macOS(Intel) theme={null}
      curl -LO "https://dl.k8s.io/release/v1.30.2/bin/darwin/amd64/kubectl"
      ```
    </CodeGroup>

    **Linux**

    <CodeGroup>
      ```bash Linux(x86-64) theme={null}
      curl -LO https://dl.k8s.io/release/v1.30.2/bin/linux/amd64/kubectl
      ```

      ```bash Linux(arm64) theme={null}
      curl -LO https://dl.k8s.io/release/v1.30.2/bin/linux/arm64/kubectl
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="helm">
    ```bash theme={null}
    curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
    chmod 700 get_helm.sh
    ./get_helm.sh  
    ```
  </Accordion>
</AccordionGroup>

## AWSアカウントの設定

### 環境変数の登録

```bash theme={null}
export CLUSTER_NAME=<作成するEKSクラスター名>
```

### AWS CLIの設定

```bash theme={null}
aws configure

AWS Access Key ID [********************]: AWSアクセスキー
AWS Secret Access Key [********************]: AWSシークレットアクセスキー
Default region name [ap-northeast-2]: AWSリージョン
Default output format [json]: json, yaml, text, table の中から選択
```
