Closed expruc closed 1 month ago
It looks like you’re missing this in your RUN section “go install sigs.k8s.io/kwok/cmd/{kwok,kwokctl}@${KWOK_LATEST_RELEASE}”
I saw on the examples in this repository that the cluster is served using kubectl proxy. Is it a must to access the cluster? I couldn't find documentation about building an image with the cluster, especially when the kwok is meant to run in the background and the entrypoint is another application.
Not required, if you don't use kubectl proxy
, you need to copy the TLS certificates out of the container when using the cluster outside the container.
When running the container, the cluster is shown as created (after running the container and entering it, running kwokctl get clusters returns the proper result), but the cluster is inaccessible (running kwokctl kubectl get pods for example, returns connection refused on port 32764 - the default port kwok opens on cluster creation).
When the container starts, the only process running is your shell, the cluster doesn't actually start.
It looks like you’re missing this in your RUN section “go install sigs.k8s.io/kwok/cmd/{kwok,kwokctl}@${KWOK_LATEST_RELEASE}”
This didn't help and I'm still experiencing the same error.
I saw on the examples in this repository that the cluster is served using kubectl proxy. Is it a must to access the cluster? I couldn't find documentation about building an image with the cluster, especially when the kwok is meant to run in the background and the entrypoint is another application.
Not required, if you don't use
kubectl proxy
, you need to copy the TLS certificates out of the container when using the cluster outside the container.
I'm trying to run kubectl
commands from inside the container, not outside.
When the container starts, the only process running is your shell, the cluster doesn't actually start.
So how can I make the cluster run in the background? Do I have to include the cluster creation command on the entrypoint/cmd?
Do I have to include the cluster creation command on the entrypoint/cmd?
Yes
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/reopen
/remove-lifecycle rotten
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
How to use it?
What happened?
I'm trying to create a container containing a cluster created on build time (running
kwokctl create cluster
on Dockerfile). When running the container, the cluster is shown as created (after running the container and entering it, runningkwokctl get clusters
returns the proper result), but the cluster is inaccessible (runningkwokctl kubectl get pods
for example, returns connection refused on port 32764 - the default port kwok opens on cluster creation). Moreover, when creating a new cluster, it creates the cluster on the same port successfully (and new cluster is accessible).I saw on the examples in this repository that the cluster is served using kubectl proxy. Is it a must to access the cluster? I couldn't find documentation about building an image with the cluster, especially when the kwok is meant to run in the background and the entrypoint is another application.
From what I saw, the cluster creation during the build was fine and all the files under
/root/.kwok/clusters/<my-cluster>
are fine. I tried also to move the creation of the cluster command to the entrypoint, without success.What did you expect to happen?
Cluster is running on that port after creating and running the container. Entering the container and running
kubectl get pods
shouldn't return connection refusedHow can we reproduce it (as minimally and precisely as possible)?
The Dockerfile:
And inside the container the results of the commands:
Anything else we need to know?
I'm not sure if this behavior should be expected or not, though I don't see any reason for it to fail.
Kwok version
OS version