Stage 3 · Build
Go for SRE
Building production tools, automation, Kubernetes controllers, and exporters in Go.
Prerequisite
Go basics + Linux.
What this course leaves you with
- Build production CLIs, exporters, and controllers
- Ship static binaries anywhere
- Write correct concurrent code with confidence
Why this stage matters — Your software works — now understand the databases it writes to.
Progress
0 of 54 lessons complete. Progress is stored locally in your browser so you can pick the path back up later.
course completion
Go Fundamentals for SREs
The language features that matter for infrastructure code.
- 01Why Go for InfrastructureCompilation, deployment, concurrency, and the standard library.5 min
- 02Project Layout & ModulesGo modules, internal packages, and CLI project structure.6 min
- 03Error Handling PatternsSentinel errors, wrapping, fmt.Errorf, and error inspection.7 min
- 04Testing & BenchmarkingTable-driven tests, testify, benchmarks, and fuzzing.7 min
- 05Profiling & Optimizationpprof, trace, escape analysis, and allocation profiling.7 min
- 06CI/CD for Go ProjectsGoReleaser, golangci-lint, and multi-arch releases.6 min
Building CLI Tools
Cobra, Viper, and creating delightful command-line experiences.
- 01Cobra BasicsCommands, flags, subcommands, and auto-completion.7 min
- 02Viper for ConfigurationEnv vars, config files, remote config, and pflag binding.6 min
- 03Interactive CLIspromptui, survey, bubbletea for TUIs.7 min
- 04Output FormatsTable, JSON, YAML, and templating with Go templates.6 min
- 05Plugin ArchitectureHashiCorp go-plugin, Yaegi, and dynamic loading.7 min
- 06Distribution & InstallationHomebrew, Scoop, apt/yum repos, and curl | bash installers.5 min
Kubernetes Controllers in Go
Controller-runtime, operator-sdk, and building custom controllers.
- 01The Controller PatternReconcile loop, informers, workqueues, and finalizers.8 min
- 02Controller-runtime Deep DiveManager, client, cache, and builder API.8 min
- 03CRD DesignValidation, conversion, subresources, and printer columns.7 min
- 04Admission WebhooksMutating/validating webhooks, cert-manager, and CEL.7 min
- 05Operator SDK & Ansible/HelmScaffolding, bundle, and OLM integration.6 min
- 06Testing Controllersenvtest, ginkgo, and integration testing with kind.7 min
Observability & Networking
Prometheus exporters, gRPC, and production-ready services.
- 01Writing Prometheus ExportersCollector pattern, metrics types, and the promhttp package.7 min
- 02OpenTelemetry GoTracing, metrics, logs — the OTel SDK and auto-instrumentation.8 min
- 03gRPC & ProtobufUnary/streaming, interceptors, reflection, and grpcurl.7 min
- 04Production HTTP ServersGraceful shutdown, timeouts, middleware, and httprouter.6 min
- 05Advanced Concurrencyerrgroup, semaphore, worker pools, and pipeline patterns.7 min
- 06Production HardeningHealth checks, readiness, structured logging, and config validation.6 min
Concurrency in Depth
Building predictable concurrent Go programs with cancellation, synchronization, and tests.
- 01Goroutine LifecycleSpawn costs, leaks, ownership, and detecting blocked goroutines with stack dumps.7 min
- 02Channel PatternsFan-in, fan-out, pipelines, buffered channels, and closing protocols.8 min
- 03select, Timeouts & Tickersselect fairness, time.After pitfalls, ticker cleanup, and non-blocking operations.7 min
- 04Context CancellationDeadlines, cancellation trees, request-scoped values, and signal-aware shutdown.7 min
- 05sync PrimitivesMutex, RWMutex, Cond, Once, Pool, atomic, and when channels are the wrong tool.8 min
- 06Race Detector & Worker Poolsgo test -race, bounded workers, backpressure, and errgroup coordination.8 min
Performance, Memory & Debugging
Diagnosing production Go services with compiler, runtime, profiler, and debugger tools.
- 01Escape AnalysisUsing go build -gcflags=-m to understand heap allocation and inlining decisions.7 min
- 02GC TuningGOGC, GOMEMLIMIT, heap goals, pacer behavior, and latency tradeoffs.8 min
- 03pprof & runtime/traceCPU, heap, mutex, block profiles, execution traces, and flame graph workflows.8 min
- 04Delve DebuggingBreakpoints, goroutine inspection, core dumps, and remote debugging with dlv.7 min
- 05GODEBUG Runtime Flagsgctrace, schedtrace, http2debug, netdns, and reading runtime diagnostics.6 min
- 06Production Benchmarkingbenchstat, realistic fixtures, shadow traffic, and safe profiling in live services.7 min
Standard Library for Operations
Using core Go packages to build dependable automation without heavy dependencies.
- 01Filesystem with osos.ReadFile, os.Stat, os.MkdirAll, file modes, temp files, and atomic rename patterns.7 min
- 02Command Executionos/exec contexts, stdout/stderr capture, exit status handling, and safe argument passing.8 min
- 03Streaming I/Oio.Reader, io.Writer, bufio.Scanner limits, io.Pipe, and copying large outputs safely.7 min
- 04HTTP Clientsnet/http clients, timeouts, transports, retries, and request tracing with httptrace.8 min
- 05Encoding & Configencoding/json, yaml adapters, csv parsing, base64, and strict schema decoding.6 min
- 06Time & Timerstime.Duration, monotonic clocks, timers, tickers, and deadline calculations.6 min
Long-Running Daemons & Services
Building Go processes that start, reload, drain, and stop predictably.
- 01Signal Handlingos/signal, SIGTERM, SIGINT, SIGHUP, context cancellation, and shutdown deadlines.7 min
- 02Graceful HTTP Shutdownhttp.Server Shutdown, connection draining, readiness flips, and Kubernetes terminationGracePeriodSeconds.8 min
- 03Configuration LoadingEnvironment variables, config files, validation, defaults, and live reload boundaries.7 min
- 04Structured Logging with slogslog handlers, attributes, log levels, request IDs, and JSON logs for collectors.7 min
- 05Supervisor Integrationsystemd NotifyAccess, Docker healthchecks, PID 1 behavior, and exit code contracts.6 min
- 06Background Workerserrgroup, bounded queues, backoff, jitter, and draining worker pools safely.8 min
Metrics, Health & Profiling
Exposing operational signals and debugging endpoints for production Go binaries.
- 01Prometheus client_golangCounters, gauges, histograms, registries, labels, and promhttp handlers.8 min
- 02Custom ExportersCollector implementations, scrape errors, const metrics, and cardinality controls.7 min
- 03Health & Readiness Endpoints/healthz, /readyz, dependency checks, startup probes, and degraded states.7 min
- 04pprof Endpointsnet/http/pprof, CPU profiles, heap profiles, block profiles, and secured debug listeners.7 min
- 05Benchmark Analysisgo test -bench, benchstat, allocation counts, and isolating noisy measurements.7 min
- 06Goroutine Leak Detectionruntime.NumGoroutine, goleak, stack dumps, context leaks, and blocked channel diagnostics.8 min