Following is an alternative workaround to access Dashboard externally. 1. kubernetes-dashboard is a service file which provides dash-board functionality, to edit this we need to edit dashboard service and change service "type" from ClusterIP to NodePort: [root@kubeXXXX]# kubectl -n kube-system edit service kubernetes-dashboard # Please edit the object below. Lines beginning with a '#' will be ignored, # and an empty file will abort the edit. If an error occurs while saving this file will … [Read more...] about How To Access Kubernetes Dashboard Externally
Kubernetes
New User Failed Run Kubectl with Error “The connection to the server xxx.xxx.xxx was refused – did you specify the right host or port?”
The Problem When run kubectl from a new created user, failed with error: The connection to the server xxx.xxx.xxx was refused - did you specify the right host or port? The Solution A newly created user has no KUBECONFIG configured. Setup kubernetes configuration for the new user: # mkdir -p $HOME/.kube # sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config # sudo chown $(id -u):$(id -g) $HOME/.kube/config … [Read more...] about New User Failed Run Kubectl with Error “The connection to the server xxx.xxx.xxx was refused – did you specify the right host or port?”
How to schedule master node running pod/service as a worker node
Question: How can I schedule master node running pod/service as worker node? By deafult, only worker node could run the pod, master only response for the scheduler/configuration. $ kubectl get nodes -o json | jq .items[].spec.taints [ { "effect": "NoSchedule", "key": "node-role.kubernetes.io/master" } ] $ kubectl get nodes -o json | grep master "node-role.kubernetes.io/master": "" "key": … [Read more...] about How to schedule master node running pod/service as a worker node
Endpoint is not Created for Service in Kubernetes
The Problem Endpoints shows 'none': $ kubectl get svc NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes ClusterIP 10.yy.0.1 <none> 443/TCP 9d test ClusterIP 10.xx.97.97 <none> 6379/TCP 21s $ kubectl describe svc test Name: test Namespace: default Labels: <none> Annotations: … [Read more...] about Endpoint is not Created for Service in Kubernetes
Troubleshooting kubectl Error: The connection to the server x.x.x.x:6443 was refused – did you specify the right host or port?
This document describes steps to troubleshoot kubectl error: The connection to the server x.x.x.x:6443 was refused - did you specify the right host or port? 1. The kubectl should be executed on the Master Node. 2. Current user must have Kubernetes cluster configuration environment variable (Details of how to are listed under section Preparing to Use Kubernetes as a Regular User), e.g.: $ env | grep -i kube KUBECONFIG=/root/.kube/config 3. The docker service must be running: $ … [Read more...] about Troubleshooting kubectl Error: The connection to the server x.x.x.x:6443 was refused – did you specify the right host or port?