Forked from https://github.com/rinormaloku/k8s-mastery
To practice docker/k8s concepts
docker-compose up -d
docker-compose ps
docker-compose down
Run the nginx/react frontend and python sentiment API:
docker run -d -p 80:80 eqmvii/k8stutorial-nginx-frontend:1
docker run -d -p 5050:5000 eqmvii/k8stutorial-python-api:1
Now that the python container is running, find its docker ip address
docker ps
docker container inspect $PYTHON_CONTAINER_ID
Grab "NetworkSettings"/"IPAddress" (mine was "IPAddress": "172.17.0.2"
) and use that to run the java app:
docker run -d -p 8080:8080 -e SA_LOGIC_API_URL='http:/$THE_IP_YOU_FOUND:5000' eqmvii/k8stutorial-java-backend:1
Exmaple: docker run -d -p 8080:8080 -e SA_LOGIC_API_URL='http://172.17.0.2:5000' eqmvii/k8stutorial-java-backend:1
= = = = = = = = = = = = = = = = = = = = = = = = =
This repository contains the source files needed to follow the series Kubernetes and everything else or summarized as an article in Learn Kubernetes in Under 3 Hours: A Detailed Guide to Orchestrating Containers
To learn more about Kubernetes and other related topics check the following examples with the Sentiment Analysis application: