Kubernetes on OMV7

  • The netstat shows that the k3s process is working.

    But ports 8080, 8443, 4443 are not occupied by anyone.

    Code
    root@omv4-1:~# netstat -tulpn | grep 8080
    root@omv4-1:~# netstat -tulpn | grep 8443
    root@omv4-1:~# netstat -tulpn | grep 4443
  • On one of my hosts, I still cannot open Dashboard-web Kubernetes with error 404 page not found.

    The problem with this host is that it is only ipv6.

    If I open /#/services/k8s/resources/certificate in OMV, I get an error 500 - Internal Server Error. The full text of the error:

    Code
    Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; kubectl get 'certificates' --all-namespaces --no-headers --output json 2>/dev/null' with exit code '1': 
    
    OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; kubectl get 'certificates' --all-namespaces --no-headers --output json 2>/dev/null' with exit code '1':  in /usr/share/php/openmediavault/system/process.inc:247
    Stack trace:
    #0 /usr/share/openmediavault/engined/rpc/kubectl.inc(90): OMV\System\Process->execute()
    #1 [internal function]: Engined\Rpc\OMVRpcServiceKubectl->getList()
    #2 /usr/share/php/openmediavault/rpc/serviceabstract.inc(122): call_user_func_array()
    #3 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod()
    #4 /usr/sbin/omv-engined(535): OMV\Rpc\Rpc::call()
    #5 {main}

    And log in the archive from the Kubernetes. Can this be fixed? Thanks.

    k3s-log.zip

    • Official Post

    On one of my hosts, I still cannot open Dashboard-web Kubernetes with error 404 page not found.

    The problem with this host is that it is only ipv6.

    If I open /#/services/k8s/resources/certificate in OMV, I get an error 500 - Internal Server Error. The full text of the error:

    Code
    Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; kubectl get 'certificates' --all-namespaces --no-headers --output json 2>/dev/null' with exit code '1': 
    
    OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; kubectl get 'certificates' --all-namespaces --no-headers --output json 2>/dev/null' with exit code '1':  in /usr/share/php/openmediavault/system/process.inc:247
    Stack trace:
    #0 /usr/share/openmediavault/engined/rpc/kubectl.inc(90): OMV\System\Process->execute()
    #1 [internal function]: Engined\Rpc\OMVRpcServiceKubectl->getList()
    #2 /usr/share/php/openmediavault/rpc/serviceabstract.inc(122): call_user_func_array()
    #3 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod()
    #4 /usr/sbin/omv-engined(535): OMV\Rpc\Rpc::call()
    #5 {main}

    And log in the archive from the Kubernetes. Can this be fixed? Thanks.

    k3s-log.zip

    That is strange because OMV is installing k3s and all components according to their official documentation.

    Would be great if you could do some investigations to find the problem which could help to fix it. Thx.


    What hardware are you using? Maybe https://docs.k3s.io/installation/requirements and https://docs.k3s.io/known-issues may help.

    • Official Post

    votdev Please tell me what instructions did you use to add a Dashboard-web Kubernetes for k3s? Tnx.

    p.s. I will try to install k3s on debian with an only ipv6 host according to this https://qeba.medium.com/k3s-ip…configuration-8c159385a0a , and then install a Dashboard-web Kubernetes for k3s.

    You can find everything here: https://github.com/openmediava…eploy/k3s/default.sls#L38

  • I know zlich about kubernetes, but as votdev put a lot of work into this new plugin I installed it to see how easy it was for a complete kubernetes numpty to use. The answer is if you've got the right recipe then it's been made very simple to use.


    Some of the five example recipes make use of docker images and supposedly the "kompose" program can convert a docker compose file into kubernetes recipe, or least the ingredients. My example docker compose to convert is very simple:


    The kompose program turns volume binds to "/etc/localtime" and "/etc/timezone" into PVC and the example recipes for jellyfin, etc. only show the use of hostpath directory as "sharedfolder_path".


    So how do you link the host "etc/localtime" and "/etc/timezone" to the kubernetes deployment/service?

  • By default, when using important apps, you try to always relocate somewhere not / , becuase if your root devices is full,the app keeps on working ,etc ,etc.


    Edit: And since k8s is ecosystem, you try to shelter that ecosystem from others.

    I agree here too with a couple additional points.

    1. Since images are immutable, constantly changing and easily downloadable they don’t belong anywhere near my root drive and related backups

    2. Image size is volatile and with omv using the whole disk by default and favoring “minimal” installs it just feels like additional risk. K3s service availability should always be secondary to core OS services (otherwise wouldn’t you run k3os?)


    As for the filesystem dependency many of us running docker on omv already have this dependency and systemd seems to handle it quite well


    All that being said great idea and great plugin overall!

  • Tried to enable the plugin but I'm getting an error. any clue?

    Update: works now by adding cgroup_memory=1 cgroup_enable=memory in the /boot/cmdline.txt

  • Nice job.. I'm going to try to run about 17 apps in it. The question I have for now: I see "recipes" and "recipe". Is it possible for me to add my own recipes (preferable GIT) and maybe if they work contribute somehow? I did notice the recipes dir is a git repo. But it's not configurable is it? As in, use my own repo or even a fork?

    • Official Post

    Nice job.. I'm going to try to run about 17 apps in it. The question I have for now: I see "recipes" and "recipe". Is it possible for me to add my own recipes (preferable GIT) and maybe if they work contribute somehow? I did notice the recipes dir is a git repo. But it's not configurable is it? As in, use my own repo or even a fork?

    You can contribute recipes to https://github.com/openmediavault/openmediavault-k8s-recipes.

    The community will be happy about every new recipe.

    • Official Post

    Would it be possible to make the k3s version configurable? I'd like to run Rancher on it but I can't because it's too new.

    No, that's not possible. With the latest version it is fixed to v1.29.4 (see https://github.com/openmediava…725561a064529176edca63250). If you install any lower version, the backend will not be able to fetch the info that are displayed in the UI. Sorry.

  • Very interesting, useful and promising project!

    What would help enormously is a good installation guide. (The video on YouTube is useful, but without any commentary - or audio altogether - leaves many steps unclear).

    I tried installing the package twice, but no success so far.


    A list of the minimal number of steps, needed to obtain a working installation, and a very simple example of running one container (successfully) would be great!

    • New
    • Official Post

    Just a question, can docker & portainer run next to this "Kubernetes on OMV7" solution ?

    As long as there are no network conflicts, I don't see why not.

  • Hi there,


    k8s plug looks super interesting, but I'm not sure if my installation failed as kubectl isn't even installed (I think I saw a github network issue then installation kept going, but looking at the install script, it seems like a different issue).


    I tried removing the plugin, reinstalling, apt remove the k3s, manually installation the kubectl... I couldn't get the extension to work.


    After manually installating kubectl, trying the immich recipe, I get "

    500 - Internal Server Error

    Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LC_ALL=C.UTF-8; export LANGUAGE=; kubectl apply -f '/tmp/VRDoZc' 2>&1' with exit code '1': error: error validating "/tmp/VRDoZc": error validating data: failed to download openapi: Get "http://localhost:8080/openapi/v2?timeout=32s": dial tcp [::1]:8080: connect: connection refused; if you choose to ignore these errors, turn validation off with --validate=false"


    Which I must say as a new user, leaves me a little clueless as to where to dig next!

    To +1 pepsov 's point, a little more pointers/doc would be great.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!