Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extensions/v1beta1 api version deprecated after Kubernetes 1.16 #52

Closed
hightall opened this issue Oct 24, 2019 · 0 comments
Closed

extensions/v1beta1 api version deprecated after Kubernetes 1.16 #52

hightall opened this issue Oct 24, 2019 · 0 comments
Labels
Milestone

Comments

@hightall
Copy link
Contributor

Expected Behavior

For kubernetes v1.16 server, can deploy fabric node successfully.

Current Behavior

Can not deploy fabric node on kubernetes 1.16 later version.

HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Thu, 24 Oct 2019 08:27:21 GMT', 'Content-Length': '222'})
HTTP response body: {
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {

  },
  "status": "Failure",
  "message": "the server could not find the requested resource",
  "reason": "NotFound",
  "details": {

  },
  "code": 404
}

Traceback (most recent call last):
  File "main.py", line 9, in <module>
    create_node()
  File "/app/operations/create_node.py", line 161, in create_node
    _create_fabric_node()
  File "/app/operations/create_node.py", line 119, in _create_fabric_node
    k8s_client.create_deployment(AGENT_ID, **deployment)
  File "/app/utils/client.py", line 183, in create_deployment
    raise e
  File "/app/utils/client.py", line 179, in create_deployment
    namespace=namespace, body=body, pretty="true"
  File "/usr/local/lib/python3.6/site-packages/kubernetes/client/apis/extensions_v1beta1_api.py", line 175, in create_namespaced_deployment
    (data) = self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/kubernetes/client/apis/extensions_v1beta1_api.py", line 266, in create_namespaced_deployment_with_http_info
    collection_formats=collection_formats)
  File "/usr/local/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 334, in call_api
    _return_http_data_only, collection_formats, _preload_content, _request_timeout)
  File "/usr/local/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 168, in __call_api
    _request_timeout=_request_timeout)
  File "/usr/local/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 377, in request
    body=body)
  File "/usr/local/lib/python3.6/site-packages/kubernetes/client/rest.py", line 266, in POST
    body=body)
  File "/usr/local/lib/python3.6/site-packages/kubernetes/client/rest.py", line 222, in request
    raise ApiException(http_resp=r)
kubernetes.client.rest.ApiException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Thu, 24 Oct 2019 08:27:21 GMT', 'Content-Length': '222'})
HTTP response body: {
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {

  },
  "status": "Failure",
  "message": "the server could not find the requested resource",
  "reason": "NotFound",
  "details": {

  },
  "code": 404
}

Possible Solution

try get k8s server version before use it. and use different function and api version to create deployment.

Steps to Reproduce

  1. make start
  2. create organization & admin for org.
  3. create kubernetes agent with upload config file.
  4. login org admin and apply the agent.
  5. create ca node.
  6. will shown node is deploying

截屏2019-10-24下午4 35 23

Context (Environment)

Detailed Description

Possible Implementation

@hightall hightall added the bug label Oct 24, 2019
@hightall hightall added this to To do in Version 1.0 via automation Oct 24, 2019
@hightall hightall added this to the v1.0.0 milestone Oct 24, 2019
hightall added a commit that referenced this issue Oct 30, 2019
[Fix #52] Fix k8s 1.16 later version not support.
Version 1.0 automation moved this from To do to Closed Issues Oct 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant