Coder Social home page Coder Social logo

Comments (10)

MikeZappa87 avatar MikeZappa87 commented on June 3, 2024

Hello, is this in the context of Kubernetes (are you using the cri plugin of containerd) or outside of Kubernetes?

from windows-containers.

rawahars avatar rawahars commented on June 3, 2024

Hi @MikeZappa87, No this is outside of Kubernetes environment.

In Kubernetes, I think pause container is started first in the HCN namespace and then the containers from the pod are launched.

from windows-containers.

MikeZappa87 avatar MikeZappa87 commented on June 3, 2024

Is it possible to make use of the cri-api (RunPodSandbox/CreateContainer)? This is common outside of the K8s space so you wouldn't be outside of the normal. It would satisfy creating the compartment, executing the cni plugin. I will check why creating a namespace doesn't show in the get-netcompartment.

How are you doing this? Via ctr?

from windows-containers.

rawahars avatar rawahars commented on June 3, 2024

So unfortunately we have our own workflow which does not use the cri-api. Presently I was using the containerd SDK client to accomplish the workflow I mentioned earlier.

However, there is an easy test for this is just using New-HnsNamespace Powershell command to create an HCN namespace. If you check the compartments using Get-NetCompartment, it won't have any entry. Or if you use Get-HNSNamespace, then there won't be a CompartmentID associated with this HCN Namespace.

from windows-containers.

MikeZappa87 avatar MikeZappa87 commented on June 3, 2024

One item to note is:

"Start a container using containerd and pass the HCN namespace ID in the OCI spec options." Is that it probably won't do anything since https://github.com/containerd/containerd/blob/4d2c8879908285454a4006534cb0af82bb58a406/pkg/netns/netns_windows.go#L33

We don't pass anything to the create compartment.

from windows-containers.

microsoft-github-policy-service avatar microsoft-github-policy-service commented on June 3, 2024

This issue has been open for 30 days with no updates.
@MikeZappa87, please provide an update or close this issue.

from windows-containers.

kestratt avatar kestratt commented on June 3, 2024

HNS will create the compartment during container creation. It is expected that the compartment isn't present yet.

from windows-containers.

kestratt avatar kestratt commented on June 3, 2024

There is work currently being done to tie the lifetime of the network namespace and compartment to the pod itself. This feature is targeting Windows Server 2022.

from windows-containers.

rawahars avatar rawahars commented on June 3, 2024

Thanks @MikeZappa87 and @kestratt for the information.

from windows-containers.

microsoft-github-policy-service avatar microsoft-github-policy-service commented on June 3, 2024

This issue has been open for 90 days with no updates.
@MikeZappa87, please provide an update or close this issue.

from windows-containers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.