Where podname is the name of the pods obtained with: kubectl get pods You can also enter inside the container in a interactive mode with: kubectl exec -it podname-rthr5 - /bin/bash Then retrieve the deployment in the minikube dashboard.Īctually the Docker container is runnung inside a Kubernetes pods (look at the pod in the dashboard). Retreive the IP address but notice that this IP address is ephemeral since a pods can be deleted and replaced by a new one. Get complete logs for a pods: kubectl describe pods The image used comes from the Docker hub: Kubectl create deployment myservice -image=efrei/my-service:2 Push the image to the docker hub: docker push yourDockerHubName/imageName:versionĮxample: docker push myDockerID/my-service:1 Create a kubernetes deployment from a Docker image Tag the docker image: docker tag imageID yourDockerHubName/imageName:versionĮxample: docker tag 1dsd512s0d myDockerID/my-service:1 Stop the container: docker stop containerID Publish the image to the Docker Hub Test the web service using a web browser: It displays hello. Start the container: docker run -p 4000:8080 -t my-serviceĨ080 is the port of the web service, while 4000 is the port for accessing the container. Test this project using Dockerīuild the docker image: docker build -t my-service. Then move to the sud directory with cd kubernetes-minikube/MyService where a DockerFile is.
This project has already been built and the binary version is there:įirst of all, download and uncompress the project: This project contains a web service coded in Java, but the language doesn't matter. Access the dashboard using the following command: Minikube provides a dashboard (web portal).
Docker installation installation for Mac, Windows 10 Pro, Enterprise, or EducationĬhoose Docker Desktop installation for Windows home
Minikube runs a single-node Kubernetes cluster on your personal computer (including Windows, macOS and Linux PCs) so that you can try out Kubernetes, or for daily development work. Minikube is a tool that lets you run Kubernetes locally.