TLS Bootstrapping Worker Nodes

An issue with ==> Step 1: Create the Boostrap Token to be used by Nodes(Kubelets) to invoke Certificate API

=============================================================
cat > bootstrap-token-07401b.yaml <<EOF
apiVersion: v1
kind: Secret
metadata:
name: bootstrap-token-07401b
namespace: kube-system
type: bootstrap.kubernetes.io/token
stringData:
description: “The default bootstrap token generated by ‘kubeadm init’.”
token-id: 07401b
token-secret: f395accd246ae52d
expiration: 2021-03-10T03:22:11Z
usage-bootstrap-authentication: “true”
usage-bootstrap-signing: “true”
auth-extra-groups: system:bootstrappers:worker
EOF

kubectl create -f bootstrap-token-07401b.yaml

Getting below error:-

The connection to the server localhost:8080 was refused - did you specify the right host or port?

Any thoughts?

You have to run all those command as a regular user.
sudo cp /etc/kubernetes/admin.conf HOME/ sudo chown (id -u):$(id -g) $HOME/admin.conf
export KUBECONFIG=$HOME/admin.conf