Failed to install metrics-server on minikube - kubernetes

I am trying to install metrics-server on my Kubernetes cluster. But it is not going to READY mode.
I am was installed metrics-server in this method
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
After installing i was tried some of those commands, kubectl top pods, kubectl top nodes. But i got an error
Error from server (ServiceUnavailable): the server is currently unable to handle the request (get pods.metrics.k8s.io)
Metrics server is failed to start

Enable metrics-server addon in minikube cluster.
Try the following commend.
minikube addons enable metrics-server

Related

Are Gateway API CRDs supported in Minikube and Kind?

I'm trying to install Gateway into my Kind cluster using Gateway API CRD by following a tutorial from https://istio.io/latest/docs/examples/bookinfo/
I had no problem with this command curl https://raw.githubusercontent.com/istio/istio/release-1.17/samples/bookinfo/gateway-api/bookinfo-gateway.yaml | kubectl apply -f -
But, command kubectl wait --for=condition=ready gtw bookinfo-gateway gave me this:
error: timed out waiting for the condition on gateways/bookinfo-gateway
I tried this in Minikube as well without any success.
Are these CRDs supported in both k8s (Minikube & Kind) platforms?

Confluent Platform setup on minikube multinode cluster

I am trying to setup confluent platform on minikube multi-node cluster following confluent documentation
Below are the steps followed:
Created minikube multinode cluster minikube start --nodes 3
Verified kubectl get nodes
Created namespace kubectl create namespace confluent & kubectl config set-context --current --namespace confluent
Installed confluent-operator helm upgrade --install confluent-operator confluentinc/confluent-for-kubernetes
Pulled below images to minikube minikube ssh docker pull <image-name>
docker.io/confluentinc/cp-server:7.3.0
docker.io/confluentinc/cp-server-connect:7.3.0
docker.io/confluentinc/cp-schema-registry:7.3.0
docker.io/confluentinc/cp-ksqldb-server:7.3.0
docker.io/confluentinc/cp-kafka-rest:7.3.0
docker.io/confluentinc/cp-enterprise-control-center:7.3.0
docker.io/confluentinc/confluent-operator:0.581.34
docker.io/confluentinc/confluent-init-container:2.5.0
Initiated setup kubectl apply -f https://raw.githubusercontent.com/confluentinc/confluent-kubernetes-examples/master/quickstart-deploy/confluent-platform.yaml
Now after initiating setup, it starts with creating pods for zookeeper and connect.
These pods never succeeds and keeps on restarting with Error and CrashLoopbackOff status.
I also tried to look into logs of these pods but it has no error or exception logged.

Helm 3 installation error through proxy server

Does anyone know why helm 3 install occurs error through proxy server?
Environment:
OS: Ubuntu 18.04
Kubernetes: v1.19.0
Helm: v3.3.4
root#ecs-k8s-master:~# kubectl cluster-info
Kubernetes master is running at https://192.168.30.5:6443
KubeDNS is running at https://192.168.30.5:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
root#ecs-k8s-master:~# https_proxy=http://172.19.1.222:3128 helm install ingress-nginx ingress-nginx/ingress-nginx
Error: Kubernetes cluster unreachable: Get "https://192.168.30.5:6443/version?timeout=32s": Forbidden
It seems like your proxy server either does require authentication or does not allow the connection to your cluster as it tells you "forbidden".

Not able to access application running on kubernetes pod (Using Docker-Desktop: Single-node cluster)

See below service is running:
and Below error i am getting while trying to access it:
Kubectl get pods:
Yaml files:
Service:
Deployment:
Check pod status if it's running or not.
Also, you can try with port-forwarding to POD
kubectl port-forward <POD name> 8086:8086 & open localhost:8086

Error while running kubectl commands

I have recently installed minikube and kubectl. However when I run kubectl get pods or any other command related to kubectl I get the error
Unable to connect to the server: unexpected EOF
Does anyone know how to fix this?I am using Ubuntu server 16.04.Thanks in advance.
The following steps can be used for further debugging.
Check the minikube local cluster status using minikube status command.
$: minikube status
minikube: Running
cluster: Running
kubectl: Correctly Configured: pointing to minikube-vm at 172.0.x.y
If problem with kubectl configuratuion,then configure it using, kubectl config use-context minikube command.
$: kubectl config use-context minikube
Switched to context "minikube".
Check the cluster status, using kubectl cluster-info command.
$: kubectl cluster-info
Kubernetes master is running at ...
Heapster is running at ...
KubeDNS is running at ...
...
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
Note: It can even be due to very simple reason: internet speed (it happend to me just now).
I have same problem too. I solved after change the server addr to localhost
apiVersion: v1
clusters:
- cluster:
certificate-authority: /var/lib/minikube/certs/ca.crt
server: https://localhost:8443 # check it
name: m01
...
users:
- name: m01
user:
client-certificate: /var/lib/minikube/certs/apiserver.crt
client-key: /var/lib/minikube/certs/apiserver.key
I think your kubernetes master is not setup properly. You can check that by checking the following services in master node are in active state and running.
etcd2.service
kube-apiserver.service Kubernetes API Server
kube-controller-manager.service Kubernetes Controller Manager
kube-scheduler.service Kubernetes Scheduler