kubectl cluster-info
There is a command kubectl cluster-info, but it shows only endpoint information about the master and services in the cluster.
Example from docker desktop.
kubectl cluster-info
Kubernetes master is running at https://kubernetes.docker.internal:6443
KubeDNS is running at https://kubernetes.docker.internal:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
Example from gke
kubectl cluster-info
Kubernetes master is running at https://xx.xxx.xxx.xx
GLBCDefaultBackend is running at https://xx.xxx.xxx.xx/api/v1/namespaces/kube-system/services/default-http-backend:http/proxy
KubeDNS is running at https://xx.xxx.xxx.xx/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
Metrics-server is running at https://xx.xxx.xxx.xx/api/v1/namespaces/kube-system/services/https:metrics-server:/proxy
Number of nodes
If you wan't to check how many nodes are in your cluster you can use kubectl get nodes.
Example from docker on desktop.
kubectl get nodes
NAME STATUS ROLES AGE VERSION
docker-desktop Ready master 5d22h v1.19.3
Example from gke
kubectl get nodes
NAME STATUS ROLES AGE VERSION
gke-cluster-4-default-pool-ae8cecd9-m6br Ready <none> 2d16h v1.16.13-gke.401
gke-cluster-4-default-pool-ae8cecd9-n9nz Ready <none> 2d16h v1.16.13-gke.401
gke-cluster-4-default-pool-ae8cecd9-tb9f Ready <none> 2d16h v1.16.13-gke.401
If you wan't to get just the number of running nodes .
kubectl get nodes --no-headers | grep -v Running | wc -l
Method
You could try to do that with few commands from this stackoverflow question.
For example:
kubectl config current-context
kubectl config view -o jsonpath='{.clusters[].name}'
kubectl -n kube-system get configmap kubeadm-config -o yaml <--- kubeadm only
Date
Couldn't find any informations about that, as a workaround you can try to check nodes/kube api-server creationTimestamp, but if there was any restart on the node/kube api-server pod then the data will get updated.
Example from docker desktop.
kubectl get node docker-desktop -o jsonpath='{.metadata.creationTimestamp}'
2020-11-13T10:09:10Z
kubectl get pods -n kube-system kube-apiserver-docker-desktop -o jsonpath='{.metadata.creationTimestamp}'
2020-11-13T10:10:12Z