
k8s-timezone-config
Configure timezone for Kubernetes pods using TZ environment variable. Use when deploying workloads that need Brazil/São Paulo timezone or when logs show UTC (+0000) instead of local time.
- Installs
- 98
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/julianobarbosa/claude-code-skills --skill k8s-timezone-config- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads k8s-timezone-config automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Kubernetes Pod Timezone Configuration
Standard timezone for your organization infrastructure: America/Sao_Paulo
Problem
Kubernetes pods run in UTC by default. Logs and application timestamps show +0000 offset instead of local Brazil time (-0300).
Solution
Add the TZ environment variable to container specifications.
Implementation Patterns
1. Helm Values (extraEnv pattern)
For Helm charts that support extraEnv:
# In values.yaml
extraEnv:
- name: TZ
value: America/Sao_Paulo
2. Multiple Containers
When a deployment has multiple containers (e.g., API server + frontend), add TZ to ALL containers:
apiServer:
extraEnv:
- name: TZ
value: America/Sao_Paulo
frontend:
extraEnv:
- name: TZ
value: America/Sao_Paulo
3. Raw Kubernetes Deployment
apiVersion: apps/v1
kind: Deployment
spec:
template:
spec:
containers:
- name: app
env:
- name: TZ
value: America/Sao_Paulo
4. StatefulSet
apiVersion: apps/v1
kind: StatefulSet
spec:
template:
spec:
containers:
- name: app
env:
- name: TZ
value: America/Sao_Paulo
Verification
After deployment, verify timezone is set correctly:
# Check pod logs for timestamp offset
# Before: 2026-01-13T11:37:06 +0000
# After: 2026-01-13T08:37:06 -0300
# Or exec into pod
kubectl exec -it <pod-name> -n <namespace> -- date
# Should show: Mon Jan 13 08:37:06 -03 2026
Common Applications Requiring Timezone
| Application | Config Location | Notes |
|---|---|---|
| Dependency-Track | apiServer.extraEnv + frontend.extraEnv | Both containers need TZ |
| Grafana | env or extraEnvVars | Single container |
| Loki | extraEnv | Affects log timestamps |
| Prometheus | server.env | Affects alert timestamps |
| DefectDojo | extraEnv | Django app |
| PostgreSQL | primary.extraEnvVars | Database timestamps |
Important Notes
- Restart required: Pods must restart for TZ changes to take effect
- All containers: Set TZ on ALL containers in a pod, including sidecars
- Init containers: Also set TZ on init containers if they log timestamps
- Cron jobs: Kubernetes CronJob schedules are always UTC - TZ only affects container-level time
your organization GitOps Workflow
- Edit values.yaml in
argo-cd-helm-values/kube-addons/<service>/<cluster>/values.yaml - Add TZ environment variable to all containers
- Commit and push (ArgoCD auto-syncs)
- Verify pods restart with new timezone
Reference
- IANA Timezone Database:
America/Sao_Paulo= UTC-3 (no DST since 2019) - Linux TZ variable: Uses
/usr/share/zoneinfo/America/Sao_Paulo
Gotchas
TZenv var only affects app-level timestamps, notkubectl logstimestamps (those come from the container runtime, which stays UTC). The kubelet timestamps stay+0000even after the pod's internal clock is São Paulo.- CronJob
schedule:is always UTC regardless of podTZ. A0 8 * * *schedule fires at 05:00 BRT, not 08:00 BRT. Usespec.timeZone: America/Sao_Pauloon the CronJob itself (K8s 1.27+) or compute the UTC offset manually. - Distroless and scratch images have no
/usr/share/zoneinfo—TZ=America/Sao_Paulosilently falls back to UTC. Either use a base image that ships tzdata or mount it via configMap/volume. - Init containers don't inherit
TZfrom the main container in older charts — set it on the init container spec separately or their migration logs stay UTC. - Java apps need
-Duser.timezone=America/Sao_Pauloin JAVA_OPTS in addition to TZ — the JVM reads its own property, not the env var, on some distributions. - PostgreSQL
TZenv var sets the OS clock, not the databasetimezonesetting. Server timestamps vianow()still use the value inpostgresql.conf— set both.
FAQ
What does the k8s-timezone-config skill do?
Configure timezone for Kubernetes pods using TZ environment variable. Use when deploying workloads that need Brazil/São Paulo timezone or when logs show UTC (+0000) instead of local time.
How do I install k8s-timezone-config?
Run npx skills add https://github.com/julianobarbosa/claude-code-skills --skill k8s-timezone-config in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/k8s-timezone-config/ (personal) or .claude/skills/k8s-timezone-config/ (project).
Which AI agents can use k8s-timezone-config?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is k8s-timezone-config safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains k8s-timezone-config?
It is published by julianobarbosa in julianobarbosa/claude-code-skills. It has 98 recorded installs.
More from julianobarbosa/claude-code-skills
markitdown
julianobarbosa/claude-code-skills
Guide for using Microsoft MarkItDown - a Python utility for converting files to Markdown. Use when converting PDF, Word, PowerPoint, Excel, images, audio, HTML, CSV, JSON, XML, ZIP, YouTube URLs, EPubs, Jupyter notebooks, RSS feeds, or Wikipedia pages to Markdown format. Also use for document processing pipelines, LLM preprocessing, or text extraction tasks.
obsidian-vault-management
julianobarbosa/claude-code-skills
Creates, edits, and manages Obsidian vault content including notes, templates, daily notes, and dataview queries. Use when working with markdown files in an Obsidian vault, creating notes, writing templates, building dataview queries, or organizing knowledge management content.
neovim
julianobarbosa/claude-code-skills
Comprehensive guide for this Neovim configuration - a modular, performance-optimized Lua-based IDE. Use when configuring plugins, adding keybindings, setting up LSP servers, debugging, or extending the configuration. Covers lazy.nvim, 82+ plugins across 9 categories, DAP debugging, AI integrations, and performance optimization.
markitdown-skill
julianobarbosa/claude-code-skills
Guide for using Microsoft MarkItDown - a Python utility for converting files to Markdown. Use when converting PDF, Word, PowerPoint, Excel, images, audio, HTML, CSV, JSON, XML, ZIP, YouTube URLs, EPubs, Jupyter notebooks, RSS feeds, or Wikipedia pages to Markdown format. Also use for document processing pipelines, LLM preprocessing, or text extraction tasks.
obsidian
julianobarbosa/claude-code-skills
Guide for implementing Obsidian knowledge management - vault operations, plugin development, URI scheme automation, markdown extensions, and Local REST API integration. Use when working with Obsidian vaults, creating plugins, automating note workflows, querying notes via API, or implementing knowledge graph features.
argocd-advanced
julianobarbosa/claude-code-skills
Advanced ArgoCD operations beyond the core CLI/API — multi-cluster ApplicationSet generators, automated image updates, new-cluster bootstrapping, and workload onboarding via templated ApplicationSets. USE WHEN working with ApplicationSet CRDs (list, cluster, git, matrix, merge, SCM, pull request, plugin generators), configuring ArgoCD Image Updater (semver/digest/newest-build update strategies + git write-back), bootstrapping a new Kubernetes cluster into a multi-repo GitOps setup, registering clusters with proper labels for ApplicationSet targeting, onboarding a new workload via the standard ApplicationSet template, or troubleshooting any of these. For routine app sync/status/diff work use the core argocd skill instead.
Popular devops & cloud skills
microsoft-foundry
microsoft/azure-skills
Build, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and resources end to end. USE FOR: foundry, azd ai agent, azd provision/deploy, hosted agent scaffold/develop/run/deploy/troubleshoot, prompt agent create, managed harness agent create, GitHub Copilot harness agent, create agent, update agent, add tool to agent, invoke agent, agent insights, evaluate agent, batch eval, continuous eval, continuous monitoring, agent CI/CD, optimize prompt, improve prompt, optimize agent instructions, Agent Optimizer scaffold, dataset curation from traces, deploy model, model fine-tuning (SFT/DPO/RFT), Foundry project, RBAC, role assignment, permissions, quota, capacity, region, deployment failure, AI Services, create Foundry resource, knowledge index, customize deployment, onboard, availability, training-data, grader, distillation, large file upload. DO NOT USE FOR: Azure Functions, App Service, general Azure deploy (use azure-deploy), general Azure prep (use azure
azure-diagnostics
microsoft/azure-skills
Debug Azure production issues on Azure using AppLens, Azure Monitor, resource health, and safe triage. WHEN: debug production issues, troubleshoot app service, app service high CPU, app service deployment failure, troubleshoot container apps, container app 503 or target port mismatch, troubleshoot functions, function telemetry missing or stopped after a config/connection-string change, troubleshoot AKS, VM RDP, Linux SSH, VM black screen, can't connect to VM, reset VM password, NSG or firewall blocking, kubectl cannot connect, kube-system/CoreDNS failures, pod pending, crashloop, node not ready, upgrade failures, analyze logs, KQL, insights, image pull failures, cold start issues, health probe failures, resource health, root cause of errors, troubleshoot event hubs, troubleshoot service bus, messaging SDK error, AMQP connection failure, message lock lost, lock renewal during long-running processing, service bus dead letter.
azure-prepare
microsoft/azure-skills
Prepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Terraform), and Dockerfiles for the Azure Developer CLI (azd) workflow. USE ONLY when the user explicitly wants to use azd as the deployment tool, or the project already has an azure.yaml file. DO NOT USE FOR: non-azd deployments, Python App Service code-only deploys (use python-appservice-deploy), or cross-cloud migration (use azure-cloud-migrate). WHEN: prepare app for azd, create azure.yaml, set up azd infrastructure, modernize app for Azure with azd, deploy with azd, function app, timer trigger, service bus trigger, event-driven function, managed identity, generate Bicep, generate Terraform, create and deploy to Azure.
azure-ai
microsoft/azure-skills
Use for Azure AI: Search, Speech, OpenAI, Document Intelligence. Helps with search, vector/hybrid search, speech-to-text, text-to-speech, transcription, OCR. WHEN: AI Search, query search, vector search, hybrid search, semantic search, speech-to-text, text-to-speech, transcribe, OCR, convert text to speech.
azure-deploy
microsoft/azure-skills
Execute Azure deployments for ALREADY-PREPARED applications that have existing .azure/deployment-plan.md and infrastructure files. DO NOT use this skill when the user asks to CREATE a new application — use azure-prepare instead. This skill runs azd up, azd deploy, terraform apply, and az deployment commands with built-in error recovery. Requires .azure/deployment-plan.md from azure-prepare and validated status from azure-validate. WHEN: "run azd up", "run azd deploy", "execute deployment", "push to production", "push to cloud", "go live", "ship it", "bicep deploy", "terraform apply", "publish to Azure", "launch on Azure". DO NOT USE WHEN: "create and deploy", "build and deploy", "create a new app", "set up infrastructure", "create and deploy to Azure using Terraform" — use azure-prepare for these.
azure-validate
microsoft/azure-skills
Pre-deployment validation for Azure readiness. Run deep checks on configuration, infrastructure (Bicep or Terraform), RBAC role assignments, managed identity permissions, and prerequisites before deploying. WHEN: validate my app, check deployment readiness, run preflight checks, verify configuration, check if ready to deploy, validate azure.yaml, validate Bicep, test before deploying, troubleshoot deployment errors, validate Azure Functions, validate function app, validate serverless deployment, verify RBAC roles, check role assignments, review managed identity permissions, what-if analysis, validate Container Apps deployment.