Hi,
Can we make a wish list for k8s recipes? I think here in the Forum or on the GitHub?
Then sameone can support for the most importand wishes.
Hi,
Can we make a wish list for k8s recipes? I think here in the Forum or on the GitHub?
Then sameone can support for the most importand wishes.
Sure, but the community is responsible for contributing the recipes; it is not my job to do everything on my own. Otherwise I have to think about making OMV commercial to have all the time that is necessary for that.
Otherwise I have to think about making OMV commercial
And I hope that never happens. I don't like TrueNAS
Can we make a wish list for k8s recipes? I think here in the Forum or on the GitHub?
Then sameone can support for the most importand wishes.
I think we have a good list of compose files for the compose plugin. You could just convert the compose file to a recipe with Kompose.
Is there going to be a dedicated thread for "Kubernetes Recipes" ? Anyone going to offer support for beginners, or are you on your own?
@ryecoarron Using "Kompose" to convert a docker-compose file doesn't support host bind mounts for volumes, so does automatically produce something that can be concatentated into the format which I think is required for a "recipe" as used in OMV. Then there are Nodeports to sort out and/or ingress, etc. In other words, not exactly a simple "convert" process.
Just as an example, take https://github.com/OpenMediaVa…r/logitechmediaserver.yml
---
# https://hub.docker.com/r/lmscommunity/logitechmediaserver
services:
lms:
container_name: lms
image: lmscommunity/logitechmediaserver
volumes:
- CHANGE_TO_COMPOSE_DATA_PATH/lms/config:/config:rw
- CHANGE_TO_COMPOSE_DATA_PATH/lms/music:/music:ro
- CHANGE_TO_COMPOSE_DATA_PATH/lms/playlist:/playlist:rw
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
ports:
- 9000:9000/tcp
- 9090:9090/tcp
- 3483:3483/tcp
- 3483:3483/udp
restart: unless-stopped
Alles anzeigen
Kompose replaces the host "/etc/localtime" & "/etc/timezone" bind mounts with pvc yaml. And you have to take care of clashes with ports in use. Actually there's an alternative docker-compose that avoids the timezone and possible port clash problems, e.g.:
# https://hub.docker.com/r/lmscommunity/logitechmediaserver
services:
lms:
container_name: lms
image: lmscommunity/logitechmediaserver
volumes:
- CHANGE_TO_COMPOSE_DATA_PATH/lms/config:/config:rw
- CHANGE_TO_COMPOSE_DATA_PATH/lms/music:/music:ro
- CHANGE_TO_COMPOSE_DATA_PATH/lms/playlist:/playlist:rw
ports:
- 9000:9000/tcp
- 9090:9090/tcp
- 3483:3483/tcp
- 3483:3483/udp
environment:
- HTTP_PORT=9002
- TZ=Europe/London
restart: unless-stopped
Alles anzeigen
Knowing very little about Kubernetes the only sense I could make of this was to re-use parts of what "kompose convert" produced and compare it to the working Jellyfin recipe.
After ironing out the yaml syntax errors, the recipe was applied but the ports need sorting out, so its work in progress as the container appears to have crashed:
root@omv6vm:~# kubectl get pods,svc,daemonsets,deployments,statefulset,sc,pvc,job -n lms-app
NAME READY STATUS RESTARTS AGE
pod/lms-6578f697cd-bg8kc 0/1 CrashLoopBackOff 7 (50s ago) 12m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/lms NodePort 10.43.255.158 <none> 9002:31084/TCP,9090:31826/TCP,3483:31357/TCP,3483:31357/UDP 7m1s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/lms 0/1 1 0 12m
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
storageclass.storage.k8s.io/local-path (default) rancher.io/local-path Delete WaitForFirstConsumer false 25h
storageclass.storage.k8s.io/shared-folder rancher.io/local-path Retain WaitForFirstConsumer false 25h
root@omv6vm:~#
Alles anzeigen
For reference my "recipe" is:
# The app can be reached at ...
---
apiVersion: v1
kind: Namespace
metadata:
name: lms-app
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/instance: lms
app.kubernetes.io/name: lms
name: lms
namespace: lms-app
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/instance: lms
app.kubernetes.io/name: lms
strategy:
type: Recreate
template:
metadata:
labels:
app.kubernetes.io/instance: lms
app.kubernetes.io/name: lms
spec:
containers:
- image: docker.io/lmscommunity/logitechmediaserver:latest
imagePullPolicy: IfNotPresent
name: lms
ports:
- containerPort: 9002
hostPort: 9002
protocol: TCP
- containerPort: 9090
hostPort: 9090
protocol: TCP
- containerPort: 3483
hostPort: 3483
protocol: TCP
- containerPort: 3483
hostPort: 3483
protocol: UDP
securityContext:
runAsNonRoot: false
# Specifies the UID for the process running in the container.
runAsUser: {{ uid('chris') }} # <<< Replace
# Specifies the GID for the process running in the container.
# Defaults to `users`.
runAsGroup: {{ gid('users') }} # <<< Replace if needed
volumeMounts:
- name: config
mountPath: /config
- name: music
mountPath: /music
- name: playlist
mountPath: /playlist
env:
- name: HTTP_PORT
value: "9002"
- name: TZ
value: Europe/London
restartPolicy: Always
volumes:
- name: config
hostPath:
type: Directory
# Insert the name of the shared folder you want to use.
# Make sure the configured UID/GID the container is running
# with has access to that directory.
path: {{ sharedfolder_path('Lmsconfig') }} # <<< Replace
- name: music
hostPath:
type: Directory
# Insert the name of the shared folder you want to use.
# Make sure the configured UID/GID the container is running
# with has access to that directory.
path: {{ sharedfolder_path('music') }} # <<< Replace
- name: playlist
hostPath:
type: Directory
# Insert the name of the shared folder you want to use.
# Make sure the configured UID/GID the container is running
# with has access to that directory.
path: {{ sharedfolder_path('playlist') }} # <<< Replace
---
apiVersion: v1
kind: Service
metadata:
name: lms
namespace: lms-app
labels:
app.kubernetes.io/instance: lms
app.kubernetes.io/name: lms
spec:
type: NodePort
ports:
- name: "9002"
port: 9002
targetPort: 9002
- name: "9090"
port: 9090
targetPort: 9090
- name: "3483"
port: 3483
targetPort: 3483
- name: 3483-udp
port: 3483
protocol: UDP
targetPort: 3483
selector:
app.kubernetes.io/instance: lms
app.kubernetes.io/name: lms
Alles anzeigen
The "Kubernetes dashboard" is the biz. A quick edit/restart of the deployment got LMS running in kubernetes . The container does not seem to like running as anything but root in this context, that was obvious when looking at the pod logs.
root@omv6vm:~# kubectl get pods,svc,daemonsets,deployments,statefulset,sc,pvc,job -n lms-app
NAME READY STATUS RESTARTS AGE
pod/lms-6947fbd478-rndfc 1/1 Running 0 17m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/lms NodePort 10.43.255.158 <none> 9002:31084/TCP,9090:31826/TCP,3483:31357/TCP,3483:31357/UDP 69m
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/lms 1/1 1 1 75m
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
storageclass.storage.k8s.io/local-path (default) rancher.io/local-path Delete WaitForFirstConsumer false 26h
storageclass.storage.k8s.io/shared-folder rancher.io/local-path Retain WaitForFirstConsumer false 26h
root@omv6vm:~#
Alles anzeigen
The HTTP_PORT env variable is redundant in this context as the NodePort range is 30000 to 32767.
LMS server is visible at http://<omv ip>:31084 in this case and a "squeezelite player" running on a different host on the same subnet connects to the LMS instance and all is sweet music.
Using "Kompose" to convert a docker-compose file doesn't support host bind mounts for volumes, so does automatically produce something that can be concatentated into the format which I think is required for a "recipe" as used in OMV. Then there are Nodeports to sort out and/or ingress, etc. In other words, not exactly a simple "convert" process.
I didn't say it would be simple. I just said it is a helpful tool and can convert a compose file. kubernetes is complicated.
Knowing very little about Kubernetes the only sense I could make of this was to re-use parts of what "kompose convert" produced and compare it to the working Jellyfin recipe.
I'm sorry I recommended a tool that doesn't do everything for you. I have used it a few times without having to change hardly anything.
I didn't say it would be simple. I just said it is a helpful tool and can convert a compose file. kubernetes is complicated.
I'm sorry I recommended a tool that doesn't do everything for you. I have used it a few times without having to change hardly anything.
Not one of your magic one-liners then?
I think we have a good list of compose files for the compose plugin. You could just convert the compose file to a recipe with Kompose.
But you've got to admit you made it sound simple.
Clearly, the joke about kubernetes is for people who think docker is too easy is no joke. I'm not sure as an old dog I can learn these new tricks.
But you've got to admit you made it sound simple.
I use one sentence and that means simple? In my defense, the few compose files I converted with kompose went well and the process was simple. I guess I should've said kompose is useful when you have some k8s experience not for learning k8s.
Seen through the eyes of non-developer votdev has certainly provided an interesting way of getting you kubernetes feet wet. But I don't know what to make of the lack of kubernetes traffic on the forum.
But I don't know what to make of the lack of kubernetes traffic on the forum.
A lot of the people on the forum think docker is very complicated. k8s is much more complicated even with the plugin. Look how much people complained when moving from portainer to the compose plugin. Moving to k8s is a much larger change and people will likely avoid it unless forced.
people will likely avoid it unless forced
I think the principle can be applied here: "If something works, don't change it". Or the other famous phrase "Keep it simple, stupid"
So, can I ask what is the advantage that kubernetes provides over docker? (I confess that I have not read anything about kubernetes yet)
So, can I ask what is the advantage that kubernetes provides over docker?
I answer myself, after reading some articles it seems that kubernetes is designed to orchestrate large-scale groups of containers in a cluster of servers. So for now I think I'll stick with docker... unless someone provides some obvious advantage that I'm not seeing.
is designed to orchestrate large-scale groups of containers in a cluster of servers.
I believe its underlying feature is furthering isolation specifically for networking IPC. Docker was seemingly designed more as a sandbox. For Kuberenets, think COBRA setup on ACE for a containerized environment. If that's even close, then Kubernetes usage is highly commercial or for large scale projects like SETI or HGP, it really isn't for a home user.
what is the advantage that kubernetes provides over docker?
To the typical OMV user, absolutely none. It's simply not worth writing recipes for. To be fair, it does appear that the Kubernetes plugin was added out of personal preference and as always an extra option doesn't hurt.
Top 3 OMV application requests, does the option of a Kubernetes plugin satisfy any of them?
1. Full screen width!!! (rarity: legendary)
2. Downloaders (rarity: uncommon)
3. Proper HDD spindown (rarity: common)
There's also "Where's my RAID?" and "Where's my files?", but no application can help these.
kubernetes was originally meant for groups of servers but k3s is designed to run on an IOT node. So, it isn't unreasonable to run it for very small scale projects.
kubernetes makes it easier to run rootless than docker.
kubernetes improves networking by grouping containers that need to talk to each in a pod together. This can be done in docker/compose but kubernetes is actually easier.
kubernetes allows multiple copies of a container for scaling. Probably not a need for most home users but neat.
As I suspected. the reaction to volker creating a Kubernetes plugin seems to have been lukewarm. A pity, and disappointing for anyone like the OP happyreacer who was hoping for an exchange of ideas about possible "recipes", nor does it say much for the hopes of community participation as expressed by votdev
The reasons to stick with what you know and what works are plentiful, but like the OP I was interested in an exchange of ideas.
Yes that is sad. Maybe it will take some time to get some reactions. For myself I will stay on k8s and will add some recipes from time to time for apps i am using myself.
for me dockers way is enought for home users, but have no problem that K8 pluging exist, other power users / proffesional grade, can benefit from it.
Actually I have no plans to use/test K8 plugin.
Yes that is sad. Maybe it will take some time to get some reactions. For myself I will stay on k8s and will add some recipes from time to time for apps i am using myself.
Perhaps more interest in using Kubernetes would be generated if one of those future recipes was for a popular, but complex docker.
For anyone looking at the LMS recipe I talked about above, I stupidly left off the PUID and PGID env variables in the deployment which is why the container would only run as root. It's simple to edit and restart deployments via the kubernetes dashboard. AFAIU, the dashboard for containers. compares to Portainer for docker.
for me dockers way is enought for home users, but have no problem that K8 pluging exist, other power users / proffesional grade, can benefit from it.
Actually I have no plans to use/test K8 plugin.
I don't believe you have to be in one of the "power users / proffesional grade" groups to benefit from the kubernetes plugin. As per volker's original 9. March 2024 post
ZitatThese recipes are intended to serve as a template for installing known applications without any great knowledge of Kubernetes. These can then be based on Helm charts or, for example, simply on deployments. However, the aim is always to make the configuration as simple as possible for the user
So raulfg3 change your plans, install the plugin get the Kubernetes dashboard up, apply an example recipe, say the FileBrowser, and poke around in the dashboard to see what it gives you. You can compare it to Portainer and from an opinion.
for me dockers way is enought for home users, but have no problem that K8 pluging exist, other power users / proffesional grade, can benefit from it.
Actually I have no plans to use/test K8 plugin.
I'm similar, I watch quite a few youtubes on k8, but I always come away thinking thats more hassle then I'm willing to learn or use, especially as Docker does what I want.
I don't really use VMs either but have been looking at lxc's and watching some video's about the fork to Incus, not sure if Incus will be built into kvm plugin (or even needed) or even if it's safe to install it as OMV is debian based.
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!