Support for latest k3s (1.20)?

What are the plans for supporting the latest version of k3s (1.20) with Gitpod self-hosted?

I am really hoping that 0.9.0 will have support for this when it comes out. Means we can use it in more places.

For example civo.com where I have managed to get some interest in adding Gitpod to their marketplace of apps. This will require a more up to date version of k3s being useable, and if possible using k3s out of the box (flannel) without too many tweaks.

1 Like

Hi @thomashansen,

Why do you think that k3s does not work on k3s 1.20? It should work since this commit 3 month ago. Do you get any error messages?

Cornelius

Hi @corneliusludmann

I had a number of issues with getting 0.8.0 to install and for 0.9.0-alpha1 to work. Some of them related to recent issues with 1.4 of containerd and starting workspaces.

Also, since the documentation says 1.17 is the latest supported version, I also made the assumption that this was not yet supported.

If it is meant to work - I am more than happy to give it another go and see if I can get it working. I would really like to get 0.9.0 going - as this has the nice new UI and support for VS Code (not as a preview) - which is what we want to be using.

1 Like

@corneliusludmann
So tried a new install now, with 0.9.0-alpha1, latest k3s (so no version specified on k3s install) - and I can get it all to come up, but I get the error mentioned here:

I’ve tried to follow the tweaks you are doing in here, just doing the install on Hetzner:

Values.custom.yaml:

hostname: gitpod.htz.app-solutions.com
branding:
  # logo: /images/gitpod-ddd.svg
  logo: https://static.wixstatic.com/media/2bef0f_285b42130ffa4c9d83f26db4e4d79892~mv2.png
  homepage: https://gitpod.htz.app-solutions.com/

affinity:
  nodeAffinity:
    requiredDuringSchedulingIgnoredDuringExecution:
      nodeSelectorTerms:
      - matchExpressions:
        - key: gitpod.io/main-node
          operator: In
          values:
          - "true"

components:
  wsDaemon:
    containerRuntime:
      enabled: true
      runtime: containerd
      containerd:
        socket: /run/k3s/containerd/containerd.sock
      nodeRoots:
      - /var/lib
      - /run/k3s/containerd/io.containerd.runtime.v1.linux
      - /run/k3s/containerd/io.containerd.runtime.v2.task/k8s.io

  imageBuilder:
    # registryCerts: []
    # registry:
    #   # name must not end with a "/"
    #   name: registry.ccmp.cloud/aki
    #   secretName: image-builder-registry-secret
    #   path: secrets/registry-auth.json
    dindMtu: 1450

  workspace:
    # defaultImage:
    #   imageName: workspace-base
    template:
      default:
          dnsPolicy: ClusterFirstWithHostNet
      spec:
        dnsConfig: null
        dnsPolicy: ClusterFirst
    affinity:
      default: "gitpod.io/workload_workspace"

  # workspace:
  #   templates:
  #     default:
  #         dnsPolicy: ClusterFirstWithHostNet
    # pullSecret:
    #   secretName: image-builder-registry-secret

  contentService:
    remoteStorage:
      kind: minio
      minio:
        endpoint: gitpod.s3.fr-par.scw.cloud
        accessKey: xxx
        secretKey: xxx
        region: fr-par
        tmpdir: /tmp

docker-registry:
  nodeSelector:
    gitpod.io/main-node: "true"

mysql:
  nodeSelector:
    gitpod.io/main-node: "true"

minio:
  enabled: false
  fullnameOverride: minio
  accessKey: fDhEkcdeTb8Hq9VNbVJPEPFNZn6AVDAVX7hc3453
  secretKey: fU6fm63LX4Pm64DRq9dr4nB55dr6NX9eYo812342
  serviceAccount:
    create: true
    name: minio
  resources:
    requests:
      # defaults to 4GB, set to 2GB to be able to start on smaller instances
      memory: 2G
  nodeSelector:
    gitpod.io/main-node: "true"
  persistence:
    enabled: true
    size: 20Gi

authProviders:
  - id: "Public-GitLab"
    host: "gitlab.com"
    type: "GitLab"
    oauth:
      clientId: "xxx"
      clientSecret: "xxx"
      callBackUrl: "https://gitpod.xxx/callback"
      settingsUrl: "https://gitlab.com/profile/applications"
    description: ""
    icon: ""

rabbitmq:
  auth:
    username: gitpod
    password: gitpod

I have also tried without flannel disabled and no calico.yaml applied. I am now getting images pulled, built and pushed for a workspace -after which it just seems to be hanging on “Pulling container image …” for a very long time - never seems to finish.

Lots of instances of this error:
"@type":"type.googleapis.com/google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent","serviceContext":{"service":"server","version":"0.9.0-alpha1"},"component":"server","severity":"ERROR","time":"2021-05-12T14:45:51.085Z","environment":"production","region":"local","message":"Error in fetching sampling strategy: Error: connect ECONNREFUSED 0.0.0.0:5778.","loggedViaConsole":true}

0.9.0-alpha1 seems not to work yet. At least in my setting, I run into this problem: Preview - /dev/net/tun - #11 by thomashansen

0.8.0 works as in this repo: GitHub - corneliusludmann/gitpod-k3s-droplet

I can confirm that 0.8.0 seems to work with the latest k3s. As far as I can get a workspace to start with a sample github workspace.

However, if I turn on preview to get the VS Code editor, then it stops working

I am guessing that the problems seen with 0.8.0 and having the preview features turned on are the same ones we are seeing with the 0.9.0-alpha1 release. Would that be correct?

Any expected ETA on a working 0.9.0 for self-hosted?

It seems to be working quite well in the hosted version. So I am hoping you are very close to having this ready for us to try as well. I am working on a project that could make very good use of this for enterprise application development - which could also be very good publicity for Gitpod :wink:

Looks like my latest test with 0.9.0-alpha3, using the latest k3s (1.20) and ubuntu 20.04, without calico is actually working! Wohoo!

Now to do some more testing.

Seems to broken again after this commit reverted the /dev/net/tun fix… Revert "[ws-manager] mknod /dev/net/tun" · gitpod-io/gitpod@2dbb391 · GitHub

Any idea why the /dev/net/tun fix was reverted?