DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Integrating PostgreSQL Databases with ANF: Join this workshop to learn how to create a PostgreSQL server using Instaclustr’s managed service

Mobile Database Essentials: Assess data needs, storage requirements, and more when leveraging databases for cloud and edge applications.

Monitoring and Observability for LLMs: Datadog and Google Cloud discuss how to achieve optimal AI model performance.

Automated Testing: The latest on architecture, TDD, and the benefits of AI and low-code tools.

Related

  • How To Deploy Helidon Application to Kubernetes With Kubernetes Maven Plugin
  • Microservices With Apache Camel and Quarkus (Part 5)
  • Automating the IBM MQ Upgrade on Redhat OpenShift Using BuildConfigs as CI/CD
  • OpenShift Container Platform 4.11 Cluster Setup

Trending

  • AWS Amplify: A Comprehensive Guide
  • LLMs for Bad Content Detection: Pros and Cons
  • Effective Tips for Debugging Complex Code in Java
  • Logging to Infinity and Beyond: How To Find the Hidden Value of Your Logs
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. OpenShift Quick Tip: Port Forwarding With v3 and the All-In-One-VM

OpenShift Quick Tip: Port Forwarding With v3 and the All-In-One-VM

Learn how to use the OpenShift 'All-In-One-VM' port-forwarding feature for a quick check of a running database.

Markus Eisele user avatar by
Markus Eisele
·
Oct. 29, 15 · Tutorial
Like (1)
Save
Tweet
Share
3.78K Views

Join the DZone community and get the full member experience.

Join For Free

Just a short tip today, but I was playing around with the all-in-one vm from the OpenShift team and wanted to use the port-forwarding feature for a quick check of a running database. You can use the CLI to forward one or more local ports to a pod. This allows you to listen on a given or random port locally, and have data forwarded to and from given ports in the pod.

But whenever I tried to execute:

oc port-forward mysql-2-zjx6u 3306:3306

It looked like it worked until the very first time I tried to use the tunnel:

I1020 11:38:54.754799 8356 portforward.go:227] Forwarding from 127.0.0.1:3306 -> 3306
I1020 11:38:54.757299 8356 portforward.go:227] Forwarding from [::1]:3306 -> 3306
I1020 11:39:10.824839 8356 portforward.go:253] Handling connection for 3306
E1020 11:39:10.833340 8356 portforward.go:312] An error occurred forwarding 3306 -> 3306: Error forwarding port 3306 to pod mysql-2-zjx6u_myfear, uid : Unable to do port forwarding: socat not found.

Turns out, that the needed socat package isn't installed on the all-in-one-vm. In order to fix that, you have to ssh into the instance:

vagrant ssh

And install socat:

sudo /bin/yum install socat

After that you're able to use the tunnel and forward ports to your OpenShift pod.

Further Information:

  • Get started with the Contributors Guide
  • Fork the repository.
  • Read the Origin 3 documentation.
  • Follow @OpenShift on Twitter
OpenShift

Published at DZone with permission of Markus Eisele, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • How To Deploy Helidon Application to Kubernetes With Kubernetes Maven Plugin
  • Microservices With Apache Camel and Quarkus (Part 5)
  • Automating the IBM MQ Upgrade on Redhat OpenShift Using BuildConfigs as CI/CD
  • OpenShift Container Platform 4.11 Cluster Setup

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: