kubectl get secret -n monitoring prom-grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
Following is a crisp, battle-tested playbook for running databases on Kubernetes—what to do, what to avoid, and how to keep them safe, fast, and recoverable.
- Default to managed DBs if possible (RDS/Aurora/Cloud SQL/AlloyDB/Atlas). Run on K8s only when you need: portability, custom extensions, tight sidecar/tooling, or cost control with commodity nodes.
- Use an Operator, not raw manifests. Prefer mature operators (e.g., Crunchy/Percona for Postgres & MySQL, Vitess for MySQL sharding, PXC/MongoDB Enterprise/StackGres, RabbitMQ Operator for queues). Operators give sane HA, backups, upgrades, and day-2 ops.
- StatefulSets + Headless Services for stable identities and volumes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # airbnb_mcp.py | |
| from textwrap import dedent | |
| from agno.agent import Agent | |
| from agno.models.google import Gemini | |
| from agno.tools.mcp import MCPTools | |
| from agno.tools.reasoning import ReasoningTools | |
| from agno.os import AgentOS | |
switch to instavote namespace
kubectl config set-context --current --namespace=instavote
helm uninstall -n dev instavote
kubectl delete deploy vote redis db result worker -n instavote
kubectl delete svc vote redis db result -n instavote
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| apiVersion: networking.k8s.io/v1 | |
| kind: Ingress | |
| metadata: | |
| name: vote | |
| namespace: instavote | |
| spec: | |
| ingressClassName: nginx | |
| rules: | |
| - host: vote.example.com |
Create a namespace
kubectl create namespace instavote
kubectl config set-context --current --namespace=instavote
git clone https://github.com/schoolofdevops/instavote-kustomize.git
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: vote | |
| namespace: default | |
| spec: | |
| replicas: 2 | |
| selector: | |
| matchLabels: | |
| app: vote |
rag/build_index.py
# rag/build_index.py
import argparse, json
from pathlib import Path
from typing import Dict, Any, Iterable, Tuple, List
# ---------- common snippet renderers ----------
-
That log line:
Overriding ... dispatch key: AutocastCPU ... new kernel: ... ipex-cpu ... INFO ... Automatically detected platform cpu.
means IPEX’s autocast kernels replaced the default ones. With --dtype=float16 on CPU, PyTorch/ipex either upcasts or hits slow/non-vectorized code paths and can “hang” at model load/compile.