Docker and Kubernetes for Java Developers
Jaroslaw Krochmalski更新时间:2021-07-02 18:45:33
最新章节:Kube-appliercover
Title Page
Copyright
Docker and Kubernetes for Java Developers
Credits
About the Author
About the Reviewer
www.PacktPub.com
Why subscribe?
Customer Feedback
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
Introduction to Docker
The idea behind Docker
Virtualization and containerization compared
Benefits from using Docker
Docker concepts - images and containers
Images
Layers
Containers
Docker registry repository and index
Additional tools
Installing Docker
Installing on macOS
Installing on Linux
Installing on Windows
Summary
Networking and Persistent Storage
Networking
Docker network types
Bridge
Host
None
Networking commands
Creating and inspecting a network
Connecting a container to the network
Exposing ports and mapping ports
Persistent storage
Volume-related commands
Creating a volume
Removing a volume
Volume drivers
Summary
Working with Microservices
An introduction to microservices
Monolithic versus microservices
The monolithic architecture
The microservices architecture
Maintaining data consistency
The Docker role
Kubernetes' role
When to use the microservice architecture
Summary
Creating Java Microservices
Introduction to REST
HTTP methods
REST in Java
Java EE7 - JAX-RS with Jersey
JAX-RS annotations
Spring Boot
Coding the Spring Boot microservice
Maven build file
Application entry point
Domain model and a repository
REST controller
Documenting the API
Running the application
Making calls
Spring RestTemplate
HTTPie
Postman
Paw for Mac
Spring Initializr
Summary
Creating Images with Java Applications
Dockerfile
Dockerfile instructions
FROM
MAINTAINER
WORKDIR
ADD
COPY
RUN
CMD
The ENTRYPOINT
EXPOSE
VOLUME
LABEL
ENV
USER
ARG
ONBUILD
STOPSIGNAL
HEALTHCHECK
Creating an image using Maven
Building the image
Creating and removing volumes
Summary
Running Containers with Java Applications
Starting and stopping containers
Starting
Stopping
Listing the running containers
Removing the containers
Container running modes
Foreground
Detached
Attaching to running containers
Monitoring containers
Viewing logs
Inspecting a container
Statistics
Container events
Restart policies
no
always
on-failure
unless-stopped
Updating a restart policy on a running container
Runtime constraints on resources
Memory
Processors
Updating constraints on a running container
Running with Maven
Plugin configuration
Starting and stopping containers
Summary
Introduction to Kubernetes
Why do we need Kubernetes?
Basic Kubernetes concepts
Pods
ReplicaSets
Deployment
Services
kube-dns
Namespace
Nodes
Kubelet
Proxy
Docker
The Master node
etcd
The API server
The scheduler
Available tools
kubectl
Dashboard
Minikube
Summary
Using Kubernetes with Java
Installing Minikube
Installing on Mac
Installing on Windows
Installing on Linux
Starting up the local Kubernetes cluster
Installing kubectl
Installing on Mac
Installing on Windows
Installing on Linux
Deploying on the Kubernetes cluster
Creating a service
Creating a deployment
Interacting with containers and viewing logs
Scaling manually
Autoscaling
Viewing cluster events
Using the Kubernetes dashboard
Minikube addons
Cleaning up
Summary
Working with the Kubernetes API
API versioning
Alpha
Beta
Stable
Authentication
HTTP basic auth
Static token file
Client certificates
OpenID
Authorization
Attribute-based access control
Role-based access control (RBAC)
WebHook
AlwaysDeny
AlwaysAllow
Admission control
Using the API
API operations
Example calls
Creating a service using the API
Creating a deployment using the API
Deleting a service and deployment
Swagger docs
Summary
Deploying Java on Kubernetes in the Cloud
Benefits of using the cloud Docker and Kubernetes
Installing the tools
Python and PIP
AWS command-line tools
Kops
jq
Configuring Amazon AWS
Creating an administrative user
Creating a user for kops
Creating the cluster
DNS settings
Root domain on AWS hosted domain
The subdomain of the domain hosted on AWS
Route 53 for a domain purchased with another registrar
Subdomain for cluster in AWS Route 53 the domain elsewhere
Checking the zones' availability
Creating the storage
Creating a cluster
Starting up clusters
Updating a cluster
Installing the dashboard
Summary
More Resources
Docker
Awesome Docker
Blogs
Interactive tutorials
Kubernetes
Awesome Kubernetes
Tutorials
Blogs
Extensions
Tools
Rancher
Helm and charts
Kompose
Kubetop
Kube-applier
更新时间:2021-07-02 18:45:33