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

Kube-dump Not working as expected #18

Open
OMO-NOSA opened this issue May 3, 2021 · 7 comments
Open

Kube-dump Not working as expected #18

OMO-NOSA opened this issue May 3, 2021 · 7 comments
Labels
question Further information is requested

Comments

@OMO-NOSA
Copy link

OMO-NOSA commented May 3, 2021

Hello All,

I ran kube-dump as a kubernetes pod within my container and did the configuration to store both on a persistent disk and on a github repo.

I currently do not know the state of this as it is not showing a reasonable log information. Please see attached image.

Thanks
kube-dump

@WoozyMasta
Copy link
Owner

@OMO-NOSA, can you provide more information?

Please show me the output of the commands kubectl describe pod kube-dump and kubectl get events | grep kube-dump for the namespace where pod is running.

@OMO-NOSA
Copy link
Author

OMO-NOSA commented May 5, 2021

@WoozyMasta Here:

kubectl describe pod kube-dump output:
ame:         kube-dump
Namespace:    dataworks
Priority:     0
Node:         aks-nodepool-91939667-vmss000000/10.240.0.159
Start Time:   Thu, 15 Apr 2021 01:55:39 +0000
Labels:       app=kube-dump
Annotations:  <none>
Status:       Running
IP:           10.240.0.232
IPs:
  IP:  10.240.0.232
Containers:
  kube-dump:
    Container ID:  docker://65150dd921528d1664856f27f735148d081a489f8162e52bf41086223861d61b
    Image:         woozymasta/kube-dump:1.0
    Image ID:      docker-pullable://woozymasta/kube-dump@sha256:5d8bc2ef0361972f2f92901057d61cb8707681f48ecc104e68dbc97c3635c5c9
    Port:          <none>
    Host Port:     <none>
    Command:
      /bin/bash
      -c
      --
    Args:
      while true; do sleep 60; done;
    State:          Running
      Started:      Wed, 21 Apr 2021 20:21:10 +0000
    Last State:     Terminated
      Reason:       Error
      Exit Code:    255
      Started:      Thu, 15 Apr 2021 01:56:47 +0000
      Finished:     Wed, 21 Apr 2021 20:19:31 +0000
    Ready:          True
    Restart Count:  1
    Limits:
      cpu:     500m
      memory:  200Mi
    Requests:
      cpu:     200m
      memory:  100Mi
    Environment:
      MODE:              dump
      DESTINATION_DIR:   /data/dump
      GIT_PUSH:          true
      GIT_BRANCH:        master
      GIT_REMOTE_URL:   <redacted>
      GIT_COMMIT_EMAIL:  <redacted>
      GIT_COMMIT_USER:  <redacted>
    Mounts:
      /data from data (rw)
      /root/.ssh/id_ed25519 from key (rw,path="id_ed25519")
      /root/.ssh/id_ed25519.pub from key-pub (rw,path="id_ed25519.pub")
      /var/run/secrets/kubernetes.io/serviceaccount from kube-dump-token-szlhv (ro)
Conditions:
  Type              Status
  Initialized       True
  Ready             True
  ContainersReady   True
  PodScheduled      True
Volumes:
  data:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  kube-dump
    ReadOnly:   false
  key:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  kube-dump-key
    Optional:    false
  key-pub:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  kube-dump-key
    Optional:    false
  kube-dump-token-szlhv:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  kube-dump-token-szlhv
    Optional:    false
QoS Class:       Burstable
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                 node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:          <none>

kubectl get events | grep kube-dump ==> this command did not return anything

@WoozyMasta
Copy link
Owner

@OMO-NOSA, It looks like everything is working well, have you tried running a dump task?

For example:
kubectl exec -ti -n kube-dump kube-dump -- /kube-dump ns -n kube-dump

@WoozyMasta
Copy link
Owner

Perhaps it was not obvious from the document, I corrected it, I hope it will be clearer this way

8b2135f

@WoozyMasta WoozyMasta added the question Further information is requested label May 5, 2021
@OMO-NOSA
Copy link
Author

OMO-NOSA commented May 5, 2021

@WoozyMasta Getting this Error: Error from server (Forbidden): pods "kube-dump" is forbidden: User "system:serviceaccount:kube-dump:kube-dump" cannot get resource "pods" in API group "" in the namespace "kube-dump"

and this: Error: Found running on kubernetes cluster but attempting connect to API 10.0.0.1:443 failed with code 401
command terminated with exit code 1

@WoozyMasta
Copy link
Owner

@OMO-NOSA, you have exactly set the ClusterRoleBinding from the deploy/cluster-role-view.yaml file?

If so then try this:

It looks like you don't have a standard view role in the cluster. Create this role from the clusterrole-view.yml file.

Or you can issue the cluster-admin role, apply this deploy/cluster-role-admin.yaml file (this is not a good solution to issue the administrator role, I do not recommend doing this in a production environment)

@OMO-NOSA
Copy link
Author

OMO-NOSA commented May 5, 2021

@WoozyMasta all my configuration seems good and up-to-date.

What will you suggest the issue here is? Will saving the files to a git repo be any different? If so, be guide me on the process, as the documentation isn't thorough enough. Thanks

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

No branches or pull requests

2 participants