1

I am following Kubeedge v1.0.0 deployment on Katacoda and on executing the following command.

kubectl apply -f $GOPATH/src/github.com/kubeedge/kubeedge/build/node.json -s <kubedge-node-ip-address>:8080 

It gives me an error

error: unable to recognize "/root/kubeedge/src/github.com/kubeedge/kubeedge/build/node.json": no matches for kind "Node" in version "v1"

Tried searching for this error but found no relevant answers. Anyone has idea on to get through this?

Below is the content of my node.json file

{
  "kind": "Node",
  "apiVersion": "v1",
  "metadata": {
    "name": "edge-node-1",
    "labels": {
      "name": "edge-node",
      "node-role.kubernetes.io/edge": ""
    }
  }
} 
kenorb
  • 155,785
  • 88
  • 678
  • 743

1 Answers1

1

I have reproduced it in Katakoda and in my case it works perfectly. I recommend you to go through the tutorial once again and take each step carefully.

You need to pay attention for step 7. Change metadata.name to the name of the edge node:

vim $GOPATH/src/github.com/kubeedge/kubeedge/build/node.json

{
  "kind": "Node",
  "apiVersion": "v1",
  "metadata": {
    "name": "edge-node",
    "labels": {
      "name": "edge-node",
      "node-role.kubernetes.io/edge": ""
    }
  }
}

Then, execute following command, where you need to change IP address:

kubectl apply -f $GOPATH/src/github.com/kubeedge/kubeedge/build/node.json -s <kubedge-node-ip-address>:8080

Another command to check if a correct API version was used, is:

kubectl explain node -s <kubedge-node-ip-address>:8080

After successful creation of node you should see:

node/edge-node created
aga
  • 3,790
  • 3
  • 11
  • 18
  • may be you are right but this did not help me. I am getting the same error as mentioned in the question. question edited to add node.json file. – Nitesh Ratnaparkhe Oct 07 '19 at 22:32
  • To execute the below line (This is mentioned in Step 7) ```` kubectl apply -f $GOPATH/src/github.com/kubeedge/kubeedge/build/node.json -s cloudhuburl:8080 ```` It says "Replace cloudhuburl with the ip of the machine where cloud is running(use ens3 inet addr)." Do you know how to find the ens inet addr on the cloud node? May be I am doing a mistake here. – Nitesh Ratnaparkhe Oct 13 '19 at 11:23