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
# .github/workflows/mlops-pipeline.yml | |
name: MLOps Pipeline | |
on: | |
push: | |
branches: [ main ] | |
tags: [ 'v*.*.*' ] | |
pull_request: | |
branches: [ main ] | |
model: | |
best_model: GradientBoosting | |
feature_sets: | |
rfe: | |
- '0' | |
- '1' | |
- '2' | |
- '3' | |
- '4' | |
- '5' |
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: |