busy-judge-4614
03/28/2023, 11:09 AMaloof-hair-13897
03/28/2023, 12:16 PM/var/lib/kubelet/pods/8230ce89-2723-432d-8a3c-35431ea7342c/volumes/kubernetes.io~csi/media-store/mount
but just curious about why do you want to do this?busy-judge-4614
03/28/2023, 12:18 PMrefined-analyst-8898
03/28/2023, 1:00 PMdocker build
, and if you're building VM images you can use packer build
. In fact, you can use Packer to build container images too. It's versatile like that.busy-judge-4614
03/28/2023, 1:49 PMrefined-analyst-8898
03/28/2023, 2:38 PMDockerfile
that you can customize then run docker build -t myContainerImage .
in the same directory. If you're using #rancher-desktop with the same container runtime as Docker, then you I believe you can deploy your new image immediately in the K3s Kubernetes cluster running in #rancher-desktop, e.g. kubectl run --stdin --tty --rm myContainerImage --image=<http://docker.io/library/myContainerImage|docker.io/library/myContainerImage> --restart=Never -- sh
, or a more useful container command than sh
.nerdctl build
, and Moby needs docker build
.--image-pull-policy=Never
to your run
command to prevent K3s from trying to download the image from Docker Hub. That will force it to try to load the image from your local build cache. Here are the instructions: https://docs.rancherdesktop.io/tutorials/working-with-images/busy-judge-4614
03/30/2023, 3:56 PM### media.sonarr.values.yml
replicaCount: 1
image:
repository: linuxserver/sonarr
tag: arm32v7-latest # ARM image
pullPolicy: IfNotPresent
env:
- name: PUID
value: "1000"
- name: PGID
value: "1000"
service:
type: ClusterIP
port: 80
volumes:
- name: media-ssd
persistentVolumeClaim:
claimName: "media-ssd" # PersistentVolumeClaim created earlier
volumeMounts:
- name: media-ssd
mountPath: "/config"
subPath: "configs/sonarr" # Path /mnt/ssd/media/configs/sonarr where sonarr writes the configuration
- name: media-ssd
mountPath: "/downloads/transmission"
subPath: "downloads/transmission" # Path /mnt/ssd/media/downloads/transmission where sonarr picks up downloaded episodes
- name: media-ssd
mountPath: "/tv"
subPath: "library/tv" # Path /mnt/ssd/media/library/tv where sonarr moves and renames the episodes
Name: sonarr-cc6764857-rlftx
Namespace: media
Priority: 0
Service Account: default
Node: k4/192.168.1.223
Start Time: Thu, 30 Mar 2023 17:22:55 +0100
Labels: app=sonarr
pod-template-hash=cc6764857
release=sonarr
Annotations: <none>
Status: Pending
IP:
IPs: <none>
Controlled By: ReplicaSet/sonarr-cc6764857
Containers:
sonarr:
Container ID:
Image: linuxserver/sonarr:latest
Image ID:
Port: 8989/TCP
Host Port: 0/TCP
State: Waiting
Reason: ContainerCreating
Ready: False
Restart Count: 0
Limits:
cpu: 500m
memory: 256Mi
Requests:
cpu: 100m
memory: 128Mi
Environment:
PUID: 1000
PGID: 1000
Mounts:
/config from media-store (rw,path="configs/sonarr")
/downloads/transmission from media-store (rw,path="downloads/transmission")
/tv from media-store (rw,path="library/tv")
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-k67nq (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
media-store:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: media-store
ReadOnly: false
kube-api-access-k67nq:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional: <nil>
DownwardAPI: true
QoS Class: Burstable
Node-Selectors: <none>
Tolerations: <http://node.kubernetes.io/not-ready:NoExecute|node.kubernetes.io/not-ready:NoExecute> op=Exists for 300s
<http://node.kubernetes.io/unreachable:NoExecute|node.kubernetes.io/unreachable:NoExecute> op=Exists for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 99s default-scheduler Successfully assigned media/sonarr-cc6764857-rlftx to k4
Warning FailedMount 99s kubelet Unable to attach or mount volumes: unmounted volumes=[kube-api-access-k67nq media-store], unattached volumes=[kube-api-access-k67nq media-store]: error processing PVC media/media-store: failed to fetch PVC from API server: persistentvolumeclaims "media-store" is forbidden: User "system:node:k4" cannot get resource "persistentvolumeclaims" in API group "" in the namespace "media": no relationship found between node 'k4' and this object
Warning FailedAttachVolume 99s attachdetach-controller Multi-Attach error for volume "media-store" Volume is already used by pod(s) transm-transmission-openvpn-8674c9b55c-j2scq, jackett-67fccb78c8-jjdq6
17:24@kubernetes:~$
helm install sonarr bananaspliff/sonarr \
--values media.sonarr.values.yaml \
--namespace media