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

RegistrySecretName inf config file don't work #139

Open
zhangguanzhang opened this issue Feb 1, 2021 · 2 comments
Open

RegistrySecretName inf config file don't work #139

zhangguanzhang opened this issue Feb 1, 2021 · 2 comments

Comments

@zhangguanzhang
Copy link

config file:

$ cat ~/.kube/debug-config 
agentImage: xxx.lan:5000/debug-agent:latest
debugAgentNamespace: kube-system
agentless: true
image: xxx:5000/netshoot:latest
RegistrySecretName: regcred
RegistrySecretNamespace: default

if run without --registry-secret-name

$ kubectl debug xxxx-core-84c57974dd-w9w4j  bash
2021/02/01 12:35:10 Getting user name from default context 'xxx'
2021/02/01 12:35:10 User name 'admin' received from context
Agent Pod info: [Name:debug-agent-pod-de65ed93-6446-11eb-bd48-00505692ae0c, Namespace:default, Image:xxx.lan:5000/debug-agent:latest, HostPort:10027, ContainerPort:10027]
Waiting for pod debug-agent-pod-de65ed93-6446-11eb-bd48-00505692ae0c to run...
Forwarding from 127.0.0.1:10027 -> 10027
Forwarding from [::1]:10027 -> 10027
Handling connection for 10027
                             Start deleting agent pod xxxx-core-84c57974dd-w9w4j 
error execute remote, Internal error occurred: error attaching to container: Error response from daemon: Get http://xxx.lan:5000/v2/netshoot/manifests/latest: no basic auth credentials
error: Internal error occurred: error attaching to container: Error response from daemon: Get http://xxx.lan:5000/v2/netshoot/manifests/latest: no basic auth credentials

if run with --registry-secret-name:

$ kubectl debug xxxx-core-84c57974dd-w9w4j --registry-secret-name regcred
2021/02/01 14:01:23 Getting user name from default context 'xxx'
2021/02/01 14:01:23 User name 'admin' received from context
Agent Pod info: [Name:debug-agent-pod-e9ea4a34-6452-11eb-9017-00505692ae0c, Namespace:default, Image:xxx.lan:5000/debug-agent:latest, HostPort:10027, ContainerPort:10027]
Waiting for pod debug-agent-pod-e9ea4a34-6452-11eb-9017-00505692ae0c to run...
Forwarding from 127.0.0.1:10027 -> 10027
Forwarding from [::1]:10027 -> 10027
Handling connection for 10027
                             container created, open tty...
bash-5.0#
@andrey-gava
Copy link

andrey-gava commented Feb 3, 2021

Have the same problem. Plus agentless: false in config didn't work too on both last version, including rc.

@qianzhang613
Copy link

Have the same problem. +1

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

3 participants