Skip to content
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

Manifest deployer tries to create ingress resource before ingress controller is ready #4104

Open
enp opened this issue Feb 21, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@enp
Copy link

enp commented Feb 21, 2024

k0s started via docker with two manifests mounted to /var/lib/k0s/manifests:

No any ingress resource was deployed after k0s completely up and running, but ingress will appear on manual kubectl apply the same manifest

Looks like manifest deployer tries to create ingress resource before nginx ingress controller is ready - so how create ingress resource only after ingress controller via manifest deployer?

@enp enp added the bug Something isn't working label Feb 21, 2024
@enp enp changed the title Manifest deployer tries to create ingress resource before ingress controller is not ready Manifest deployer tries to create ingress resource before ingress controller is ready Feb 21, 2024
Copy link
Contributor

The issue is marked as stale since no activity has been recorded in 30 days

@github-actions github-actions bot added the Stale label Mar 22, 2024
@twz123 twz123 removed the Stale label Mar 22, 2024
Copy link
Contributor

The issue is marked as stale since no activity has been recorded in 30 days

@github-actions github-actions bot added the Stale label Apr 22, 2024
@jnummelin jnummelin removed the Stale label Apr 23, 2024
@jnummelin
Copy link
Collaborator

@enp Is this a standard Ingress resource you are referring to? If yes, it should not matter as the ingress controller will pick those up once it starts.

Or is this some custom CRD based ingress?

Copy link
Contributor

The issue is marked as stale since no activity has been recorded in 30 days

@github-actions github-actions bot added the Stale label May 23, 2024
@twz123
Copy link
Member

twz123 commented May 29, 2024

k0s started via docker with two manifests mounted to /var/lib/k0s/manifests

How do you mount them? Can you provide an example? Note that manifest files below /var/lib/k0s/manifests need to be organized in folders, so you need to put them into, say /var/lib/k0s/manifests/nginx-ingress/*.yaml.

@twz123 twz123 removed the Stale label May 29, 2024
@enp
Copy link
Author

enp commented Jun 4, 2024

Run (with mount) example:

docker run --name k0s --hostname k0s --rm --privileged -v k0s:/var/lib/k0s \
  -v $(pwd)/manifests:/var/lib/k0s/manifests \
  -p 6443:6443 -p 80:80 docker.io/k0sproject/k0s k0s controller --single

Manifest files in folders per files solves problem, thank you! But what is the reason for this limitation?

@twz123
Copy link
Member

twz123 commented Jun 4, 2024

Manifest files in folders per files solves problem, thank you! But what is the reason for this limitation?

K0s will add a "stack" label to all resources that are created via the manifest folder. This is used for automatic pruning (think: kubectl apply --prune -f ...). The folder name is used as the stack's name. Without a folder, it's not clear which stack name to choose.

@enp
Copy link
Author

enp commented Jun 4, 2024

File name can be also used for stack name, why no? But idea is clear, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants