You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "chethankumar4046 (via GitHub)" <gi...@apache.org> on 2023/07/29 06:30:29 UTC
[GitHub] [kvrocks] chethankumar4046 created a discussion: Add PVC to Kvrocks POD in k8s
GitHub user chethankumar4046 created a discussion: Add PVC to Kvrocks POD in k8s
```
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: kvrocks-data-path-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storageClassName: topolvm-provisioner
volumeMode: Filesystem
---
apiVersion: v1
kind: Secret
metadata:
name: cache-secret
immutable: false
stringData:
REDIS_PASSWORD: password
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
app: cache-new
name: cache-new
spec:
replicas: 1
selector:
matchLabels:
app: cache-new
serviceName: cache-new-service
template:
metadata:
labels:
app: cache-new
spec:
containers:
- args:
- --requirepass
- $(REDIS_PASSWORD)
- --port
- '6379'
env:
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
key: REDIS_PASSWORD
name: cache-secret
image: apache/kvrocks
imagePullPolicy: Always
name: cache-new
ports:
- containerPort: 6379
protocol: TCP
volumeMounts:
- mountPath: /var/lib/kvrocks
name: kvrocks-data
imagePullSecrets:
- name: registrycred
initContainers:
- command:
- sh
- -c
- if [ -z "$(ls -A /var/lib/kvrocks)" ]; then cp -r /var/lib/kvrocks/* /data/; fi
image: apache/kvrocks
name: kvrocks-data
volumeMounts:
- mountPath: /data
name: kvrocks-data
volumes:
- name: kvrocks-data
persistentVolumeClaim:
claimName: kvrocks-data-path-pvc
---
apiVersion: v1
kind: Service
metadata:
name: cache-new
spec:
ports:
- name: redis
port: 6379
targetPort: 6379
selector:
app: cache-new
type: ClusterIP
```
GitHub link: https://github.com/apache/kvrocks/discussions/1620
----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org
[GitHub] [kvrocks] chethankumar4046 added a comment to the discussion: Add PVC to Kvrocks POD in k8s
Posted by "chethankumar4046 (via GitHub)" <gi...@apache.org>.
GitHub user chethankumar4046 added a comment to the discussion: Add PVC to Kvrocks POD in k8s
@tisonkun Not sure how to add, it But this is my solution for issue whoever face issue while mount PVC to pod
GitHub link: https://github.com/apache/kvrocks/discussions/1620#discussioncomment-6581631
----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org
[GitHub] [kvrocks] chethankumar4046 added a comment to the discussion: Add PVC to Kvrocks POD in k8s
Posted by "chethankumar4046 (via GitHub)" <gi...@apache.org>.
GitHub user chethankumar4046 added a comment to the discussion: Add PVC to Kvrocks POD in k8s
yes
GitHub link: https://github.com/apache/kvrocks/discussions/1620#discussioncomment-6581698
----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org
[GitHub] [kvrocks] tisonkun added a comment to the discussion: Add PVC to Kvrocks POD in k8s
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
GitHub user tisonkun added a comment to the discussion: Add PVC to Kvrocks POD in k8s
Please add some description for your concrete issues or objects. Pasting a code snippet only is confusing.
GitHub link: https://github.com/apache/kvrocks/discussions/1620#discussioncomment-6581290
----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org
[GitHub] [kvrocks] tisonkun added a comment to the discussion: Add PVC to Kvrocks POD in k8s
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
GitHub user tisonkun added a comment to the discussion: Add PVC to Kvrocks POD in k8s
Thanks for your reply. So it's not an issue but you want to share your solution and everyone can make use of it?
GitHub link: https://github.com/apache/kvrocks/discussions/1620#discussioncomment-6581670
----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org
[GitHub] [kvrocks] tisonkun added a comment to the discussion: Add PVC to Kvrocks POD in k8s
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
GitHub user tisonkun added a comment to the discussion: Add PVC to Kvrocks POD in k8s
Cool. Thank you ٩(๑•̀ω•́๑)۶
GitHub link: https://github.com/apache/kvrocks/discussions/1620#discussioncomment-6581872
----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org