Skip to content

Kubernetes

Apply manifests, describe resources, get pods, logs, and scale deployments.

5 modules

ModuleDescription
Zastosuj manifestZastosuj manifest Kubernetes za pomocą kubectl apply
Opisz zasóbSzczegółowy opis zasobu Kubernetes
Pobierz podyWyświetl listę podów Kubernetes w przestrzeni nazw
Pobierz logi podaPobierz logi z poda Kubernetes
Skaluj wdrożenieSkaluj wdrożenie Kubernetes do określonej liczby replik

Modules

Zastosuj manifest

k8s.apply

Zastosuj manifest Kubernetes za pomocą kubectl apply

Parameters:

NameTypeRequiredDefaultDescription
manifeststringYes-Kubernetes manifest as YAML string or JSON object
namespacestringNo-Override namespace for the resource (optional)
kubeconfigstringNo-Path to kubeconfig file (uses default if not set)

Output:

FieldTypeDescription
kindstringRodzaj zasobu (np. Deployment, Service)
namestringNazwa zasobu
namespacestringPrzestrzeń nazw zasobu
actionstringPodjęta akcja (utworzono, skonfigurowano, bez zmian)

Opisz zasób

k8s.describe

Szczegółowy opis zasobu Kubernetes

Parameters:

NameTypeRequiredDefaultDescription
resource_typestringYes-Kubernetes resource type (e.g. pod, deployment, service)
namestringYes-Name of the resource to describe
namespacestringNodefaultKubernetes namespace (ignored for cluster-scoped resources)
kubeconfigstringNo-Path to kubeconfig file (uses default if not set)

Output:

FieldTypeDescription
resource_typestringTyp opisanego zasobu
namestringNazwa zasobu
namespacestringPrzestrzeń nazw Kubernetes
descriptionstringPełny tekst wyjściowy kubectl describe

Pobierz pody

k8s.get_pods

Wyświetl listę podów Kubernetes w przestrzeni nazw

Parameters:

NameTypeRequiredDefaultDescription
namespacestringNodefaultKubernetes namespace to list pods from
label_selectorstringNo-Filter pods by label selector (e.g. app=nginx)
kubeconfigstringNo-Path to kubeconfig file (uses default if not set)

Output:

FieldTypeDescription
podsarrayLista podów z informacjami o statusie
countnumberŁączna liczba znalezionych podów

Pobierz logi poda

k8s.logs

Pobierz logi z poda Kubernetes

Parameters:

NameTypeRequiredDefaultDescription
podstringYes-Name of the pod to retrieve logs from
namespacestringNodefaultKubernetes namespace
containerstringNo-Specific container name (for multi-container pods)
tailnumberNo100Number of recent log lines to retrieve
previousbooleanNoFalseGet logs from the previous terminated container instance
kubeconfigstringNo-Path to kubeconfig file (uses default if not set)

Output:

FieldTypeDescription
podstringNazwa poda
logsstringTekst wyjściowy logów
linesnumberLiczba zwróconych linii logów

Skaluj wdrożenie

k8s.scale

Skaluj wdrożenie Kubernetes do określonej liczby replik

Parameters:

NameTypeRequiredDefaultDescription
deploymentstringYes-Name of the deployment to scale
replicasnumberYes-Desired number of replicas
namespacestringNodefaultKubernetes namespace
kubeconfigstringNo-Path to kubeconfig file (uses default if not set)

Output:

FieldTypeDescription
deploymentstringNazwa wdrożenia
replicasnumberŻądana liczba replik
namespacestringPrzestrzeń nazw Kubernetes
scaledbooleanCzy operacja skalowania się powiodła

Released under the Apache 2.0 License.