Skip to content

Instantly share code, notes, and snippets.

View albertoeks's full-sized avatar

Alberto Santos albertoeks

View GitHub Profile

Debugging in Kubernetes

"How do you debug applications running in Kubernetes?"

The strategy to successfully debugging applications in kubernetes is to be consistent with your approach: application to public traffic or public traffic to application.

The question as it is it's very generic, however, let's see the different components we might have to check in our debugging journey:

  • Container/Pod
  • Service
//List pods in a node
kubectl get pods --all-namespaces --field-selector spec.nodeName=<NODE> -o wide
//Delete evicted pods
kubectl delete pods --all-namespaces --field-selector=status.phase=Failed
@albertoeks
albertoeks / logback.xml
Created April 12, 2023 01:11 — forked from jeroenr/logback.xml
Logback configuration splitting to stdout and stderr
<configuration>
<appender name="STDERR" class="ch.qos.logback.core.ConsoleAppender">
<target>System.err</target>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>WARN</level>
</filter>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
@albertoeks
albertoeks / steps-to-create-pull-request-github.md
Last active June 20, 2022 11:06
Steps to create a GitHub pull request
  1. Fork the project

  2. Clone the downstream repo locally (git clone https://github.com//some-awesome-project

  3. Create a new branch (git checkout -b my_branch)

  4. Create a new remote for the upstream repo (git remote add upstream https://github.com/original-repo/awesome-project)

  5. Push your stuff to the upstream repo (git push -u origin my_branch)