When you setup your kubernetes cluster with flannel plugin as your CNI interface, you will have to make sure the file /run/flannel/subnet.env exists in all your kubernetes worker nodes. Otherwise, the pods that you create will be in forever ‘ContainerCreating’ state.
sudo vim /run/flannel/subnet.env
And paste the below four lines and save it
Now when you run kubectl get pods, your pods status should be in running state.