Настройка Kubernetes для локального кластера из трех узлов.
Развертывание Plex:
kind: Deployment
apiVersion: apps/v1
metadata:
name: plex
labels:
app: plex
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
name: plex
template:
metadata:
labels:
name: plex
spec:
containers:
- name: plex
image: plexinc/pms-docker:plexpass
imagePullPolicy: Always
ports:
- containerPort: 32400
hostPort: 32400
volumeMounts:
- name: nfs-plex-meta
mountPath: "/data"
- name: nfs-plex
mountPath: "/config"
volumes:
- name: nfs-plex-meta
persistentVolumeClaim:
claimName: nfs-plex-meta
- name: nfs-plex
persistentVolumeClaim:
claimName: nfs-plex
Развертывание выполнено успешно. Pod счастлив.
Я пытался выставить Pod через NodePort, ClusterIP, HostPort, LoadBallancer (metalDB), и при каждой перестановке я получаю сообщение об отказе в соединении в браузере или через Curl.
Пример NodePort:
$ kubectl expose deployment plex --type=NodePort --name=plex
service/plex exposed
$ kubectl describe svc plex
Name: plex
Namespace: default
Labels: app=plex
Annotations: <none>
Selector: name=plex
Type: NodePort
IP: 10.111.13.7
Port: <unset> 32400/TCP
TargetPort: 32400/TCP
NodePort: <unset> 30275/TCP
Endpoints: 10.38.0.0:32400
Session Affinity: None
External Traffic Policy: Cluster
Events: <none>
$ curl 10.111.13.7:32400
curl: (7) Failed to connect to 10.111.13.7 port 32400: Connection refused
$ curl 10.38.0.0:32400
curl: (7) Failed to connect to 10.38.0.0 port 32400: Connection refused
$ curl 192.168.1.11:32400
curl: (7) Failed to connect to 192.168.1.110 port 32400: Connection refused
$ curl 192.168.1.11:30275
curl: (7) Failed to connect to 192.168.1.110 port 30275: Connection refused
Что мне здесь не хватает?