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

has someone gotten k3s to work? #200

Open
bbortt opened this issue Aug 30, 2024 · 4 comments
Open

has someone gotten k3s to work? #200

bbortt opened this issue Aug 30, 2024 · 4 comments
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@bbortt
Copy link

bbortt commented Aug 30, 2024

Feature request description

I am trying to deploy a pod into k3s. I've followed the contained test (roughly), but fail to get it working. I've also considered the pod_api.rs example over at kube-rs/kube.

has someone gotten this to work? I always end up with: Service(hyper_util::client::legacy::Error(Connect, ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" }))).

this happens to be thrown in the pods.create line:

pub(crate) async fn deploy_argocd(client: Client) {
    let pods: Api<Pod> = Api::default_namespaced(client.clone());

    let argocd_pod: Pod =
        parse_yaml("tests/resources/k3s/argocd.pod.yml").expect("Failed to read ArgoCD deployment");

    pods.create(&PostParams::default(), &argocd_pod)
        .await
        .expect("Failed to deploy ArgoCD to K3s");
}

Image reference

k3s feature

@bbortt bbortt added the enhancement New feature or request label Aug 30, 2024
@DDtKey
Copy link
Contributor

DDtKey commented Aug 30, 2024

Hi @bbortt 👋
Could you say what version of kube and k8s-openapi do you use in your tests?

It works in our test-suite at least 🤔

@bbortt
Copy link
Author

bbortt commented Aug 30, 2024

@DDtKey thanks for the quick response. I saw that the test suite works and I can reproduce that. but it does only read pods, not create any new.. as soon as I go into this direction I end up with the mentioned error..

[dev-dependencies]
assert_cmd = "2.0.16"
k8s-openapi = { version = "0.22.0", features = ["latest"] }
kube = { version = "0.93.1", features = ["derive"] }
kube-derive = "0.93.1"
predicates = "3.1.2"
rustls = "0.23.12"
schemars = "0.8.21"
testcontainers-modules = { version = "0.9.0", features = [ "hashicorp_vault", "postgres"] }

bbortt added a commit to bbortt/testcontainers-rs-modules-community that referenced this issue Aug 31, 2024
bbortt added a commit to bbortt/testcontainers-rs-modules-community that referenced this issue Sep 3, 2024
@DDtKey DDtKey added documentation Improvements or additions to documentation question Further information is requested and removed enhancement New feature or request labels Sep 3, 2024
@DDtKey
Copy link
Contributor

DDtKey commented Sep 3, 2024

I guess you've figured out the reason and described in #202

Let me know if you have any questions. Thank you!

@bbortt
Copy link
Author

bbortt commented Sep 3, 2024

not exactly, that was to build this community modules project locally. sorry if I was not specific enough.

the build of the provided test still does not pass :/ tho not with the error I'd expect.

bbortt added a commit to bbortt/testcontainers-rs-modules-community that referenced this issue Sep 3, 2024
example using the k8s pod api. also showcases running multiple k3s
tests is only possible in serial (see `serial_test` crate).
bbortt added a commit to bbortt/testcontainers-rs-modules-community that referenced this issue Sep 3, 2024
example using the k8s pod api. also showcases running multiple k3s
tests is only possible in serial (see `serial_test` crate).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants