Skip to content

feat(k8s): configurable k8s context setting and conditional minikube autostart #172

Closed

Description

@dan-petty

Overview

Implement configurable Kubernetes cluster context setting (k8s.context) across devops-cli configuration and CLI commands.

Requirements & Behavior

  1. Configurable K8s Context Setting (k8s.context):
    • Add k8s.context setting to configuration schema, config.yaml, config.example.yaml, options, and environment mapping (DEVOPS_CLI_K8S_CONTEXT).
    • Support reading and updating k8s.context via devops config get/set/show.
  2. Conditional Minikube Autostart:
    • When configured context is minikube (default), Minikube autostarts if stopped.
    • When configured context is a different Kubernetes cluster (e.g. cloud or remote cluster), do NOT autostart Minikube unless explicitly enabled via environment variable (DEVOPS_MINIKUBE_AUTOSTART=true or DEVOPS_K8S_AUTOSTART_MINIKUBE=true).
    • Remove hardcoded "DEVOPS_MINIKUBE_AUTOSTART": "true" from .devcontainer/devcontainer.json and devcontainer templates to prevent overriding user context preferences.
  3. Context Switching Autostart:
    • When switching context to minikube (devops k8s switch-context minikube), automatically start Minikube if it is not currently running.
    • Update k8s.context configuration to maintain synchronization with active kubectl context.
  4. Comprehensive Test-First Coverage:
    • Validate context setting persistence, retrieval, conditional autostart, and switch-context behaviors.

Activity

  1. added this to the v0.2.17 milestone on Sep 12, 2026
  2. added
    type/feature
    scope/k8s
    priority/p1-high
    status/in-progress
    on Sep 12, 2026
  3. dan-petty commented on Sep 12, 2026

    @dan-petty
    OwnerAuthor

    Resolved and delivered in PR #174 (commit 298ca2b).

  4. added a commit that references this issue on Sep 14, 2026
  5. removed
    status/in-progress
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p1-highscope/k8stype/feature

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions