https://github.com/imamachi-n/knative-101
Testing Knative
https://github.com/imamachi-n/knative-101
Last synced: 3 months ago
JSON representation
Testing Knative
- Host: GitHub
- URL: https://github.com/imamachi-n/knative-101
- Owner: Imamachi-n
- Created: 2018-12-30T11:59:05.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-30T12:02:44.000Z (over 6 years ago)
- Last Synced: 2025-01-21T02:08:08.148Z (5 months ago)
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Knative-101
# Knative Install on Google Kubernetes Engine
## Installing the Google Cloud SDK and kubectl
### gcloud コマンドのインストール(Google Cloud SDK のインストール)
以下の URL から対話的インストールを実施。
https://cloud.google.com/sdk/docs/downloads-interactive1. コマンド プロンプトで次のコマンドを入力します。
```
curl https://sdk.cloud.google.com | bash
```2. シェルを再起動します。
```
exec -l $SHELL
```3. gcloud init を実行して gcloud 環境を初期化します。
```
gcloud init
```### Kubernetes のコンポーネントを GCloud にインストール
```
gcloud components install kubectl
```
### GCloud へのログイン
```
gcloud auth login
```## Setting environment variables
### 新規プロジェクトの作成
`my-knative-project`という名前の GCP プロジェクトを作成する。注意点として、GCP のプロジェクト名は全ユーザ間でユニークでなければならない。
ユニークなプロジェクト名でない場合、以下のようなエラーが発生する。
```bash
$ export PROJECT=my-knative-project
$ gcloud projects create $PROJECT --set-as-default
ERROR: (gcloud.projects.create) Project creation failed.
The project ID you specified is already in use by another project.
Please try an alternative ID.
```自分の名前などを組み合わせて、ユニークなプロジェクト名を指定するようにする。
```bash
export PROJECT=imamachi-knative-project
gcloud projects create $PROJECT --set-as-default
```### 作成したプロジェクトをデフォルトに設定
```bash
gcloud config set core/project $PROJECT
```### 必要な API を有効化する
```bash
gcloud services enable \
cloudapis.googleapis.com \
container.googleapis.com \
containerregistry.googleapis.com
```