While installing influxdb2 using k8s manifest from the link influxdb2 installation on k8s
I get below "pod has unbound immediate PersistentVolumeClaims
" error.
The instruction is given for minikube but I am installing it as a normal k8s cluster. Any idea about the issue and how to fix.
/home/ravi#kubectl describe pod influxdb-0 -n influxdb
Name: influxdb-0
Namespace: influxdb
Priority: 0
Node: <none>
Labels: app=influxdb
controller-revision-hash=influxdb-78bc684b99
statefulset.kubernetes.io/pod-name=influxdb-0
Annotations: <none>
Status: Pending
IP:
IPs: <none>
Controlled By: StatefulSet/influxdb
Containers:
influxdb:
Image: influxdb:2.0.6
Port: 8086/TCP
Host Port: 0/TCP
Environment: <none>
Mounts:
/var/lib/influxdb2 from data (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-k9d8t (ro)
Conditions:
Type Status
PodScheduled False
Volumes:
data:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: data-influxdb-0
ReadOnly: false
default-token-k9d8t:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-k9d8t
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling <unknown> default-scheduler pod has unbound immediate PersistentVolumeClaims
Warning FailedScheduling <unknown> default-scheduler pod has unbound immediate PersistentVolumeClaims
/home/ravi#
influx db2 yaml file
---
apiVersion: v1
kind: Namespace
metadata:
name: influxdb
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
app: influxdb
name: influxdb
namespace: influxdb
spec:
replicas: 1
selector:
matchLabels:
app: influxdb
serviceName: influxdb
template:
metadata:
labels:
app: influxdb
spec:
containers:
- image: influxdb:2.0.6
name: influxdb
ports:
- containerPort: 8086
name: influxdb
volumeMounts:
- mountPath: /var/lib/influxdb2
name: data
volumeClaimTemplates:
- metadata:
name: data
namespace: influxdb
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10G
---
apiVersion: v1
kind: Service
metadata:
name: influxdb
namespace: influxdb
spec:
ports:
- name: influxdb
port: 8086
targetPort: 8086
selector:
app: influxdb
type: ClusterIP
k8s version
/home/ravi#kubectl version
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.0", GitCommit:"2bd9643cee5b3b3a5ecbd3af49d09018f0773c77", GitTreeState:"clean", BuildDate:"2019-09-18T14:36:53Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.0", GitCommit:"2bd9643cee5b3b3a5ecbd3af49d09018f0773c77", GitTreeState:"clean", BuildDate:"2019-09-18T14:27:17Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
/home/ravi>sudo kubectl get pvc -A
NAMESPACE NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
influxdb data-influxdb-0 Pending 4h41m
ricplt pvc-ricplt-alarmmanager Bound pv-ricplt-alarmmanager 100Mi RWO local-storage 5h17m
ricplt pvc-ricplt-e2term-alpha Bound pv-ricplt-e2term-alpha 100Mi RWO local-storage 5h18m
ricplt r4-influxdb-influxdb2 Pending 32m
/home/ravi>
/home/ravi>
/home/ravi>
/home/ravi>sudo kubectl describe pvc data-influxdb-0 -n influxdb
Name: data-influxdb-0
Namespace: influxdb
StorageClass:
Status: Pending
Volume:
Labels: app=influxdb
Annotations: <none>
Finalizers: [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode: Filesystem
Mounted By: influxdb-0
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal FailedBinding 2m12s (x1021 over 4h17m) persistentvolume-controller no persistent volumes available for this claim and no storage class is set
/home/ravi>