In daily K8S operation and maintenance work, we usually obtain YAML templates in the following two friendly ways:
After executing the above command, a deploy YAML file will be generated in the terminal, as shown below: The above basic information has been generated. However, if you need to deploy to another namespace, you need to add the namespace yourself. Or add parameters to specify the namespace to deploy in the command line. The command is as follows: Plugin InstallationToday I will introduce a very useful tool that can generate a YAML template for K8S resources with one click. To use this tool, you need to prepare the following environment in advance: Install Visual studio Code (version >= 1.38) Install Red Hat YAML, a plugin that provides comprehensive YAML language support for Visual Studio Code. Install the Kubernetes Templates plug-in, which can help us generate K8S resource YAML template files in one click. After the above two plug-ins are installed, restart vscode. Basic UseThe usage is also very simple. Open vscode, create a new file, and then select YAML as the file format, as shown below: For example, if we want to create a deploy template file, we only need to enter k in the file, and then vscode will intelligently prompt all templates starting with k, as shown in the following figure: When we select k8sDeployment and press Enter, a very detailed template will be generated. As shown in the following figure: This tool is really great. It allows us to no longer worry about finding K8S resource templates. It covers almost all K8S resource files. After using it, our work efficiency has been significantly improved. |
[51CTO.com original article] The Huawei Enterpris...
As data center infrastructure adopts artificial i...
For the younger generation, they are born in a ma...
5G is seen by the industry as a revolutionary wir...
Nokia has announced a partnership with EDZCOM, a ...
We are witnessing a massive transformation in the...
A few days ago, we posted simple test information...
Hello everyone, I am Xiaozaojun. [[329660]] When ...
Enterprises looking to launch and expand IoT appl...
As traditional industrial control systems and equ...
On August 11, according to foreign media reports,...
During the past Spring Festival, the novel corona...
The solution uses new Bluetooth Low Energy (BLE) ...
In the Wi-Fi world, 6GHz will be a major breakthr...
Http protocol is easy to use for programmers with...