commit 12711bc3fa98d041f090a0aa9effc397d93581d7 Author: Stanislav Fifik Date: Tue Jul 21 19:30:48 2026 +0000 init diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..dc05a13 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +.git +chart +README.md diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e98abb4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM nginx:1.29-alpine + +COPY index.html /usr/share/nginx/html/index.html + +EXPOSE 80 diff --git a/README.md b/README.md new file mode 100644 index 0000000..0abe0fd --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +# Minikube hello + +A minimal NGINX image deployed to Minikube with Helm at +`http://hello.k.mancave.link`. + +## Build and push + +```bash +docker build -t git.fisoft.eu/ficik/minikube/hello:latest . +docker push git.fisoft.eu/ficik/minikube/hello:latest +``` + +## Deploy + +Create a `kubernetes.io/dockerconfigjson` pull secret named +`git-fisoft-registry` in the `hello` namespace with credentials for +`git.fisoft.eu`, then install the chart: + +```bash +helm upgrade --install hello ./chart --namespace hello --create-namespace +``` diff --git a/chart/Chart.yaml b/chart/Chart.yaml new file mode 100644 index 0000000..8d7efab --- /dev/null +++ b/chart/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: hello +description: Hello-world NGINX application for Minikube +type: application +version: 0.1.0 +appVersion: "latest" diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml new file mode 100644 index 0000000..3a31bf3 --- /dev/null +++ b/chart/templates/deployment.yaml @@ -0,0 +1,37 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name }} + labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} + template: + metadata: + labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} + spec: + imagePullSecrets: + {{- toYaml .Values.imagePullSecrets | nindent 8 }} + containers: + - name: nginx + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: http + containerPort: 80 + protocol: TCP + readinessProbe: + httpGet: + path: / + port: http + livenessProbe: + httpGet: + path: / + port: http diff --git a/chart/templates/ingress.yaml b/chart/templates/ingress.yaml new file mode 100644 index 0000000..2f52edc --- /dev/null +++ b/chart/templates/ingress.yaml @@ -0,0 +1,20 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ .Release.Name }} + labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} +spec: + ingressClassName: {{ .Values.ingress.className }} + rules: + - host: {{ .Values.ingress.host }} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: {{ .Release.Name }} + port: + number: {{ .Values.service.port }} diff --git a/chart/templates/service.yaml b/chart/templates/service.yaml new file mode 100644 index 0000000..36cbe5f --- /dev/null +++ b/chart/templates/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Release.Name }} + labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} + ports: + - name: http + port: {{ .Values.service.port }} + targetPort: http + protocol: TCP diff --git a/chart/values.yaml b/chart/values.yaml new file mode 100644 index 0000000..5df5f67 --- /dev/null +++ b/chart/values.yaml @@ -0,0 +1,16 @@ +replicaCount: 1 + +image: + repository: git.fisoft.eu/ficik/minikube/hello + tag: latest + pullPolicy: Always + +imagePullSecrets: + - name: git-fisoft-registry + +service: + port: 80 + +ingress: + className: nginx + host: hello.k.mancave.link diff --git a/index.html b/index.html new file mode 100644 index 0000000..6468f18 --- /dev/null +++ b/index.html @@ -0,0 +1,12 @@ + + + + + + Hello from Minikube + + +

Hello, world!

+

Served by NGINX on Minikube.

+ +