본문으로 건너뛰기
cccskills
무료GitHub에 공개

testing:kubectl-debugging

Common kubectl commands for debugging Rossoctl components

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rossoctl/rossoctl스타 303(GitHub 303 + cccskills 0)
연동 도구Kubernetes

실행 점수 미검증

설치 방법 보기

포함된 파일(1)

  • SKILL.md6.2 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Kubectl Debugging Patterns

Common kubectl commands for debugging Rossoctl components.

Context-Safe Execution (MANDATORY)

All kubectl/oc commands MUST redirect output to files. Commands below are shown in bare form for readability. When executing, always redirect:

export LOG_DIR=/tmp/rossoctl/k8s/${CLUSTER:-local}
mkdir -p $LOG_DIR

# Pattern: kubectl <command> > $LOG_DIR/<name>.log 2>&1 && echo "OK" || echo "FAIL"
# Analyze in subagent: Task(subagent_type='Explore') with Grep

Table of Contents

Setting Up Environment

Using Correct Kubeconfig

# HyperShift cluster
export KUBECONFIG=~/clusters/hcp/rossoctl-hypershift-custom-mlflow/auth/kubeconfig

# Kind cluster
export KUBECONFIG=~/.kube/config
kubectl config use-context kind-rossoctl

Verify Connection

kubectl cluster-info
kubectl get nodes

Helm Debugging

Check Rendered Values

helm get values rossoctl-deps -n rossoctl-system

Check All Values (Including Defaults)

helm get values rossoctl-deps -n rossoctl-system -a

Template Without Installing

helm template rossoctl-deps charts/rossoctl-deps -n rossoctl-system \
  -f /tmp/values.yaml > /tmp/rendered.yaml

Check Release Status

helm list -n rossoctl-system
helm history rossoctl-deps -n rossoctl-system

ConfigMap and Secret Inspection

Extract ConfigMap Content

kubectl get configmap otel-collector-config -n rossoctl-system -o yaml

Extract Specific Key

kubectl get configmap otel-collector-config -n rossoctl-system \
  -o jsonpath='{.data.otel-collector-config\.yaml}'

Decode Secret

kubectl get secret mlflow-oauth-secret -n rossoctl-system \
  -o jsonpath='{.data.MLFLOW_CLIENT_ID}' | base64 -d

List All Secret Keys

kubectl get secret mlflow-oauth-secret -n rossoctl-system \
  -o jsonpath='{.data}' | jq 'keys'

Pod Debugging

Check Pod Environment Variables

kubectl get pod otel-collector-xxx -n rossoctl-system \
  -o jsonpath='{.spec.containers[0].env}' | jq

Check Pod Status

kubectl describe pod otel-collector-xxx -n rossoctl-system

Get Pod Logs

kubectl logs -n rossoctl-system otel-collector-xxx
kubectl logs -n rossoctl-system otel-collector-xxx --previous  # After crash
kubectl logs -n rossoctl-system otel-collector-xxx -f          # Follow

Exec Into Pod

kubectl exec -it otel-collector-xxx -n rossoctl-system -- /bin/sh

Check Mounted Files

kubectl exec -it otel-collector-xxx -n rossoctl-system -- \
  ls -la /etc/pki/ca-trust/extracted/pem/

Service Debugging

Check Service Endpoints

kubectl get endpoints mlflow -n rossoctl-system

Check Service Labels

kubectl get svc mlflow -n rossoctl-system --show-labels

Port Forward

kubectl port-forward svc/mlflow 5000:5000 -n rossoctl-system

Keycloak Client Verification

Get Token

# Set variables
KEYCLOAK_URL="http://keycloak-service.keycloak.svc.cluster.local:8080"
CLIENT_ID="mlflow-client"
CLIENT_SECRET=$(kubectl get secret mlflow-oauth-secret -n rossoctl-system \
  -o jsonpath='{.data.MLFLOW_CLIENT_SECRET}' | base64 -d)

# Get token
curl -X POST "$KEYCLOAK_URL/realms/master/protocol/openid-connect/token" \
  -d "grant_type=client_credentials" \
  -d "client_id=$CLIENT_ID" \
  -d "client_secret=$CLIENT_SECRET"

Test From Inside Cluster

kubectl run -it --rm debug --image=curlimages/curl --restart=Never -- \
  curl -X POST "http://keycloak-service.keycloak.svc.cluster.local:8080/realms/master/protocol/openid-connect/token" \
  -d "grant_type=client_credentials" \
  -d "client_id=mlflow-client" \
  -d "client_secret=<secret>"

Job Debugging

Check Job Status

kubectl get jobs -n keycloak
kubectl describe job mlflow-oauth-secret -n keycloak

Get Job Pod Logs

kubectl logs -n keycloak -l job-name=mlflow-oauth-secret

Rerun Failed Job

kubectl delete job mlflow-oauth-secret -n keycloak
# Job will be recreated by Helm if still in chart

Istio Debugging

Check Waypoint Status

kubectl get gateway -n rossoctl-system
kubectl describe gateway mlflow-waypoint -n rossoctl-system

Check AuthorizationPolicy

kubectl get authorizationpolicy -n rossoctl-system
kubectl describe authorizationpolicy mlflow-traces-from-otel -n rossoctl-system

Check Pod Identity

istioctl proxy-config secret otel-collector-xxx -n rossoctl-system

Check ztunnel Logs

kubectl logs -n istio-system -l app=ztunnel --tail=100

Events

Namespace Events

kubectl get events -n rossoctl-system --sort-by='.lastTimestamp'

Pod Events

kubectl get events -n rossoctl-system --field-selector involvedObject.name=otel-collector-xxx

Resource Usage

Pod Resources

kubectl top pods -n rossoctl-system

Describe Resource Limits

kubectl get pod otel-collector-xxx -n rossoctl-system \
  -o jsonpath='{.spec.containers[0].resources}'

Quick Reference

TaskCommand
Get all podskubectl get pods -n rossoctl-system
Get logskubectl logs -n rossoctl-system <pod>
Describe podkubectl describe pod -n rossoctl-system <pod>
Exec shellkubectl exec -it <pod> -n rossoctl-system -- /bin/sh
Port forwardkubectl port-forward svc/<svc> <port>:<port> -n rossoctl-system
Get eventskubectl get events -n rossoctl-system --sort-by='.lastTimestamp'
Helm valueshelm get values rossoctl-deps -n rossoctl-system

Related Skills

  • tdd:hypershift
  • k8s:live-debugging
  • istio:ambient-waypoint

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

auth

무료

Authentication and authorization patterns for Rossoctl services

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rossoctl/rossoctl3032026년 10월 25일 업데이트

Create confidential OAuth2 clients in Keycloak for server-to-service authentication

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rossoctl/rossoctl3032026년 10월 25일 업데이트

Configure MLflow with mlflow-oidc-auth plugin for Keycloak OIDC authentication

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rossoctl/rossoctl3032026년 10월 25일 업데이트

Configure OpenTelemetry Collector with OAuth2 authentication for trace export

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rossoctl/rossoctl3032026년 10월 25일 업데이트

ci

무료

CI pipeline monitoring, status checks, and PR validation workflows

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rossoctl/rossoctl3032026년 10월 25일 업데이트

Monitor running CI jobs, wait for completion, create tasks for results

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rossoctl/rossoctl3032026년 10월 25일 업데이트

rossoctl의 스킬 모두 보기

이 스킬의 문제 신고