eqmvii / k8s-mastery

Repository for the article "Learn Kubernetes in Under 3 Hours"

Home Page:https://medium.com/p/114ff420e882/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker, Docker Compose, and Kubernetes testing app

Forked from https://github.com/rinormaloku/k8s-mastery

To practice docker/k8s concepts

Run with docker compose

docker-compose up -d
docker-compose ps
docker-compose down

Run Commands for Docker Containers

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

= = = = = = = = = = = = = = = = = = = = = = = = =

Origial Readme

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:

About

Repository for the article "Learn Kubernetes in Under 3 Hours"

https://medium.com/p/114ff420e882/


Languages

Language:JavaScript 52.0%Language:Java 16.5%Language:Dockerfile 12.1%Language:HTML 11.0%Language:CSS 5.4%Language:Python 3.1%