Cyber Deals - Get up to 65% off on CKA, CKAD, CKS, KCNA, KCSA exams and courses!

Configure Projects with Global Network in OpenShift

We will have requirements, where customer need to configure multiple projects but they want pods inside those projects to communicate each other. Since each projects will have its own netnamespace , communication will not happen between them by default. We can easily achieve this cross-communication as below.

Check current netnamespace of the projects. You can see different ID’s as below.

# oc get netnamespace | grep myapp
myapp-test                750807
myapp-test-db             5402669
myapp-test-data           6503429

Let’s join the projects with join-projects option.

# oadm pod-network join-projects --to=myapp-test-db myapp-test myapp-test-data

Verify the ID’s again; you can see all got the same netnamespace ID as myapp-test-db

# oc get netnamespace | grep myapp
myapp-test                5402669
myapp-test-db             5402669
myapp-test-data           5402669

That’s all.

You can use isolate-projects option as below, to isolate project network.

# oc adm pod-network isolate-projects <project1> <project2>
Aneesh Mohan

Aneesh Mohan

System Engineer- Paas(Openshift) at T-Systems Malaysia |RHCE|Ansible|Openshift


Disclaimer: Views expressed in articles are those of the respective authors and do not necessarily reflect the views of their employers or this site. While we aim for accuracy, please verify information before relying on it, and let us know if you spot an error.
Share:

Related Posts

How To Check Your Resource Usage in AWS Free Tier

How To Check Your Resource Usage in AWS Free Tier

Okay, you are in a learning path for AWS (Amazon Web Services) cloud services and you want to get your hands dirty. As we all...

Ansible Automation for Absolute Beginners – Free Course

Ansible Automation for Absolute Beginners – Free Course

Are you new to the world of automation and eager to unlock the power of Ansible? You’re in the right place! In our quest to...

Red Hat Forum 2018

Red Hat Forum 2018

Red Hat Forum is happening in Sept-Nov 2018 in Asia Pac region. The event will happening on different dates on different counties/places; see the …

Deploying Roles With Ansible Galaxy

Deploying Roles With Ansible Galaxy

So you have learned about Ansible Roles and the importance of using roles. Ansible Galaxy is a public library where you can find thousands of...

AWS Certified Solution Architect – Associate – Learning Path and Certification

AWS Certified Solution Architect – Associate – Learning Path and Certification

I used to get a lot of queries on AWS learning path and exam preparation procedures via emails or chats. Honestly I am not an...

Ansible Introduction

Ansible Introduction

You have hundreds and thousands of online documentation and wiki pages for learning Ansible, and this is our attempt to cover Ansible in a simple...