Create and switch to instavote namespace
kubectl create namespace instavote
kubectl config set-context --current --namespace=instavote
switch to project directory
cd k8s-code/projects/instavote/dev
apiVersion: apps/v1 | |
kind: DaemonSet | |
metadata: | |
name: vote | |
labels: | |
role: vote | |
namespace: demo | |
spec: | |
minReadySeconds: 20 | |
selector: |
Create and switch to instavote namespace
kubectl create namespace instavote
kubectl config set-context --current --namespace=instavote
switch to project directory
cd k8s-code/projects/instavote/dev
{ | |
"title": "ML Model API - Full Observability Dashboard", | |
"timezone": "browser", | |
"refresh": "10s", | |
"schemaVersion": 30, | |
"version": 1, | |
"panels": [ | |
{ | |
"type": "timeseries", | |
"title": "Request Rate (Total per Endpoint)", |
{ | |
"title": "FastAPI Prometheus Metrics Dashboard", | |
"timezone": "browser", | |
"refresh": "10s", | |
"schemaVersion": 30, | |
"version": 1, | |
"panels": [ | |
{ | |
"type": "timeseries", | |
"title": "Request Rate (Total)", |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: {{ include "vote.fullname" . }} | |
labels: | |
{{- include "vote.labels" . | nindent 4 }} | |
spec: | |
type: {{ .Values.service.type }} | |
ports: | |
- port: {{ .Values.service.port }} |
Install helm to setup Nginx Ingress Controller. To install helm version 3 on Linux or MacOS, you can follow following instructions.
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
You could further refer to Official HELM Install Instructions for alternative options.
--- | |
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: vote | |
namespace: instavote | |
spec: | |
ingressClassName: nginx | |
rules: | |
- host: vote.example.com |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: vote | |
labels: | |
role: vote | |
spec: | |
minReadySeconds: 20 | |
replicas: 4 | |
strategy: |
# .github/workflows/mlops-pipeline.yml | |
name: MLOps Pipeline | |
on: | |
workflow_dispatch: | |
inputs: | |
run_all: | |
description: 'Run all jobs' | |
required: false | |
default: 'true' |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: vote | |
labels: | |
role: vote | |
annotations: | |
kubernetes.io/change-cause: "image updated to v4" | |
spec: | |
replicas: 4 |