Can we apply/delete kubernetes YAML files in IntelliJ IDEA/Visual Studio Code by right clicking on the YAML file and then choosing apply/delete/..?
You can install Kubernetes extension for VS Code and new k8s related commands will appear in Command Pallete.
For example Kubernetes: Apply
- executes kubectl apply
for currently active file. You can also bind hotkeys to these commands.
The External Tools feature will do what you're asking; you can create an "external tool" named kubectl-apply
with any of the variables they support, and then invoke it via any number of built-in mechanisms