-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to access API server for a cluster created with Podman 3.3.x on macOS #2445
Comments
If the cluster came up to this point then the api server is running (this is checked and the endpoint is used) so that only leaves the port forwarding. Podman is responsible for the port forwarding. Kind just tells it to setup a forward like |
cc @aojea broken podman networking ... |
is this podman remote? |
@aojea so the setup is Vagrant with running with vbox. Podman server running in Fedora 34. |
The only thing is I have both enabled IPv4 and IPv6 on my local machine (Mac OS X). So I suppose that would mean the kind cluster by default will also be dual stack If i don't specially disable a family right ? |
If the client and kind are local then your kubectl will only be able to access the cluster if you do your own port forwarding from the host to the VM. KIND isn't responsible for the VM setup and since it creates local clusters it binds the port forward from the host running the container to the apiserver in the node container to the loopback IP. This limitation will apply to other containers forwarding ports when running podman in this way. Alternatively you can configure the cluster / kind to bind to a non local address. https://kind.sigs.k8s.io/docs/user/configuration/#api-server |
SSH port forwarding is one plausible option but you will need to get the port from the kubeconfig or similar and do the forward yourself. I don't know if podman intends to support forwarding to the actual host when using podman machine but docker desktop does do this. |
Hi, I just ran into the same problem and switched to check if I could use kind. I used the following config that adds an additional port (just changing the apiServerAddress did not work as proposed by @BenTheElder in #2445 (comment)):
In addition I had to fix the
This way I got the following result:
Wasn't going any further from here, none the less hope this helps. |
I was able to get this working on macOS using the new # install and initialize podman
brew install podman
podman machine init --cpus=4 --memory=8096 --disk=50
# manually add helper_binaries_dir to ~/.config/containers/containers.conf
[engine]
helper_binaries_dir = ["/Users/jstafford/homebrew/Cellar/podman/3.4.2/libexec/", "/Users/jstafford/homebrew/Cellar/podman/3.4.2/bin/"]
# start podman and set the connection to the root user
podman machine start
podman system connection default podman-machine-default-root
# install kind
brew install kind
# setup a kind cluster
export KIND_EXPERIMENTAL_PROVIDER=podman
kind create cluster --config=<(echo '---
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
apiServerAddress: "0.0.0.0"
')
# fix kubeconfig http://: url
sed -i '' 's/https:\/\/:/https:\/\/localhost:/g' ~/.kube/config |
Thanks! Works for me! |
@jstaf You're a ROCK STAR! Thank you for sharing that. I can confirm that this worked for me as well. |
This worked for me too! Thank you @jstaf Same specs:
|
What happened:
Unable to get a Kind cluster going on Mac OS X using podman 3.3.1. Podman server is running in Fedora 34 using Vagrant.
When creating kind cluster It says API server isnt available.
For reference:
What you expected to happen:
Be able to create a cluster in rootless mode and access the API server
How to reproduce it (as minimally and precisely as possible):
As above in a Vagrant environment (Fedora 34),
Environment:
kind version
): v0.12.0-alpha+f8e6aa668edd33 (head build)kubectl version
): 1.22.1docker info
): podman/etc/os-release
): Mac OS XThe text was updated successfully, but these errors were encountered: