Skip to the content.

ViReR.NeT

Articles

Here is some usefull articles below :

Kubernetes / OpenShift ressources:

You may find here a git repo for a container bundling OpenShift cli,kubectl and tekton cli. You may use it with that kind of script:

    #!/bin/bash
    export PATH=$PATH:/usr/local/bin 
    
    # Here you extract the token exposed by your serviceAccount
    TOKEN=$( cat /run/secrets/kubernetes.io/serviceaccount/token ) 
    
    # Then you login on the OpenShift cluster
    oc login --token=$TOKEN https://kubernetes.default.svc 
    
    # Then change namespace/project and make some cleanup inside :
    oc project $NAMESPACE
    for pod in $(/usr/local/bin/tkn pipelinerun list | awk '/[2-9] days ago.*(Cancelled|Succeeded|Failed)/ { print $1 }'); do
      tkn pipelinerun delete ${pod} --force
    done

Project

Current project :

Other

Other information here: