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

Running inside Kubernetes #373

Closed
felipeconti opened this issue Apr 13, 2024 · 5 comments
Closed

Running inside Kubernetes #373

felipeconti opened this issue Apr 13, 2024 · 5 comments

Comments

@felipeconti
Copy link

Is it possible to run it in a cluster Kubernetes?

I got this error when I tried:

❯ Starting Windows for Docker v2.10...
❯ For support visit https://github.com/dockur/windows

RTNETLINK answers: File exists
❯ ERROR: Failed to create bridge. Please add the following setting to your container: --cap-add NET_ADMIN

Spec:

apiVersion: v1
kind: Pod
metadata:
  name: windows
  namespace: windows
  labels:
    app: windows
spec:
  volumes:
  - name: storage
    persistentVolumeClaim:
      claimName: windows-storage
  restartPolicy: OnFailure
  terminationGracePeriodSeconds: 120
  containers:
  - name: windows
    image: dockurr/windows
    securityContext:
      privileged: true
      allowPrivilegeEscalation: true
      capabilities:
        add: ["NET_ADMIN", "SYS_TIME"]
    resources:
      limits:
        cpu: '10'
        memory: 22Gi
      requests:
        cpu: 250m
        memory: 512Mi
    env:
    - name: VERSION
      value: win11
    ports:
    - name: vnc
      containerPort: 8006
      protocol: TCP
    - name: rdp-tcp
      containerPort: 3389
      protocol: TCP
    - name: rdp-udp
      containerPort: 3389
      protocol: UDP
    volumeMounts:
    - name: storage
      mountPath: /storage
@kroese
Copy link
Contributor

kroese commented Apr 13, 2024

I have zero experience with Kubernetes, so hopefully another user who knows how to do it can help you.

@kroese
Copy link
Contributor

kroese commented Apr 13, 2024

Or maybe this pull-request: https://github.com/dockur/windows/pull/304/files

@thomasblot1
Copy link

you can substitute --cap-add NET_ADMIN to --privileged but it s insecure. There isn't any workaround for the moment, other than that.

Got a problem on my kubernetes :

qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000007H:EDX.invtsc [bit 8]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000007H:EDX.invtsc [bit 8]
BdsDxe: failed to load Boot0002 "UEFI QEMU QEMU HARDDISK " from PciRoot(0x0)/Pci(0xA,0x0)/Scsi(0x0,0x0): Not Found
BdsDxe: loading Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0)
BdsDxe: starting Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0)

so best luck to youuuu as well ^^

@kroese
Copy link
Contributor

kroese commented Apr 16, 2024

@thomasblot1 That error is when your CPU doesnt support flags for Hyper-V, you can add the environment variable: HV: "N" to disable Hyper-V enlightments.

@kroese
Copy link
Contributor

kroese commented May 16, 2024

I have now added an example Kubernetes manifest, see:

https://github.com/dockur/windows/blob/master/kubernetes.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants