Getting error while trying to setup kubernetes on debian using helm

3/29/2019

While running the helm init I was getting an error:

Error: error installing: the server could not find the requested resource (post deployments.extensions)

But I solved it by running :

helm init --client-only

But when I run:

helm upgrade --install --namespace demo demo-databases-ephemeral charts/databases-ephemeral --wait

I'm getting:

Error: serializer for text/html; charset=utf-8 doesn't exist

I found nothing convincing as a solution and I'm not able to proceed forward in the setup.

Any help would be appreciated.

-- Raman Saini
debian
kubernetes
kubernetes-helm

2 Answers

3/29/2019

Apparently, your kube-dns pod not able to find api server, so it returns text/html, rather then JSON

1) Check errors in dns container apart from Error: serializer for text/html; charset=utf-8 doesn't exist

kubectl logs <kube-dns-pod> -n kube-system kubedns

2) Update your dns pod config with following flags:

--kubecfg-file=~/.kube/config <-- path to your kube-config file
--kube-master-url=https://0.0.0.0:3000 <--address to your master node
-- A_Suh
Source: StackOverflow

4/3/2019

Check if your ~/.kube/config exists and is properly set up. If not, run the following command:

sudo cp -i /etc/kubernetes/admin.config ~/.kube/config

Now check if kubectl is properly setup using:

kubectl version

This answer is specific to the issue you are getting. If this does not resolve the issue, please provide more error log.

-- Vivek Kaushal
Source: StackOverflow