Skip to content

Instantly share code, notes, and snippets.

@quangvinh2080
Last active February 17, 2025 05:21
Show Gist options
  • Select an option

  • Save quangvinh2080/48919a8a7ef34784649b4ab84fa4587c to your computer and use it in GitHub Desktop.

Select an option

Save quangvinh2080/48919a8a7ef34784649b4ab84fa4587c to your computer and use it in GitHub Desktop.
simple deployment and service with helm #kubernetes #helm
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "oryza-nginx.fullname" . }}
labels:
{{- include "oryza-nginx.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "oryza-nginx.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "oryza-nginx.selectorLabels" . | nindent 8 }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"
ports:
- name: http
containerPort: 80
- name: https
containerPort: 443
env:
{{- toYaml .Values.env | nindent 12 }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment