gluster / gluster-kubernetes

GlusterFS Native Storage Service for Kubernetes
Apache License 2.0
874 stars 390 forks source link

no matches for kind "DaemonSet" in version "extensions/v1beta1" #627

Open freeeflyer opened 4 years ago

freeeflyer commented 4 years ago

gk-deploy outputs the message :

Deploying GlusterFS pods.
sed -e 's/storagenode\: glusterfs/storagenode\: 'glusterfs'/g' /root/kube/gluster-kubernetes/deploy/kube-templates/glusterfs-daemonset.yaml | /usr/bin/kubectl -n gk create -f - 2>&1
error: unable to recognize "STDIN": no matches for kind "DaemonSet" in version "extensions/v1beta1"
Waiting for GlusterFS pods to start ...
Checking status of pods matching '--selector=glusterfs=pod':

It seems that for v1.16+ we should use extensions/v1 and no more v1beta https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.16.md#deprecations-and-removals

sesopenko commented 4 years ago

According to the latest documentation for kubernetes 1.17 we'd use apps/v1 and not extensions/v1. See documentation entries for DaemonSet, Deployment

freeeflyer commented 4 years ago

I patched my version, this part seems to work. If I understand correctly, there is still a problem with travis-ci that prevent from merging the patch ?

MED-SALAH commented 4 years ago

I am using kubctl 1.18 and i try to execute this command, but i have this error. HOW I CAN FIX THAT PLEASE !!!!!!!!!!!!!!!!!

kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/a70459be0084506e4ec919aa1c114638878db11b/Documentation/kube-flannel.yml

ERRORS : no matches for kind "DaemonSet" in version "extensions/v1beta1"

danielnbalasoiu commented 4 years ago

Support for extensions/v1beta1 was removed in v1.16. Try replacing extensions/v1beta1 with apps/v1

k api-resources | grep -i daemon
daemonsets                        ds           apps                           true         DaemonSet
rlpatrao commented 4 years ago

I encountered the same thing and resolved it by :

apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: fluentd
  namespace: kube-system
  labels:
    k8s-app: fluentd-logging
    version: v1
    kubernetes.io/cluster-service: "true"
spec:
  selector:
    matchLabels:
      k8s-app: fluentd-logging
  template:
    metadata:
      labels:
        k8s-app: fluentd-logging
        version: v1
        kubernetes.io/cluster-service: "true"

notes:

  1. changed apiVersion to "apps/v1"
  2. added selector
    selector:
    matchLabels:
      k8s-app: fluentd-logging
  3. made sure that matchLabels selectors (e.g. k8s-app) name should match in spec and template. k8s-app: fluentd-logging
safaa-zahir commented 4 years ago

I am having the same problem, Can @rlpatrao where should I make this changes? Is it on a specific file ? Where can I find it ?

rlpatrao commented 4 years ago

Do you have a fluentd.yaml

freeeflyer commented 4 years ago

Is there any "power" user here to merge @sesopenko's correction ?

sesopenko commented 4 years ago

Is there any "power" user here to merge @sesopenko's correction ?

Code should never be merged with failing tests so this is unlikely to be merged until the build pipeline's sorted out. Sorry, but I don't have the resources at this point in time to sort out the build pipeline so we'll have to wait and see if the maintainers can find time to do so.

This project needs the equivalent of a full-time dev to keep up with the pace of changes in the kubernetes ecosystem.