Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problema ao iniciar os pods linkerd #2

Closed
aeciopires opened this issue Sep 23, 2021 · 6 comments
Closed

Problema ao iniciar os pods linkerd #2

aeciopires opened this issue Sep 23, 2021 · 6 comments

Comments

@aeciopires
Copy link
Contributor

Oi, @rafaelperoco!

Primeiramente, parabéns pelo seu empenho nos estudos e na criação dessa solução. Obrigado pelo compartilhamento com a comunidade.

Eu testei a solução, encontrei alguns problemas que consegui corrigir neste Pull Request, mas continuo com dificuldades para fazer o deploy do linkerd funcionar no kind:

Os detalhes do problema estão aqui https://pastebin.com/1AmTnCbX.

Obviamente ao acessar o endereço http://linkerd.ac120064.nip.io, eu recebo um erro 503/HTTP.

Sabe o que pode ser feito para corrigir?

@rafaelperoco
Copy link
Owner

@aeciopires
Não consegui reproduzir o erro, fiz um teste clonando o repositório novamente, o linkerd subiu.

Pode validar a alocação de recursos na sua máquina?

@aeciopires
Copy link
Contributor Author

aeciopires commented Sep 27, 2021

Oi, @rafaelperoco!

Acabei de testar novamente... deletei o cluster anterior, clonei o repositório novamente e fiz do início. O problema ocorreu novamente com as mesmas mensagens de erro.

Meu ambiente é o seguinte:

Ubuntu: 20.04
CPU: 8 core Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
Memória: 16 GB

No momento da instalação, o uso dos recursos pelo container estavam assim:

CONTAINER ID   NAME                           CPU %     MEM USAGE / LIMIT     MEM %     NET I/O          BLOCK I/O         PIDS
44d449723be7   cluster-8171c0-control-plane   64.27%    1.259GiB / 15.36GiB   8.20%     305MB / 53.2MB   84.4MB / 8.38MB   652
fe6ae5080463   cluster-8171c0-worker2         35.62%    490.1MiB / 15.36GiB   3.12%     271MB / 6.72MB   6.6MB / 55.3kB    266
63ea2466306e   cluster-8171c0-worker          40.22%    616MiB / 15.36GiB     3.92%     408MB / 13.9MB   6.42MB / 87.6kB   446

O uso de recursos do comando top estavam assim:

top - 18:20:45 up  5:44,  1 user,  load average: 2,08, 2,82, 2,66
Tasks: 545 total,   1 running, 544 sleeping,   0 stopped,   0 zombie
%Cpu(s):  5,7 us,  3,3 sy,  0,0 ni, 90,8 id,  0,0 wa,  0,0 hi,  0,2 si,  0,0 st
MiB Mem :  15725,9 total,    238,6 free,   5223,5 used,  10263,8 buff/cache
MiB Swap:   3814,0 total,   3812,0 free,      2,0 used.   9517,8 avail Mem 

Durante a criação do cluster, o que me chamou a atenção foram essas mensagens:

+ linkerd viz install
+ kubectl apply -f -
Waiting for control plane to become available
Cannot connect to Linkerd: pod/linkerd-controller-5cf984c6f7-pplhr container public-api is not ready
Validate the install with: linkerd check
error: no objects passed to apply
+ kubectl annotate --overwrite namespace default linkerd.io/inject=enabled
namespace/default annotated
+ kubectl wait --for condition=ready pod -l deploy/linkerd2 -n linkerd2 --timeout -1s
error: no matching resources found

A versão do linkerd client é a: stable-2.10.2

As respectivas versões do kubectl e do Kubernetes são as seguintes:

  • Client Version: v1.20.4
  • Server Version: v1.21.1

Ao executar o comando:

linkerd check

O resultado é o seguinte:

kubernetes-api

√ can initialize the client
√ can query the Kubernetes API

kubernetes-version

√ is running the minimum Kubernetes API version
√ is running the minimum kubectl version

linkerd-existence

√ 'linkerd-config' config map exists
√ heartbeat ServiceAccount exist
√ control plane replica sets are ready
√ no unschedulable pods
√ controller pod is running

linkerd-config

√ control plane Namespace exists
√ control plane ClusterRoles exist
√ control plane ClusterRoleBindings exist
√ control plane ServiceAccounts exist
√ control plane CustomResourceDefinitions exist
√ control plane MutatingWebhookConfigurations exist
√ control plane ValidatingWebhookConfigurations exist
W0927 18:25:38.236482 90957 warnings.go:67] policy/v1beta1 PodSecurityPolicy is deprecated in v1.21+, unavailable in v1.25+
√ control plane PodSecurityPolicies exist

linkerd-identity

√ certificate config is valid
√ trust anchors are using supported crypto algorithm
√ trust anchors are within their validity period
√ trust anchors are valid for at least 60 days
√ issuer cert is using supported crypto algorithm
√ issuer cert is within its validity period
√ issuer cert is valid for at least 60 days
√ issuer cert is issued by the trust anchor

linkerd-webhooks-and-apisvc-tls

√ proxy-injector webhook has valid cert
√ proxy-injector cert is valid for at least 60 days
√ sp-validator webhook has valid cert
√ sp-validator cert is valid for at least 60 days

linkerd-api

  • pod/linkerd-controller-5cf984c6f7-pplhr container public-api is not ready

@aeciopires
Copy link
Contributor Author

O pod linkerd-controller não fica health porque o conteiner linkerd-proxy fica exibindo a seguinte mensagem no log:

[     0.002236s]  INFO ThreadId(01) linkerd2_proxy::rt: Using single-threaded proxy runtime
thread 'main' panicked at 'system DNS config must be valid: ResolveError { kind: Io(Custom { kind: Other, error: "Error parsing resolv.conf: ProtoError { kind: Msg(\"Malformed label: --\") }" }) }', linkerd/app/core/src/dns.rs:21:54
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@aeciopires
Copy link
Contributor Author

Achei uma pessoa que reportou o mesmo problema aqui: https://githubmemory.com/repo/scylladb/scylla-operator/issues/484?page=1

Na thread foi sugerido mudar o parâmetro dnsPolicy no deployment:

De:

dnsPolicy: ClusterFirst

Para:

dnsPolicy: ClusterFirstWithHostNet

Tentei, mas não resolveu.

Enfim, obrigado pela atenção.

@rafaelperoco
Copy link
Owner

@aeciopires ainda não consegui reproduzir o problema, mas adicionei um wait na etapa do linkerd, faça o teste novamente para validar se isso resolve o problema.

@aeciopires
Copy link
Contributor Author

Oi, @rafaelperoco!

Eu baixei as suas mudanças e criei o cluster novamente. Infelizmente, não resolveu. Os demais softwares funcionam, mas linkerd continua com o mesmo problema que reportei no início dessa issue.

De qualquer forma, eu consigo fazer o que preciso com o linkerd.

Obrigado pela ajuda.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants