Join GitHub today
Add microk8s.kubectl as an alias for kubectl #20
It was my understanding that aliases were (planned to be?) moved out of the snapcraft.yaml definition to become store-only metadata? Additionally, from my experience with the juju alias in conjure-up, if a snap provides an alias for a command that's already provided by another snap, it will prevent it from being installed. I would be happy to learn that I am wrong on one or both counts.
Ok, doing some more research, it looks like the snap doesn't need to do anything to allow the user to do:
We can also make a topic on the forum to request an auto-alias. If the microk8s.kubectl is aliased to kubectl, then trying to do
Will fail with:
This behavior seems less than ideal, but at least the error message is clear, even if it doesn't explain exactly what to do to fix it. I am still not clear if it will fail in the other direction (i.e., if they already have the kubectl snap installed, if trying to install microk8s will fail if it has an auto-alias defined in the store), but I suspect it will just ignore the auto-alias. I'm not sure how to test that, though.