By default gpgme requests passphrases from the user via pinentry (a separate program that pops up a dialog).
It would be possible to supply the passphrase directly from kube via it's loopback mode.
A prototype implementation can be found here:
https://phabricator.kde.org/R162:062c93bc9b2d9ce65c195d928cb4368e0496859f