Closed william-lbn closed 9 months ago
I got it. but I created cr, safekeeper is not ready.
root@node1:~/mysql# kubectl get pod -n database
NAME READY STATUS RESTARTS AGE
control-plane-f448dd9dd-zcrkf 1/1 Running 0 50s
safekeeper-0 0/1 CrashLoopBackOff 2 (29s ago) 50s
storage-broker-58ddbf57bf-sq4bd 1/1 Running 0 50s
root@node1:~/mysql#
root@node1:~/mysql#
root@node1:~/mysql#
root@node1:~/mysql# kubectl describe pod -n database safekeeper-0
Name: safekeeper-0
Namespace: database
Priority: 0
Node: node3/10.10.10.14
Start Time: Sun, 04 Feb 2024 11:22:18 +0800
Labels: app=safekeeper
controller-revision-hash=safekeeper-59db4498cc
statefulset.kubernetes.io/pod-name=safekeeper-0
Annotations: <none>
Status: Running
IP: 10.244.2.67
IPs:
IP: 10.244.2.67
Controlled By: StatefulSet/safekeeper
Containers:
safekeeper:
Container ID: docker://87643e24f6c59bb78a4157d646cfb9ade1a567ecefa49b302b2bd900fcbad084
Image: neondatabase/neon
Image ID: docker-pullable://neondatabase/neon@sha256:c7eb8f97957105ff1015b20c092ad2a4f8cf20639727a4f3ae63f20489227357
Ports: 5454/TCP, 7676/TCP
Host Ports: 0/TCP, 0/TCP
Command:
safekeeper
--listen-pg=0.0.0.0:5454
--listen-http=0.0.0.0:7676
--id=$(SAFEKEEPER_ID)
--broker-endpoint=http://storage-broker.database.svc.cluster.local:50051
-D
/data
--remote-storage={endpoint='http://120.26.194.43:31950',bucket_name='neon-db',bucket_region='',prefix_in_bucket='neondb'}
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: Error
Exit Code: 2
Started: Sun, 04 Feb 2024 11:23:13 +0800
Finished: Sun, 04 Feb 2024 11:23:13 +0800
Ready: False
Restart Count: 3
Limits:
cpu: 100m
memory: 200Mi
Requests:
cpu: 100m
memory: 200Mi
Readiness: http-get http://:7676/v1/status delay=5s timeout=1s period=5s #success=1 #failure=3
Environment:
SAFEKEEPER_ID: (v1:metadata.labels['apps.kubernetes.io/pod-index'])
AWS_ACCESS_KEY_ID: <set to the key 'AWS_ACCESS_KEY_ID' in secret 'neon-storage-credentials'> Optional: false
AWS_SECRET_ACCESS_KEY: <set to the key 'AWS_SECRET_ACCESS_KEY' in secret 'neon-storage-credentials'> Optional: false
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-nfkn2 (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
kube-api-access-nfkn2:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional: <nil>
DownwardAPI: true
QoS Class: Guaranteed
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 83s default-scheduler Successfully assigned database/safekeeper-0 to node3
Normal Pulled 30s (x4 over 82s) kubelet Container image "neondatabase/neon" already present on machine
Normal Created 29s (x4 over 81s) kubelet Created container safekeeper
Normal Started 28s (x4 over 80s) kubelet Started container safekeeper
Warning BackOff 1s (x11 over 78s) kubelet Back-off restarting failed container
root@node1:~/mysql#
could you do me a favor? Here is the file for cr.yaml and I deployed minio in my k8s cluster.
apiVersion: v1
kind: Namespace
metadata:
name: database
---
apiVersion: neon.tech/v1alpha1
kind: NeonDeployment
metadata:
name: deployment-sample
namespace: database
spec:
enableNeonProxy: true
enableAutoScaling: false
storageConfig:
endpoint: "http://10.107.49.185:9000"
bucketName: "neon-db"
bucketRegion: ""
prefixInBucket: "neondb"
credentials:
awsAccessKeyID: "92BZGpiRbjtEhdr1fDBd"
awsSecretAccessKey: "tTBPN0z6NyxT3g8qCr72Tyer03Lit6sKSrp7ZSjT"
controlPlane:
replicas: 1
pageServer:
replicas: 3
image: neondb/pageserver:latest
# imagePullPolicy: Always
# resources:
# limits:
# cpu: 100m
# memory: 100Mi
# requests:
# cpu: 100m
# memory: 100Mi
safeKeeper:
replicas: 3
image: neondb/safekeeper:latest
# imagePullPolicy: Always
# resources:
# limits:
# cpu: 100m
# memory: 100Mi
# requests:
# cpu: 100m
# memory: 100Mi
computeNode:
replicas: 3
image: neondatabase/compute-node-v16
# imagePullPolicy: Always
# resources:
# limits:
# cpu: 100m
# memory: 100Mi
# requests:
# cpu: 100m
# memory: 100Mi
storageBroker:
replicas: 1
image: neondb/storagebroker:latest
# imagePullPolicy: Always
# resources:
# limits:
# cpu: 100m
# memory: 100Mi
# requests:
# cpu: 100m
# memory: 100Mi
I deployed minio in my k8s cluster. I don't know how to configure these two values (bucketRegion,prefixInBucket). I'm not sure if this is the problem,But I tested that it is possible to upload files.
Is there a problem with my operation?
I only deployed crd.yaml and deploy-operator.yaml