OpenShift policy management with OPA gatekeeper.
Configuring OpenShift jenkins via jenkins configuration as code plugin
Add SSL certificates for OpenShift Jenkins Authentication using OpenShift OAuth plugin.
Permission denied on pushing build images into OpenShift internal registry
Couchbase SSL # Suppose you have followed dynamic creation of java keystores in OpenShift post and wondered how to use similar concepts for couchbase database and a java application. This post will help you.
Couchbase setup # Here is the couchbase documentation for configuring server-side certificates, we are interested in last few steps since OpenShift will generate key and cert by adding an annotation to the couchbase service.
Note: By adding this annotation, you can dynamically create certificates service.
Recently I came across tektoncd project, The Tekton Pipelines project provides Kubernetes-style resources for declaring CI/CD-style pipelines caught my attention, and I started playing with it.
Basic Concepts # To create a Tekton pipeline, one does the following:
Create custom or install existing reusable Tasks Create a Pipeline and PipelineResources to define your application’s delivery pipeline Create a PipelineRun to instantiate and invoke the pipeline Installing Tekton on OpenShift # Log in as a user with cluster-admin privileges.
Recently I faced an issue where one of my projects got stuck in a terminating state for days. The workaround below fixed the problem.
Export OpenShift project as a JSON Object
oc get project delete-me -o json > ns-without-finalizers.json Replace below from
spec: finalizers: - kubernetes to
spec: finalizers: [] On one of the master nodes, execute these commands.
kubectl proxy & PID=$! curl -X PUT http://localhost:8001/api/v1/namespaces/delete-me/finalize \ -H "Content-Type: application/json" --data-binary @ns-without-finalizers.
Spring Boot Metrics # This post will discuss how to monitor spring boot application metrics using Prometheus and Grafana.
Prometheus # Prometheus is a monitoring system that collects metrics from configured targets at intervals.
Grafana # Grafana is an open-source metric analytics & visualization tool.
Micrometer # The micrometer is a metrics instrumentation library for JVM-based applications.
Spring Boot Actuator # Spring Boot Actuator helps you monitor and manage your application when it’s pushed to production.
This post concerns remote debugging an ASP.NET Core application on OpenShift using Visual Studio Code. You can use any Microsoft proprietary debugger engine vsdbg with Visual Studio Code.
First, list the available .Net application pods using the oc command.
$ oc get pod NAME READY STATUS RESTARTS AGE MY_APP_NAME-3-1xrsp 0/1 Running 0 6s $ oc rsh MY_APP_NAME-3-1xrsp sh-4.2$ curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l /opt/app-root/vsdbg -r linux-x64 Note: If your container is running behind a corporate proxy and cannot access the internet, you’ll have to build a base dotnet image with the installed debugger engine vsdbg.
This post will discuss debugging a JAVA application running inside a container.
Red Hat container images # When you bootstrap your JVM, you should have a way to enable JVM to debug. For example, Red Hat S2I images allow you to control classpath and debugging via environment variables.
# Set debug options if required if [ x"${JAVA_DEBUG}" != x ] && [ "${JAVA_DEBUG}" != "false" ]; then java_debug_args="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=${JAVA_DEBUG_PORT:-5005}" fi Setting the JAVA_DEBUG environment variable inside the container to true will append debug args to the JVM startup command Configure port forwarding so that you can connect to your application from a remote debugger If you are using the tomcat image, replace the JAVA_DEBUG environment variable with DEBUG