You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like the CRD wasn't created properly. Can you restart the operator and see if it recreates? If not there may be an RBAC permissions issue where it cannot create crd's in your cluster.
$ kubectl apply -f elasticsearch-cluster.yaml
$ kubectl get pods -n logging
NAME READY STATUS RESTARTS AGE
elasticsearch-operator-6db688bc67-f67vs 1/1 Running 0 53s
fluent-bit-2kb5s 1/1 Running 1 17h
fluent-bit-7zc6m 1/1 Running 1 17h
fluent-bit-n4wmr 1/1 Running 2 17h
fluent-bit-xxs69 1/1 Running 1 5h13m
$ kubectl explain elasticsearchclusters
error: Couldn't find resource for "enterprises.upmc.com/v1, Kind=ElasticsearchCluster"
$ kubectl apply -f elasticsearch-cluster.yaml
$ kubectl get pods -n logging
NAME READY STATUS RESTARTS AGE
elasticsearch-operator-6db688bc67-f67vs 1/1 Running 0 53s
fluent-bit-2kb5s 1/1 Running 1 17h
fluent-bit-7zc6m 1/1 Running 1 17h
fluent-bit-n4wmr 1/1 Running 2 17h
fluent-bit-xxs69 1/1 Running 1 5h13m
$ vim elasticsearch-operator.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: elasticsearch-operator
namespace: logging
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: elasticsearch-operator
rules:
resources: ["deployments", "replicasets", "daemonsets"]
verbs: ["create", "get", "update", "delete", "list"]
resources: ["customresourcedefinitions"]
verbs: ["create", "get", "update", "delete", "list"]
resources: ["storageclasses"]
verbs: ["get", "list", "create", "delete", "deletecollection"]
resources: ["persistentvolumes", "persistentvolumeclaims", "services", "secrets", "configmaps"]
verbs: ["create", "get", "update", "delete", "list"]
resources: ["cronjobs", "jobs"]
verbs: ["create", "get", "deletecollection", "delete"]
resources: ["pods"]
verbs: ["list", "get", "watch"]
resources: ["statefulsets", "deployments"]
verbs: ["*"]
resources: ["elasticsearchclusters"]
verbs: ["*"]
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: elasticsearch-operator
namespace: logging
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: elasticsearch-operator
subjects:
name: elasticsearch-operator
namespace: logging
apiVersion: apps/v1
kind: Deployment
metadata:
name: elasticsearch-operator
namespace: logging
spec:
replicas: 1
selector:
matchLabels:
app: elasticsearch-operator
template:
metadata:
name: elasticsearch-operator
namespace: logging
labels:
app: elasticsearch-operator
spec:
containers:
- name: elasticsearch-operator
image: upmcenterprises/elasticsearch-operator:0.2.0
imagePullPolicy: IfNotPresent
env:
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
ports:
- name: http
containerPort: 8000
livenessProbe:
httpGet:
path: /live
port: 8000
initialDelaySeconds: 10
timeoutSeconds: 10
readinessProbe:
httpGet:
path: /ready
port: 8000
initialDelaySeconds: 10
timeoutSeconds: 5
resources:
requests:
memory: 128Mi
cpu: 100m
limits:
memory: 128Mi
cpu: 100m
serviceAccountName: elasticsearch-operator
The text was updated successfully, but these errors were encountered: