LoginSignup
2
0

Amazon Linux 2023 にPodmanをインストール

Posted at

Podman インストール

Amazon Linux 2023でPodmanを動かす こちらを参考に進めました。

まずm6aインスタンスで試したのですが、
conmonあたりのビルドでbtrfs?のヘッダファイルが無いとエラーになり解消できませんでした。
m6aインスタンスは諦め、m5インスタンスで再挑戦。
ビルドとインストールは記載通りに行きましたが動作確認時にコンテナ起動に失敗しました。
エラー文によればiptablesが必要そうだったためインストールしました。

install iptables
# podman run quay.io/podman/hello
WARN[0000] Failed to load cached network config: network podman not found in CNI cache, falling back to loading network podman from disk 
WARN[0000] 1 error occurred:
        * plugin type="firewall" failed (delete): cni plugin firewall failed: could not initialize iptables protocol 0: exec: "iptables": executable file not found in $PATH
 
Error: plugin type="bridge" failed (add): cni plugin bridge failed: failed to locate iptables: exec: "iptables": executable file not found in $PATH
# dnf install iptables

EC2はデフォルトでiptablesがインストールされていないかと思いますが、
何か別に方法があるのでしょうか。

ひとまず以降は手順通りにインストールできました。

kind インストールと動作確認

続いて [DevOps] 次世代K8sローカルツール KindをPodmanで立ち上げる
こちらを参考にkindを試しました。(kindについてはあまりよく理解していません。)

必要なコマンドはこちらに沿ってインストール
kind kubectl

# kubectl get pods -A
NAMESPACE            NAME                                         READY   STATUS    RESTARTS   AGE
kube-system          coredns-5d78c9869d-8bkcc                     1/1     Running   0          76m
kube-system          coredns-5d78c9869d-zwx5k                     1/1     Running   0          76m
kube-system          etcd-kind-control-plane                      1/1     Running   0          76m
kube-system          kindnet-jdvj7                                1/1     Running   0          76m
kube-system          kube-apiserver-kind-control-plane            1/1     Running   0          76m
kube-system          kube-controller-manager-kind-control-plane   1/1     Running   0          76m
kube-system          kube-proxy-zj2hz                             1/1     Running   0          76m
kube-system          kube-scheduler-kind-control-plane            1/1     Running   0          76m
local-path-storage   local-path-provisioner-6bc4bddd6b-hcp8r      1/1     Running   0          76m

起動が確認できたので多分成功です。

2
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
2
0