kubeconfig

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package kubeconfig 는 kubectl·helm 을 실행하기 전에 kubeconfig 를 검사한다.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoServer = errors.New("kubeconfig 에 API 서버 주소가 없습니다")

ErrNoServer 는 kubeconfig 가 접속할 API 서버를 가리키지 않을 때의 오류다.

Functions

func RequireServer

func RequireServer(raw []byte) error

RequireServer 는 kubeconfig 의 현재 컨텍스트가 서버 주소가 있는 클러스터를 가리키는지 확인한다. 네트워크는 쓰지 않는다.

kubectl 은 서버를 못 찾으면 오류를 내지 않고 http://localhost:8080 으로 폴백한다. 그 자리에 무엇이 떠 있든 apply·delete 가 그쪽으로 간다 — 응답이 없으면 타임아웃 × 재시도로 매달리고, 응답하면 엉뚱한 클러스터를 건드린다. 실행 전에 막는다.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL