1. The connection to the server localhost:8080 was refused - did you specify the right host or port?
SOLUTION:
(1)
cp /etc/kubernetes/admin.conf $HOME/
chown $(id -u):$(id -g) $HOME/admin.conf
| alias kc='kubectl' | |
| alias kclf='kubectl logs --tail=200 -f' | |
| alias kcgs='kubectl get service -o wide' | |
| alias kcgd='kubectl get deployment -o wide' | |
| alias kcgp='kubectl get pod -o wide' | |
| alias kcgn='kubectl get node -o wide' | |
| alias kcdp='kubectl describe pod' | |
| alias kcds='kubectl describe service' | |
| alias kcgsa='kubectl get service -o wide --all-namespaces' | |
| alias kcgda='kubectl get deployment -o wide --all-namespaces' |
| apiVersion: networking.k8s.io/v1 | |
| kind: NetworkPolicy | |
| metadata: | |
| name: NP1 | |
| namespace: NS1 | |
| spec: | |
| podSelector: {} | |
| policyTypes: | |
| - Ingress | |
| - Egress |
| docker pull gcr.io/google_containers/kube-apiserver-amd64:v1.14.2 | |
| docker pull gcr.io/google_containers/kube-controller-manager-amd64:v1.14.2 | |
| docker pull gcr.io/google_containers/kube-proxy-amd64:v1.14.2 | |
| docker pull gcr.io/google_containers/kube-scheduler-amd64:v1.14.2 | |
| docker pull gcr.io/google_containers/kubernetes-dashboard-amd64:v1.10.1 | |
| docker pull weaveworks/weave-npc:1.8.2 | |
| docker pull weaveworks/weave-kube:1.8.2 | |
| docker pull gcr.io/google-containers/kube-addon-manager:v6.1 |
| # Use alias to fetch from remote and delete any untracked local branches | |
| [alias] | |
| nuke = "!f() { git fetch -p && for branch in $(git for-each-ref --format '%(refname) %(upstream:track)' refs/heads | awk '$2 == \"[gone]\" {sub(\"refs/heads/\", \"\", $1); print $1}'); do git branch -D $branch; done }; f" |
| { | |
| "annotations": { | |
| "list": [ | |
| { | |
| "builtIn": 1, | |
| "datasource": "-- Grafana --", | |
| "enable": true, | |
| "hide": true, | |
| "iconColor": "rgba(0, 211, 255, 1)", | |
| "name": "Annotations & Alerts", |
| #!/bin/bash | |
| REGION=us-east-1 | |
| # Get a list of all the nodes in the cluster | |
| NODES=$(kubectl get nodes --sort-by=.metadata.creationTimestamp -o=jsonpath='{.items[*].metadata.name}') | |
| K8S_NODES_DATA=$(kubectl get no -ojson) | |
| # Create a temporary file to store combined output |