Senior
Have you worked with Kubernetes? What deployment tools did you use?
sobes.tech AI
Answer from AI
Yes, I have worked with Kubernetes. For deployment, I used several tools:
- kubectl — the standard CLI for managing Kubernetes clusters, used YAML manifests to create and update resources.
- Helm — a package manager for Kubernetes that allows creating, versioning, and deploying applications as charts, simplifying management of complex configurations.
- Argo CD — a GitOps tool that automatically synchronizes the cluster state with the Git repository, providing declarative deployment and rollback.
An example of a simple Helm chart for deploying an application:
# Chart.yaml
apiVersion: v2
name: myapp
version: 0.1.0
# values.yaml
replicaCount: 2
image:
repository: myapp
tag: latest
# templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Chart.Name }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Chart.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"