Can we apply/delete kubernetes YAML files in IntelliJ IDEA/Visual Studio Code?

1/19/2019

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/..?

-- user674669
intellij-idea
kubernetes
visual-studio-code

2 Answers

1/20/2019

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.

enter image description here

-- Alik Khilazhev
Source: StackOverflow

1/20/2019

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

the IntelliJ External Tools configuration dialog

-- mdaniel
Source: StackOverflow