nais

Guide Nais manifest creation and Kubernetes troubleshooting for deployment issues.

52|13|Updated Jan 10, 2025
One-click install
npx skills add https://github.com/navikt/copilot --skill nais
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nais
Source: https://github.com/navikt/copilot/tree/main/.github/skills/nais
Command: npx skills add https://github.com/navikt/copilot --skill nais

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Nais deployment work often stalls due to misconfigured manifests, missing required health and observability settings, incorrect accessPolicy rules, or opaque pod failures during rollout and pod lifecycle events.

Core Features & Use Cases

  • Deploy and validate Nais manifests: Guides required Application structure, health endpoints, metrics, resources, ingress, and environment-specific patterns.
  • Manage GCP and platform integrations: Covers common NAIS-managed GCP resources like PostgreSQL and Kafka configuration, plus authentication and service-to-service access patterns.
  • Troubleshoot pod lifecycle and failures: Provides kubectl-based diagnostic commands and explains graceful shutdown behavior (preStop, SIGTERM, drain, grace period) to prevent crashes during termination.

Quick Start

Ask for a Nais Application manifest for your service including liveness, readiness, and metrics endpoints, explicit accessPolicy, and correct resource requests/limits.

Frequently Asked Questions about nais

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a NAIS application manifest with required health and observability endpoints?

To create a NAIS application manifest, define liveness, readiness, and metrics endpoints alongside explicit accessPolicy rules and resource requests/limits to ensure safe deployment and pod stability on Kubernetes.

Why does my NAIS pod crash during startup or termination on Kubernetes?

Pod startup or crash loops often stem from misconfigured manifests or missing health endpoints. Diagnose failures using kubectl workflows and ensure graceful shutdown behavior with preStop hooks and correct grace periods.

How do I configure GCP resources like PostgreSQL and Kafka for a NAIS app?

Configure NAIS-managed GCP resources like PostgreSQL and Kafka by specifying the required integration settings in your Nais manifest to enable database access and event streaming for your application.

What is the best way to troubleshoot pod lifecycle and accessPolicy issues in NAIS?

Troubleshoot NAIS pod lifecycle and accessPolicy issues by running kubectl diagnostic commands to inspect pod states and verifying your manifest's service-to-service access rules are correctly configured.

How does graceful shutdown work during NAIS pod termination?

Graceful shutdown in NAIS involves configuring preStop hooks, handling SIGTERM signals, and setting appropriate termination grace periods to prevent abrupt crashes during pod draining and termination.

Do I need explicit accessPolicy rules for service-to-service communication in NAIS?

Yes, explicit accessPolicy rules are required in your Nais manifest to authorize service-to-service communication and ensure secure ingress traffic between your Kubernetes applications.