Asking for help? Comment out what you need so we can get more information to help you!
Cluster information:
Kubernetes version: Major:“1”, Minor:“17”
Cloud being used: bare-metal
Installation method: minikube with kubectl
Host OS: Ubuntu 16.04
I’m creating 3 replicas and gonna create JSON set in one of the pod. the data can accessed within that pod only. My question is how to access the same set and get it from another pod.
Here is YAML file.
apiVersion: v1
kind: Service
metadata:
name: rejson
spec:
ports:
- port: 6379
selector:
app: rejson
---
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
name: rejson
spec:
replicas: 3
selector:
matchLabels:
app: rejson
strategy:
type: Recreate
template:
metadata:
labels:
app: rejson
spec:
containers:
- image: redislabs/rejson
args: ["--appendonly", "yes", "--save", "900", "1", "--save", "30", "2", "--loadmodule", "/usr/lib/redis/modules/rejson.so"]
name: rejson
ports:
- containerPort: 6379
name: rejson
volumeMounts:
- name: rejson-persistent-storage
mountPath: /data
volumes:
- name: rejson-persistent-storage
persistentVolumeClaim:
claimName: rejson-pv-claim
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: rejson-pv-claim
labels:
app: rejson
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
Please Help me ASAP.