Skip to content
Icon

runsc-metric-server DaemonSet Health

Profile Avatar

Icon 1 3 Troubleshooting Commands

Icon 1 Last updated 13 weeks ago

Icon 1 Contributed by jon-funk



Troubleshooting Commands

Get DaemonSet Log Details For Report

What does it do?

This command is used to display the last 100 lines of logs for a specific daemonset in a Kubernetes cluster, within a specified namespace and context.

Command
kubectl logs --tail=100 daemonset/runsc-metric-server --context gke_runwhen-nonprod-sandbox_us-central1_sandbox-cluster-1-cluster -n kube-system
IconCopy to clipboard Copied to clipboard

Learn more

This multi-line content is auto-generated and used for educational purposes. Copying and pasting the multi-line text might not function as expected.

# Set the variable DAEMONSET_NAME to the name of the daemonset whose logs you want to retrieve
DAEMONSET_NAME=my-daemonset

# Set the variable CONTEXT to the context of the Kubernetes cluster where the daemonset is running
CONTEXT=my-k8s-cluster

# Set the variable NAMESPACE to the namespace where the daemonset is deployed
NAMESPACE=my-namespace

# Use kubectl logs to display the last 100 lines of logs from the specified daemonset
kubectl logs --tail=100 daemonset/${DAEMONSET_NAME} --context ${CONTEXT} -n ${NAMESPACE}
Helpful Links

What does it do?

This command retrieves events related to warnings in a specific Kubernetes context and namespace, then filters the results to display only those related to a specific daemon set. The "|| true" part ensures that the command does not return an error if no results are found.

Command
kubectl get events --field-selector type=Warning --context gke_runwhen-nonprod-sandbox_us-central1_sandbox-cluster-1-cluster -n kube-system | grep -i "runsc-metric-server" || true
IconCopy to clipboard Copied to clipboard

Learn more

This multi-line content is auto-generated and used for educational purposes. Copying and pasting the multi-line text might not function as expected.

# First, let's use kubectl to get events specifically of type Warning
# We will use the --field-selector flag to filter the events by type
# We'll also specify the context and namespace using variables for flexibility

kubectl get events \
--field-selector type=Warning \
--context ${CONTEXT} \
-n ${NAMESPACE} \

# Next, we'll use grep to search for a specific daemonset name within the events
# We'll use the -i flag to perform case-insensitive search
# If no match is found, we'll use the || true command to ensure that the overall command still exits with a success status

| grep -i "${DAEMONSET_NAME}" || true
Helpful Links

Check Daemonset Replicas

What does it do?

This command is used to get detailed information about a specific daemonset in Kubernetes, including its current status and configuration. You would need to replace ${DAEMONSET_NAME}, ${CONTEXT}, and ${NAMESPACE} with the actual names of the daemonset, context, and namespace you want to describe.

Command
kubectl describe daemonset/runsc-metric-server --context gke_runwhen-nonprod-sandbox_us-central1_sandbox-cluster-1-cluster -n kube-system
IconCopy to clipboard Copied to clipboard

Learn more

This multi-line content is auto-generated and used for educational purposes. Copying and pasting the multi-line text might not function as expected.

# Get a detailed description of the specified daemonset
# using kubectl command in Kubernetes cluster

# Set the variable for the daemonset name
DAEMONSET_NAME=my-daemonset

# Set the variable for the context (cluster) to use
CONTEXT=my-context

# Set the variable for the namespace where the daemonset is located
NAMESPACE=my-namespace

# Use kubectl to describe the daemonset
kubectl describe daemonset/${DAEMONSET_NAME} --context ${CONTEXT} -n ${NAMESPACE}
Helpful Links