EDITD / kubetools

:nut_and_bolt: Kubetools is a tool and processes for developing and deploying microservices to Kubernetes.
MIT License
13 stars 2 forks source link

[BUG] - Kubetools v13.9.0 doesn't support Kubernetes versions prior to v1.21 #130

Open DilaraOflaz opened 2 years ago

DilaraOflaz commented 2 years ago

Describe the bug Kubetools v13.9.0 doesn't support Kubernetes versions prior to v1.21+

To Reproduce If you have a Kubernetes version prior to v1.21 installed, here is how to reproduce the behavior:

Expected behavior

kubernetes.client.exceptions.ApiException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Server': 'openresty/1.15.8.1', 'Date': 'Wed, 22 Jun 2022 11:13:02 GMT', 'Content-Type': 'application/json', 'Content-Length': '174', 'Connection': 'keep-alive', 'Audit-Id': '', 'X-Content-Type-Options': 'nosniff', 'Strict-Transport-Security': 'max-age=15724800; includeSubDomains'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"the server could not find the requested resource","reason":"NotFound","details":{},"code":404}

Additional context CronJob apiVersion: batch/v1 is supported by Kubernetes version v1.21+, here is the doc For lower versions we have to use apiVersion: batch/v1beta1 The latest version that supports apiVersion: batch/v1beta1 is v1.24+, here is the doc