The upcoming IntelliJ IDEA 2018.1 Ultimate Edition introduces initial support for Kubernetes via a brand new Kubernetes plugin. The new plugin supports the Kubernetes resource files from v1.5 up to the recently released v1.9.
The IntelliJ IDEA enhancements for Kubernetes include: code completion, inspections, quick-fixes for Kubernetes resource files, icons in the gutter for easier navigation, pop-up documentation, and live templates. Read on for more details and screenshots.
Please note that the Kubernetes plugin is not bundled, so before using this new functionality you need to install the plugin. Go to Preferences | Plugins | Kubernetes plugin, or download the plugin from the website.
The new Kubernetes plugin is compatible with all paid JetBrains IDEs: PhpStorm, WebStorm, PyCharm Professional, RubyMine, AppCode, CLion, GoLand, and DataGrip.
Once the Kubernetes plugin is installed, you can create and edit the YAML and JSON Kubernetes resource files in IntelliJ IDEA. The new plugin will look for the presence of apiVersion and kind fields in the files, and if these are present it will consider such files as Kubernetes resource files.
Working with Kubernetes resource files can be challenging as you need to include all the mandatory fields, and those fields differ depending on the applied Kubernetes API version and the kind type. This means having to consult the Kubernetes documentation often as you create Kubernetes resource files. To make it easier for you to work with Kubernetes, the new plugin has a full bag of improvements.
For a start, the Kubernetes plugin has a built-in Live Template that allows you to quickly create the type of YAML Kubernetes resource file that you need:
The new plugin now contains several predefined Kubernetes templates, and you can invoke the necessary Live Template by typing its abbreviation.
If you want to add your own Live Template or to customize an existing one, go to Preferences | Live Templates | Kubernetes.
Code completion now works for YAML Kubernetes resource files. The Kubernetes plugin offers the correct values you can use within the resources.
To help you really quickly create the required YAML definition file for Kubernetes, start typing the required key and invoke Smart Completion. The new plugin will auto-complete all the required keys from all the levels below.
For YAML Kubernetes resource files, the plugin provides an ability to navigate between a label definition and a label selector. Use the icons in the gutter.
You can also navigate and jump from a label selector to a label definition inside the editor if there is a direct match for a label, both for the key and for the value.
When you rename a key or a value in YAML Kubernetes files, the plugin will also rename all their usages.
The Kubernetes plugin will alert you whenever you select deprecated Kubernetes properties (available for the YAML files only).
In addition to this, you’ll get a warning for the YAML files if you try to use properties that are not applicable for the specified elements with the applied apiVersion and kind.
The plugin highlights elements with missing keys in YAML Kubernetes resource definition files and provides a quick-fix to add the required keys.
Another enhancement in this area is that IntelliJ IDEA will now warn you about redundant keys. Use the provided quick-fix to remove redundant keys in YAML Kubernetes resource files.
Our new plugin also detects non-editable keys in YAML Kubernetes resource files and highlights them in the editor. Note that there’s an easy way to remove all such read-only keys from the current YAML file via a handy quick-fix.
The IDE previews the important information from the folded area in YAML Kubernetes files.
You can also invoke the documentation for any keys in YAML or Kubernetes resource files by simply pressing ^J (macOS) or Ctrl + Q (Windows and Linux). Click the hyperlink in the Quick Documentation Lookup to navigate to more detailed information.
Support for JSON Kubernetes resource files
Although the JSON format is not recommended for Kubernetes resource files, it is still supported by Kubernetes. The new plugin provides some limited support for JSON Kubernetes resource files based on the JSON schema functionality.
Currently, only code completion is available for JSON Kubernetes resource files.
The new plugin validates the current keys according to the JSON schema and alerts you when incorrect properties or values are used.
Also, the plugin highlights elements with any missing required properties and then advises you about the appropriate properties that should be added.
Duplicated properties are also detected in JSON Kubernetes files.
The Quick Documentation Lookup is also available for JSON Kubernetes resource files.
We would like to learn more about your experience with Kubernetes and IntelliJ IDEA. Please share your experience with us. Feature requests and improvement suggestions are very welcome! We are currently actively working to support Kubernetes even better, and your feedback can influence the roadmap for Kubernetes support a lot. Add a comment here, tweet at us or create an issue in YouTrack.
Happy developing!

Will it be an open source project?
As for now, we don’t have such plans, sorry.
and now?
Is the plugin itself pluggable? I.e., would someone be able to add support for OpenShift-specific resources? Or Istio resources?
+1
We plan to implement this feature in v2018.2. You can follow the progress here: https://youtrack.jetbrains.com/issue/IDEA-188389
Big blog post mentioning “Kubernetes” a zillion times. Absolutely no explanation of what Kubernetes actually is, and no link to the Kubernetes website. Yes, I can google it, but that seems like basic information to start an article like this with.
you’re retarded, right?
Building upon what Zenobiusz said, here is a link for you:
http://lmgtfy.com/?q=kubernetes
That’s a great news! Any plans for Helm chart editing support?
Hi Mariusz, the Helm support is among our priorities right now and we are going to implement it in IntelliJ IDEA 2018.2. Please follow this issue: https://youtrack.jetbrains.com/issue/IDEA-187729
This is awesome! YAML is not as people friendly as it is advertised.
What about Helm templates? Are they supported or going to be supported eventually?
Dmitry, thank you for your feedback! Please vote and follow: https://youtrack.jetbrains.com/issue/IDEA-187729
How about Helm support?
Rob, thanks for your feedback! Please vote and follow: https://youtrack.jetbrains.com/issue/IDEA-187729
Same here, Helm support would be awesome.
Micha, here is the issue to vote and follow: https://youtrack.jetbrains.com/issue/IDEA-187729
thanks!
Is Rider IDE support in the pipeline?
Would be interested, too.
Rider is supported. If the plugin isn’t available in the latest EAP, please wait for the next one. The release will definitely have it.
Is it possible to disable for a file or directory? It is horrible with helm templates so I’ve had to disable the plugin altogether.
Pingback: GoLand 2018.1 EAP 5: Dep Integration, Smarter Auto-Imports, Scratch Files, Faster Rename and Find Usages, and More | GoLand Blog
If manual installed, will this plugin still only work in the Ultimate version of IDEA 2018.1+ ?
The plugin only compatible with the Ultimate version of IDEA 2018.1+
https://plugins.jetbrains.com/plugin/10485-kubernetes
Without Helm support this feature is useless…
Helm support has been added in the upcoming IntelliJ IDEA 2018.3
Are there any plans to fully support custom resource definitions? By that I mean, do you plan on supporting the validation of resources created based on custom resource definitions? What seems to happen now is that creating the CRD itself works fine and the yaml attributes are all validated against the schema, but any resources defined based on that CRD are not validated properly.
Maybe I just don’t know how to tell the plugin where to look for CRD yaml files?
CRD support will be available in 2019.1
Any plans to support multiple values files – where the ones being relevant can be gates by the value of an environment variable?
Use case is overriding via multiple values files like:
helm install …. -f chart/values.yaml -f values-${ENV}.yaml -f secret-values-${ENV}.yaml
There is a related request https://youtrack.jetbrains.com/issue/IDEA-200718. You can vote and add your considerations in there. We do have intention to implement it in some way but the target release isn’t defined yet.
Do you folks have any plans to support cluster exploring. status and deployment support?. Ie deploy to k8s?
We’re planning to introduce the cluster browser in the 2019.3. Deployment is also in the roadmap, not sure about the specific release.