
学習目的で最初の Kubernetes クラスターをセットアップしたいと考えています。
3 つの lxc コンテナを実行しています。AlmaLiunx 8.4
*1 つはコントローラーになり、残りの 2 つはワーカー ノードになります。
ガイドとして私はこのチュートリアルただし、コンテナ ランタイムとして podman を使用したいので、ワーカー ノードにはすでにインストールされています。kubeadm init
コントローラーでコマンドを実行すると、docker が必要であるというエラーが表示されます。
# kubeadm init
[init] Using Kubernetes version: v1.22.1
[preflight] Running pre-flight checks
[preflight] WARNING: Couldn't create the interface used for talking to the container runtime: docker is required for container runtime: exec: "docker": executable file not found in $PATH
[WARNING FileExisting-tc]: tc not found in system path
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
error execution phase preflight: docker is required for container runtime: exec: "docker": executable file not found in $PATH
To see the stack trace of this error execute with --v=5 or higher
を追加することでこれを回避しようとしましたalias docker-'podman'
が、意図した効果はありませんでした (エイリアスをテストしました。動作します)。
最初に docker を使用してクラスターをセットアップし、後でワーカー ノードで podman に置き換える必要があるのか、それともセットアップ手順中に追加する必要がある秘密の podman ソースがあるのか疑問に思っています。
答え1
主な問題はここにあるようです:
WARNING: Couldn't create the interface used for talking to the container runtime: docker is required for container runtime: exec: "docker": executable file not found in $PATH
これは、docker がまったくインストールされていないか、その実行ファイルが PATH 内に存在しないことを意味します。docker がインストールされているかどうかを確認する必要があります (必要に応じてインストールします)。次に、docker 実行ファイルが PATH 内にあることを確認します。
参照同様の質問。