What is command to find detailed information about Kubernetes master(s) using kubectl?

后端 未结 2 1493
花落未央
花落未央 2021-01-31 13:09

Let say I want to find the kubelet and apiserver version of my k8s master(s), what\'s the best way to do it?

I am aware of the following commands:

kubect         


        
2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-31 13:47

    kubectl version --short will give you a short and sweet version of your k8-cluster

    aathith@k8-master:~# kubectl version --short
    Client Version: v1.18.1
    Server Version: v1.18.1
    

    edit 1:
    In terminal 1

    aathith@k8-master:~# kubectl proxy
    Starting to serve on 127.0.0.1:8001
    

    In terminal 2

    aathith@k8-master:~# curl http://localhost:8001/version -k
    {
      "major": "1",
      "minor": "18",
      "gitVersion": "v1.18.1",
      "gitCommit": "e0fccafd69541e3750d460ba0f9743b90336f24f",
      "gitTreeState": "clean",
      "buildDate": "2020-04-16T11:35:47Z",
      "goVersion": "go1.13.9",
      "compiler": "gc",
      "platform": "linux/amd64"
    }
    
    

提交回复
热议问题