I am trying to install Portworx operator on K3s, and I am getting this error:
portworx Could not talk to Docker/Containerd/CRI: Could not initialize container handler - please ensure '/var/run/docker.sock', '/run/containerd/containerd.sock' or '/var/run/crio/crio.sock' are mounted
K3s uses containerd, located at:
/run/k3s/containerd/containerd.sock
How do I resolve this, please? Is it possible to point portworx to /run/k3s/containerd/containerd.sock instead of /run/containerd/containerd.sock, if so, how?
I am unable to to get the Portworx cluster status because the pod is obviously not running… see the Gist above.
PX_POD=$(kubectl get pods -l name=portworx -n kube-system -o jsonpath='{.items[0].metadata.name}')
kubectl exec $PX_POD -n kube-system -- /opt/pwx/bin/pxctl status
~ $ kubectl exec $PX_POD -n kube-system -- /opt/pwx/bin/pxctl status
Defaulting container name to portworx.
Use 'kubectl describe pod/px-cluster-03732d57-45f2-48a3-80a2-97a0e48e3ad9-mfxs6 -n kube-system' to see all of the containers in this pod.
error: unable to upgrade connection: container not found ("portworx")
List Portworx volumes:
$ PX_POD=$(kubectl get pods -l name=portworx -n kube-system -o jsonpath='{.items[0].metadata.name}')
~ $ kubectl exec $PX_POD -n kube-system -- /opt/pwx/bin/pxctl volume list
Defaulting container name to portworx.
Use 'kubectl describe pod/px-cluster-03732d57-45f2-48a3-80a2-97a0e48e3ad9-mfxs6 -n kube-system' to see all of the containers in this pod.
error: unable to upgrade connection: container not found ("portworx")
kubectl logs -n kube-system -l name=portworx --tail=99999
error: a container name must be specified for pod px-cluster-03732d57-45f2-48a3-80a2-97a0e48e3ad9-q94sx, choose one of: [portworx csi-node-driver-registrar]
This command failed because there are two containers in the pod. So I specified the container as shown below:
k describe po px-cluster-03732d57-45f2-48a3-80a2-97a0e48e3ad9-nrjq5 -n kube-system
output:
https://gist.github.com/iogbole/6857fbf846dad6823de2bdb586ed1aa6#file-describe_pod-out
FWIW, I decided to create a symb link to the location that portworx expects the containerd.sock to be located on all my nodes (master and worker nodes inclusive) as shown below:
… our YAML-generation will use the version’s extension ( +k3s1 ) to add the appropriate tweaks into the YAML. These K3S-specific tweaks are currently missing in your deployment, which is likely root-cause for PX deployment failure.