GithubHelp home page GithubHelp logo

docs-kafka-connector's People

Contributors

10genola avatar biniona-mongodb avatar caitlindavey avatar dbirtolo-mdb avatar jdestefano-mongo avatar jordan-smith721 avatar kyuan-mongodb avatar mcmorisi avatar mongodbchez avatar mongokart avatar nathan-contino-mongo avatar norareidy avatar rachel-mack avatar rustagir avatar schmalliso avatar shuangela avatar steveren avatar terakilobyte avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docs-kafka-connector's Issues

Accessing a Kubernetes pod via port-forwarding to interact with MongoDB and Kafka results in an error with the fork call.

Hi all,

My current MongoDB and Kafka environments are hosted within Kubernetes pods. To interact with these applications, we first need to authenticate with the Kubernetes cluster and then establish a port-forwarding session.

To achieve this, I'm using two separate commands in our local terminal environment (note: the following values have been altered for security purposes):

In Terminal 1, we set up the connection to the database by executing kubeConnection.sh.

I have defined environment variables for the database port, endpoint, and the name of the application service. I then use kubectl to run a temporary pod using a specific Docker image, which listens on the designated port and forwards TCP connections to the MongoDB endpoint:

export DEV_DB_PORT=27017
export DEV_DB_ENDPOINT=db.endpoint
export DEV_APP_SERVICE_NAME=docdb-access
kubectl run ${DEV_APP_SERVICE_NAME} --image=dockerurl/docker/data-platforms/common/socat:latest -it --tty --rm --expose=true --port=${DEV_DB_PORT} tcp-listen:${DEV_DB_PORT},fork,reuseaddr tcp connect:${DEV_DB_ENDPOINT}:${DEV_DB_PORT}

In Terminal 2, I establish the port-forwarding session with kubePortForward.sh. Utilizing the same environment variables for consistency, I've forwarded the local port to the service port in the Kubernetes cluster, allowing direct access to the database through the local machine:

export DEV_DB_PORT=27017
export DEV_DB_ENDPOINT=db.endpoint
export DEV_APP_SERVICE_NAME=docdb-access
kubectl port-forward service/${DEV_APP_SERVICE_NAME} ${DEV_DB_PORT}:${DEV_DB_PORT}

Thank you all,
Michael Mendy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.