1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

BTP Kyma Runtimeの初期設定

Last updated at Posted at 2022-10-22

はじめに

2022年9月20日から、BTPトライアルアカウントのKyma Runtimeで、クラスターの有効期限が2週間となります。2週間が過ぎると作成したクラスターは削除され、また新たに作り直す必要があります。

今後トライアル環境でKyma Runtimeを使う場合は頻繁に初期設定が発生するため、何をすればよいかメモしておきます。

前提

kubectl, kubeloginがインストール済みであること

ステップ

  1. kubeconfigの設定
  2. 接続確認
  3. namespaceの作成
  4. Docker Hub接続用のシークレット作成
  5. ドメインの確認(オプション)

1. kubeconfigの設定

以下のリンクをクリックして、kubeconfig.yamlファイルをダウンロードします。
image.png
ダウンロードしたファイルをC\Users\<userName>\.kubeconfigとリネームして格納します。
image.png

2. 接続確認

以下のコマンドを実行して、Kyma Runtimeへの接続を確認します。

kubectl config get-contexts

以下のように接続先のクラスター情報が表示されればOKです。
image.png

3. namespaceの作成

以下のコマンドでnamespaceを作成します。

kubectl create namespace <namespace>
kubectl label namespaces <namespace> istio-injection=enabled

4. Docker Hub接続用のシークレット作成

以下のコマンドでシークレットを作成します。(改行はPower Shell向けになっているので、Linux, Macの場合は\に変更)

kubectl create secret docker-registry registry-secret `
  --namespace <namespace> `
  --docker-server=docker.io `
  --docker-email=<email> `
  --docker-username=<username> `
  --docker-password=<password>

5. ドメインの確認(オプション)

アプリケーションの設定で自分のクラスタードメインを指定する必要がある場合は、以下のコマンドで確認できます。

kubectl get configMaps/shoot-info -n kube-system -o jsonpath='{.data.domain}'

例:c-209d1ec.kyma.ondemand.com

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?