Kubernetes YAML file, which I copied from PDF file. It should be nice, if I could format the file in order to have the correct indentation of the k8s file
What I have now:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: minimal-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
ingressClassName: nginx-example
rules:
- http:
paths:
- path: /testpath
pathType: Prefix
backend:
service:
name: test
port:
number: 80
What would I like to have
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: minimal-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
ingressClassName: nginx-example
rules:
- http:
paths:
- path: /testpath
pathType: Prefix
backend:
service:
name: test
port:
number: 80
Additional information: from my current vscode (1.73.1) I have already installed both the following extensions
Name: YAML
Id: redhat.vscode-yaml
Description: YAML Language Support by Red Hat, with built-in Kubernetes syntax support
Version: 1.10.1
Publisher: Red Hat
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml
and
Name: Kubernetes YAML Formatter
Id: kennylong.kubernetes-yaml-formatter
Description: A better YAML formatter for DevOps like Kubernetes, Ansible, CI/CD, etc.
Version: 1.1.0
Publisher: kennylong
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=kennylong.kubernetes-yaml-formatter
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!