upload
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
Interview portal for my Kubernetes home lab. A single-page Next.js site with two sections:
|
Interview portal for my Kubernetes home lab. A single-page Next.js site with two sections:
|
||||||
|
|
||||||
1. **The Lab** - diagrams of the request path and the CI/CD pipeline, plus a link list for `it-cost-prod`, `harbor` and `gitea`.
|
1. **The Lab** - diagrams of the request path and the CI/CD pipeline, plus a link list for `it-cost-prod`, `harbor` and `gitea`.
|
||||||
- Request path: GoDaddy DNS -> host Nginx :80 -> ingress-nginx :8081 -> Service -> Pod for the applications. `harbor` (`:8080`) and `gitea` (`:3001`) are not behind ingress-nginx; they are reached directly on their own ports.
|
- Request path: GoDaddy DNS -> host Nginx :80 -> ingress-nginx :8081 -> Service -> Pod for the applications. `harbor` (`:8080`) and `gitea` (`:3001`) are pods in the same cluster, but each is exposed by its own LoadBalancer Service on a host port, so they are not behind ingress-nginx.
|
||||||
- CI/CD: git push -> Gitea Actions -> docker build -> Harbor -> Helm -> Kubernetes.
|
- CI/CD: git push -> Gitea Actions -> docker build -> Harbor -> Helm -> Kubernetes.
|
||||||
2. **Travel** - link to the travel map.
|
2. **Travel** - link to the travel map.
|
||||||
|
|
||||||
|
|||||||
+4
-3
@@ -27,13 +27,14 @@ export default function Home() {
|
|||||||
id="lab"
|
id="lab"
|
||||||
eyebrow="The Lab"
|
eyebrow="The Lab"
|
||||||
title="A Kubernetes lab on a Mac mini"
|
title="A Kubernetes lab on a Mac mini"
|
||||||
lead="Kubernetes comes from Docker Desktop on my Mac mini. A host-level Nginx accepts traffic on port 80 and hands it to the cluster's ingress controller, which routes each application hostname to the right service. Harbor and Gitea sit outside the cluster and are reached directly on their own ports. Everything below is hosted on that one machine, including this site."
|
lead="Kubernetes comes from Docker Desktop on my Mac mini. A host-level Nginx accepts traffic on port 80 and hands it to the cluster's ingress controller, which routes each application hostname to the right service. Harbor and Gitea run in the same cluster, but each is exposed by its own LoadBalancer service on a host port, so they skip the ingress. Everything below is hosted on that one machine, including this site."
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<SubHeading title="How a request reaches a pod">
|
<SubHeading title="How a request reaches a pod">
|
||||||
DNS is managed at GoDaddy. Application traffic passes through the host Nginx and the
|
DNS is managed at GoDaddy. Application traffic passes through the host Nginx and the
|
||||||
cluster ingress before landing on a pod. Harbor and Gitea are not behind the ingress;
|
cluster ingress before landing on a pod. Harbor and Gitea are pods in the cluster too,
|
||||||
they are served directly on their own ports.
|
but each is exposed by its own LoadBalancer service on :8080 and :3001, so they are not
|
||||||
|
behind the ingress.
|
||||||
</SubHeading>
|
</SubHeading>
|
||||||
<RequestFlow />
|
<RequestFlow />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,16 +5,22 @@ export function Section({
|
|||||||
eyebrow,
|
eyebrow,
|
||||||
title,
|
title,
|
||||||
lead,
|
lead,
|
||||||
|
compactTop = false,
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
id: string;
|
id: string;
|
||||||
eyebrow: string;
|
eyebrow: string;
|
||||||
title: string;
|
title: string;
|
||||||
lead?: ReactNode;
|
lead?: ReactNode;
|
||||||
|
/** Trim the top padding when the section follows another one, so the gap between them isn't doubled. */
|
||||||
|
compactTop?: boolean;
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<section id={id} className="scroll-mt-16 py-16 sm:py-24">
|
<section
|
||||||
|
id={id}
|
||||||
|
className={`scroll-mt-16 pb-16 sm:pb-24 ${compactTop ? "pt-2 sm:pt-4" : "pt-16 sm:pt-24"}`}
|
||||||
|
>
|
||||||
<div className="mx-auto w-full max-w-6xl px-6">
|
<div className="mx-auto w-full max-w-6xl px-6">
|
||||||
<p className="text-sm font-semibold tracking-widest text-sky-400 uppercase">
|
<p className="text-sm font-semibold tracking-widest text-sky-400 uppercase">
|
||||||
{eyebrow}
|
{eyebrow}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ export function Travel() {
|
|||||||
return (
|
return (
|
||||||
<Section
|
<Section
|
||||||
id="travel"
|
id="travel"
|
||||||
|
compactTop
|
||||||
eyebrow="Beyond the terminal"
|
eyebrow="Beyond the terminal"
|
||||||
title="Get to know me through my travel album"
|
title="Get to know me through my travel album"
|
||||||
lead="Outside of work I like to explore. Pin by pin, the travel map is a visual diary of the places I have been."
|
lead="Outside of work I like to explore. Pin by pin, the travel map is a visual diary of the places I have been."
|
||||||
|
|||||||
@@ -1,15 +1,9 @@
|
|||||||
import { siDocker, siGit, siGitea, siHarbor, siHelm, siKubernetes } from "simple-icons";
|
import { siDocker, siGit, siGitea, siHarbor, siHelm, siKubernetes } from "simple-icons";
|
||||||
import { GitBranch } from "lucide-react";
|
|
||||||
import { BrandIcon } from "@/components/BrandIcon";
|
import { BrandIcon } from "@/components/BrandIcon";
|
||||||
import { Connector, FlowNode } from "@/components/flow";
|
import { Connector, FlowNode } from "@/components/flow";
|
||||||
|
|
||||||
const guarantees = [
|
|
||||||
{ icon: <GitBranch className="size-4" aria-hidden="true" />, text: "One pipeline, two environments" },
|
|
||||||
];
|
|
||||||
|
|
||||||
export function CicdFlow() {
|
export function CicdFlow() {
|
||||||
return (
|
return (
|
||||||
<div>
|
|
||||||
<div className="flex flex-col items-stretch lg:flex-row lg:items-stretch">
|
<div className="flex flex-col items-stretch lg:flex-row lg:items-stretch">
|
||||||
<FlowNode
|
<FlowNode
|
||||||
step={1}
|
step={1}
|
||||||
@@ -65,18 +59,5 @@ export function CicdFlow() {
|
|||||||
detail="Deployment · Service · Ingress"
|
detail="Deployment · Service · Ingress"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul className="mt-6 flex flex-wrap gap-2">
|
|
||||||
{guarantees.map((g) => (
|
|
||||||
<li
|
|
||||||
key={g.text}
|
|
||||||
className="flex items-center gap-2 rounded-full border border-white/10 bg-white/5 px-3 py-1.5 text-xs text-slate-300"
|
|
||||||
>
|
|
||||||
<span className="text-emerald-300">{g.icon}</span>
|
|
||||||
{g.text}
|
|
||||||
</li>
|
|
||||||
))}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,8 +19,11 @@ type Target = {
|
|||||||
accent: string;
|
accent: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Reached on their own host ports; they sit beside the cluster, not behind it. */
|
/**
|
||||||
const direct: Target[] = [
|
* Pods in the cluster that are exposed by their own LoadBalancer Service on a
|
||||||
|
* host port, so they bypass ingress-nginx.
|
||||||
|
*/
|
||||||
|
const loadBalanced: Target[] = [
|
||||||
{
|
{
|
||||||
name: "harbor",
|
name: "harbor",
|
||||||
detail: "harbor.tomchien.com:8080",
|
detail: "harbor.tomchien.com:8080",
|
||||||
@@ -109,8 +112,11 @@ export function RequestFlow() {
|
|||||||
label="Mac mini · macOS host"
|
label="Mac mini · macOS host"
|
||||||
icon={<BrandIcon icon={siApple} color="#e2e8f0" className="size-3.5" />}
|
icon={<BrandIcon icon={siApple} color="#e2e8f0" className="size-3.5" />}
|
||||||
>
|
>
|
||||||
<div className="space-y-6">
|
<div className="flex flex-col items-stretch lg:flex-row lg:items-start">
|
||||||
<div className="flex flex-col items-stretch lg:flex-row lg:items-center">
|
{/* lg:mt-9 lines the Nginx node up with the ingress-nginx node (the
|
||||||
|
first row inside the Docker Desktop boundary), not with the whole
|
||||||
|
boundary, which is taller because of the LoadBalancer row. */}
|
||||||
|
<div className="flex flex-col items-stretch lg:mt-9 lg:flex-none lg:flex-row lg:items-center">
|
||||||
<FlowNode
|
<FlowNode
|
||||||
step={3}
|
step={3}
|
||||||
accent={`#${siNginx.hex}`}
|
accent={`#${siNginx.hex}`}
|
||||||
@@ -118,9 +124,10 @@ export function RequestFlow() {
|
|||||||
title="Nginx on the host"
|
title="Nginx on the host"
|
||||||
subtitle="Edge reverse proxy: takes port 80 and forwards it to the cluster ingress."
|
subtitle="Edge reverse proxy: takes port 80 and forwards it to the cluster ingress."
|
||||||
detail="listen :80 → 127.0.0.1:8081"
|
detail="listen :80 → 127.0.0.1:8081"
|
||||||
className="lg:max-w-60"
|
className="lg:w-60 lg:flex-none"
|
||||||
/>
|
/>
|
||||||
<Connector label="proxy_pass" />
|
<Connector label="proxy_pass" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<Boundary
|
<Boundary
|
||||||
label="Docker Desktop · Kubernetes"
|
label="Docker Desktop · Kubernetes"
|
||||||
@@ -128,6 +135,7 @@ export function RequestFlow() {
|
|||||||
tone="border-sky-400/40"
|
tone="border-sky-400/40"
|
||||||
className="min-w-0 flex-1"
|
className="min-w-0 flex-1"
|
||||||
>
|
>
|
||||||
|
<div className="space-y-6">
|
||||||
<div className="flex flex-col items-stretch lg:flex-row lg:items-center">
|
<div className="flex flex-col items-stretch lg:flex-row lg:items-center">
|
||||||
<FlowNode
|
<FlowNode
|
||||||
step={4}
|
step={4}
|
||||||
@@ -158,15 +166,13 @@ export function RequestFlow() {
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Boundary>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
<div className="border-t border-dashed border-sky-400/25 pt-4">
|
||||||
<p className="mb-2 text-xs font-medium tracking-wide text-slate-400 uppercase">
|
<p className="mb-2 text-xs font-medium tracking-wide text-slate-400 uppercase">
|
||||||
Direct on their own ports · not behind ingress-nginx
|
LoadBalancer Service → Pod · own ports, not behind ingress-nginx
|
||||||
</p>
|
</p>
|
||||||
<ul className="grid gap-2 sm:grid-cols-2">
|
<ul className="grid gap-2 sm:grid-cols-2">
|
||||||
{direct.map((t) => (
|
{loadBalanced.map((t) => (
|
||||||
<li key={t.name}>
|
<li key={t.name}>
|
||||||
<TargetCard t={t} />
|
<TargetCard t={t} />
|
||||||
</li>
|
</li>
|
||||||
@@ -176,5 +182,7 @@ export function RequestFlow() {
|
|||||||
</div>
|
</div>
|
||||||
</Boundary>
|
</Boundary>
|
||||||
</div>
|
</div>
|
||||||
|
</Boundary>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user