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 3 years have passed since last update.

microk8sにminioをインストールする

Last updated at Posted at 2021-07-12

microk8sのインストール

$ sudo snap install microk8s --classic

コマンド権限の設定

キャッシュディレクトリにアクセスできるようにする

$ sudo chown -f -R $USER ~/.kube

aliasの登録(kubectlのプラグインが動かなく可能性があるので今回はシェルスクリプトを作った)

echo alias kubectl="'microk8s kubectl'" >> $HOME/.bashrc
sudo su - $USER

動作確認

kubectl get node

きちんと認識している
スクリーンショット 2021-07-12 9.47.27.png

microk8sの導入が完了したらminioをインストールする

プラグインのインストール

今回はkrewをインストールする

(
  set -x; cd "$(mktemp -d)" &&
  OS="$(uname | tr '[:upper:]' '[:lower:]')" &&
  ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" &&
  curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/krew.tar.gz" &&
  tar zxvf krew.tar.gz &&
  KREW=./krew-"${OS}_${ARCH}" &&
  "$KREW" install krew
)

export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"

minioのインストール

警告がでるが無視

   kubectl krew update
   kubectl krew install minio

Operatorの初期化

kubectl minio init

新規テナントの作成

テナントを作成
68747470733a2f2f71696974612d696d6167652d73746f72652e73332e61702d6e6f727468656173742d312e616d617a6f6e6177732e636f6d2f302f3639303630392f32376535313765382d373635382d633330302d643339642d6538316261326666616634322e706e67.png

PodとServiceが作成された
スクリーンショット 2021-07-12 12.40.31.png

おまけ

PATHの設定中にすべてのコマンドを受け付けなくなってしまった

$ export PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin":$PATH

このコマンドを打つことで解決

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?