gluster-kubernetes icon indicating copy to clipboard operation
gluster-kubernetes copied to clipboard

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

Open freeeflyer opened this issue 4 years ago • 9 comments

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

freeeflyer avatar Dec 19 '19 15:12 freeeflyer

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

sesopenko avatar Dec 29 '19 01:12 sesopenko

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 ?

freeeflyer avatar Jan 02 '20 09:01 freeeflyer

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"

MED-SALAH avatar May 09 '20 14:05 MED-SALAH

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

danielnbalasoiu avatar May 14 '20 14:05 danielnbalasoiu

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
  1. made sure that matchLabels selectors (e.g. k8s-app) name should match in spec and template. k8s-app: fluentd-logging

rlpatrao avatar May 18 '20 20:05 rlpatrao

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 ?

safaa-zahir avatar Jun 07 '20 13:06 safaa-zahir

Do you have a fluentd.yaml

rlpatrao avatar Jun 08 '20 02:06 rlpatrao

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

freeeflyer avatar Jun 08 '20 15:06 freeeflyer

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.

sesopenko avatar Jun 28 '20 03:06 sesopenko