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

Stash debugging helper #18

Open
hossainemruz opened this issue Feb 3, 2021 · 3 comments
Open

Stash debugging helper #18

hossainemruz opened this issue Feb 3, 2021 · 3 comments

Comments

@hossainemruz
Copy link
Contributor

We can have some command in stash kubectl plugin that will help us for debugging. For example,

# For backup
kubectl stash debug backup --backupconfig=<backupconfig name> -n <namespace>
kubectl stash debug backup --backupsession=<backupsession name> -n <namespace>

# For restore
kubectl stash debug restore --restoresession=<restoresession name> -n <namespace>

The debug command will intelligently perform the action we often need to do for debugging for example, checking log, describing respective pod/backupconfig/backupsession etc.

It will also check for some common mistakes for example, new line in the secret, missing storage secret, check for network policy etc.

@hossainemruz
Copy link
Contributor Author

Viewing Log

If we want to see log of a backup/restore pod, we can just issue,

# For backup
kubectl stash log --backupsession=<backupsession name> -n <namespace>

# For restore
kubectl stash log --restoresession=<restoresession name> -n <namespace>

@hossainemruz
Copy link
Contributor Author

Fixing Secret

If the storage secret has newline in it, we can have some fix command.

kubectl stash fix secret --name=<secret name> -n <namespace>

@hossainemruz
Copy link
Contributor Author

Checking Database Connection

If we want to check whether the information provided in AppBinding is sufficient to connect with the database, we can use:

kubectl stash ping --appbinding=<appbinding>

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

1 participant