• Running tcpdump on an OpenShift cluster

    3 min read

    OpenShift tcpdump troubleshooting

    If we want to take a look at the network traffic that we get out of an OpenShift node we can use the oc debug command to spin up a privileged pod with tcpdump installed. This way we don't need to ssh into the worker node.

    22/05/2023

    Read more...
  • Container with alpine failing to execute a file with not found

    3 min read

    docker alpine not found error

    While building a container using alpine as a base image we can get a not found error while trying to execute a file that doesn't make much sense:

    $ docker run -it test /usr/local/bin/example-app
    exec /usr/local/bin/example-app: no such file or directory
    

    14/11/2022

    Read more...
  • Using ephemeral containers

    3 min read

    kubernetes kubectl debug troubleshooting ephemeral containers

    Starting Kubernetes 1.23, ephemeral containers are enabled by default (in beta though). Using ephemeral containers we can now troubleshoot pods by deploying a temporary container into it with extra privileges or binaries to use

    22/08/2022

    Read more...
  • Troubleshooting a Pod by changing it's command

    3 min read

    kubernetes Pod troubleshooting

    When a container in a Pod is crashing sometimes it's logs are not enough to fully understand what's going on. One way to approach this situation the command it runs to something that won't make Kubernetes restart the container: For example a sleep command

    08/03/2022

    Read more...
  • How to debug a crossplane provider

    4 min read

    crossplane kubernetes troubleshooting debug

    To be able to setup a crossplane provider there are some pieces that need to be aligned to be able to use it. For example, if we want to setup the AWS provider using an IAM Role for ServiceAccount. If something is missaligned, we might end up with an error while creating resources that doesn't really clarify what's the actual error:

    $ kubectl describe bucket.s3.aws.crossplane.io/test-bucket
    Name:         test-bucket
    Namespace:    
    Labels:       <none>
    Annotations:  crossplane.io/external-name: pet2cattle-demo
    API Version:  s3.aws.crossplane.io/v1beta1
    Kind:         Bucket
    Metadata:
    (...)
    Spec:
    (...)
      Provider Config Ref:
        Name:  aws-provider
    Status:
      At Provider:
        Arn:  
      Conditions:
        Last Transition Time:  2022-02-22T21:43:23Z
        Message:               observe failed: failed to query Bucket: api error MovedPermanently: Moved Permanently
        Reason:                ReconcileError
        Status:                False
        Type:                  Synced
    Events:
      Type     Reason                         Age               From                                 Message
      ----     ------                         ----              ----                                 -------
      Warning  CannotObserveExternalResource  7s (x6 over 36s)  managed/bucket.s3.aws.crossplane.io  failed to query Bucket: api error MovedPermanently: Moved Permanently
    

    23/02/2022

    Read more...

From pet to cattle
Treat your kubernetes clusters like cattle, not pets