Junior — Middle
Have you used YAML for resource configuration or management in Kubernetes in your projects?
sobes.tech AI
Answer from AI
Yes, YAML is widely used for configuring and managing resources in Kubernetes. In my projects, I have written YAML manifests to describe Kubernetes objects such as Pod, Deployment, Service, ConfigMap, and others.
Example of a simple Deployment in YAML:
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
spec:
replicas: 3
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
spec:
containers:
- name: my-container
image: my-image:latest
ports:
- containerPort: 80
Using YAML allows for declarative description of the cluster state and convenient management of infrastructure through kubectl or CI/CD pipelines.