舉報

會員
Hands-On Kubernetes on Windows
WiththeadoptionofWindowscontainersinKubernetes,youcannowfullyleveragetheflexibilityandrobustnessoftheKubernetescontainerorchestrationsystemintheWindowsecosystem.ThissupportwillenableyoutocreatenewWindowsapplicationsandmigrateexistingonestothecloud-nativestackwiththesameeaseasforLinux-orientedcloudapplications.ThispracticalguidetakesyouthroughthekeyconceptsinvolvedinpackagingWindows-distributedapplicationsintocontainersandorchestratingtheseusingKubernetes.You'llalsounderstandthecurrentlimitationsofWindowssupportinKubernetes.Asyouadvance,you'llgainhands-onexperiencedeployingafullyfunctionalhybridLinux/WindowsKubernetesclusterfordevelopment,andexploreproductionscenariosinon-premisesandcloudenvironments,suchasMicrosoftAzureKubernetesService.Bytheendofthisbook,you'llbewell-versedwithcontainerization,microservicesarchitecture,andthecriticalconsiderationsforrunningKubernetesinproductionenvironmentssuccessfully.
最新章節
- Leave a review - let other readers know what you think
- Other Books You May Enjoy
- Chapter 16: Production Considerations for Running Kubernetes
- Chapter 15: Disaster Recovery
- Chapter 14: Monitoring Kubernetes Applications Using Prometheus
- Chapter 13: Securing Kubernetes Clusters and Applications
品牌:中圖公司
上架時間:2021-06-24 15:29:53
出版社:Packt Publishing
本書數字版權由中圖公司提供,并由其授權上海閱文信息技術有限公司制作發行
- Leave a review - let other readers know what you think 更新時間:2021-06-24 16:54:57
- Other Books You May Enjoy
- Chapter 16: Production Considerations for Running Kubernetes
- Chapter 15: Disaster Recovery
- Chapter 14: Monitoring Kubernetes Applications Using Prometheus
- Chapter 13: Securing Kubernetes Clusters and Applications
- Chapter 12: Development Workflow with Kubernetes
- Chapter 11: Configuring Applications to Use Kubernetes Features
- Chapter 10: Deploying Microsoft SQL Server 2019 and ASP.NET MVC Applications
- Chapter 9: Deploying Your First Application
- Chapter 8: Deploying a Hybrid Azure Kubernetes Service Engine Cluster
- Chapter 7: Deploying a Hybrid On-Premises Kubernetes Cluster
- Chapter 6: Interacting with Kubernetes Clusters
- Chapter 5: Kubernetes Networking
- Chapter 4: Kubernetes Concepts and Windows Support
- Chapter 3: Working with Container Images
- Chapter 2: Managing State in Containers
- Chapter 1: Creating Containers
- Assessments
- Further reading
- Questions
- Summary
- Configuring a network proxy for the Docker daemon and Kubernetes
- OS patching
- Upgrading clusters
- Kubeadm limitations
- GitOps for application workloads
- Infrastructure as code for clusters
- Provisioning clusters reproducibly
- Technical requirements
- Production Considerations for Running Kubernetes
- Further reading
- Questions
- Summary
- Replacing a failed etcd cluster member
- Automating backup
- Restoring the etcd cluster backup
- Backing up an etcd cluster
- Kubernetes cluster backup strategy
- Technical requirements
- Disaster Recovery
- Further reading
- Questions
- Summary
- Configuring alerting
- Adding visualizations
- Configuring dashboards and alerts in Grafana
- Deploying the new version of the voting application
- Installing the NuGet package and adding metrics
- Monitoring .NET applications using prometheus-net
- Deploying an observable version of the voting application
- Extending a Docker image with the Telegraf service
- Windows Performance Counters
- Verifying the Deployment
- Installing Helm charts
- Deploying Prometheus using a Helm chart
- Using extensions for AKS Engine
- Installing WMI Exporter and enabling Metrics Server in Docker
- Provisioning observable Windows nodes
- Prometheus and monitoring Windows nodes
- Available monitoring solutions
- Technical requirements
- Monitoring Kubernetes Applications Using Prometheus
- Further reading
- Questions
- Summary
- Kubernetes secrets on Windows machines
- Configuring network policy
- Network policy support
- Deploying secure applications using network policies
- Securing container runtime in Windows
- Integrating AAD with AKS Engine
- Enabling audit logging
- Rotating infrastructure credentials and certificates
- Securing the image supply chain and scan images
- Using network policies
- Encrypting data at rest
- Running containers in nonprivileged mode
- Disabling the public Dashboard
- Disabling public API access
- Bootstrapping the cluster using kubeadm
- Using an external authentication provider
- Using built-in RBAC for authorization
- Securing Kubernetes clusters
- Technical requirements
- Securing Kubernetes Clusters and Applications
- Further reading
- Questions
- Summary
- Working on microservices in a team using Azure Dev Spaces
- Executing commands in a pod container
- Accessing pod container logs
- Deploying Kubernetes Dashboard
- Using Kubernetes Dashboard
- Snapshot debugger
- Enabling Azure Application Insights
- Debugging a containerized application using Azure Application Insights
- Creating a Helm chart for our Voting application
- Deploying Microsoft SQL Server using Helm
- Installing Helm
- Packaging applications using Helm
- Visual Studio Code
- Visual Studio 2019
- Using developer tooling with Kubernetes
- Technical requirements
- Development Workflow with Kubernetes
- Further reading
- Questions
- Summary
- Role-Based Access Control
- Configuring rolling updates for Deployments
- Managing persistent data storage on Windows nodes
- Managing application configuration using ConfigMaps and Secrets
- HPA
- Resource requests and limits
- Specifying resource limits and configuring autoscaling
- Startup probes
- Liveness probes
- Readiness probes
- Health monitoring using liveness and readiness probes
- Deleting namespaces
- kubectl commands and namespaces
- Creating namespaces
- Using namespaces to isolate applications
- Technical requirements
- Configuring Applications to Use Kubernetes Features
- Further reading
- Questions
- Summary
- Attaching the Visual Studio remote debugger
- Updating the Kubernetes Deployment
- Creating a debug Dockerfile and publishing a debug image
- Debugging the application
- Scaling the application
- Accessing the application
- Deploying the ASP.NET MVC application
- Deploying a failover Microsoft SQL Server 2019
- Preparing the AKS Engine
- Building and pushing the Docker image
- Creating a Dockerfile
- Configuring logging for Windows containers log monitor
- Injecting the configuration using environment variables
- Creating and publishing an ASP.NET MVC application to Docker Hub
- Technical requirements
- Deploying Microsoft SQL Server 2019 and a ASP.NET MVC Application
- Further reading
- Questions
- Summary
- Scaling the application
- Accessing your application
- Scheduling Pods on Windows nodes
- Using Kubernetes manifest files
- Imperatively deploying an application
- Technical requirements
- Deploying Your First Application
- Section 4: Orchestrating Windows Containers Using Kubernetes
- Further reading
- Questions
- Summary
- Enabling Azure Log Analytics and Azure Monitor for containers
- Connecting to virtual machines
- Basic operations
- Deploying and inspecting your first application
- Deploying the cluster
- Using apimodel and generating an Azure resource manager template
- Creating an Azure resource group and a service principal
- Installing AKS Engine
- Technical requirements
- Deploying a Hybrid Azure Kubernetes Service Engine Cluster
- Further reading
- Questions
- Summary
- Deploying and inspecting your first application
- Joining Windows nodes using kubeadm
- Installing and configuring Kubernetes prerequisites
- Installing the SSH server
- Configuring the network
- Installing Windows Server 2019
- Creating the VM
- Preparing VMs for Windows nodes
- Installing the Kubernetes network
- Initializing the cluster
- Planning the cluster
- Installing and configuring Kubernetes prerequisites
- Setting up a passwordless SSH login
- Installing additional packages for integration with Hyper-V
- Configuring the network
- Installing Ubuntu Server
- Creating the VM
- Creating a VM and installing Ubuntu Server
- Creating a Kubernetes master node using kubeadm
- Creating an external Hyper-V vSwitch
- Creating an internal NAT Hyper-V vSwitch
- Enabling Hyper-V
- Preparing the Hyper-V environment
- Technical requirements
- Deploying a Hybrid On-Premises Kubernetes Cluster
- Section 3: Creating Windows Kubernetes Clusters
- Further reading
- Questions
- Summary
- Port forwarding and proxying traffic
- Copying Pod container files
- Execcing into a Pod container
- Accessing Pod container logs
- Running an ad hoc Pod
- Editing resources
- Describing and listing resources
- Deleting resources
- Creating resources
- Looking at common kubectl commands
- Working with development clusters
- Accessing Kubernetes clusters
- Installing Kubernetes command-line tooling
- Technical requirements
- Interacting with Kubernetes Clusters
- Further reading
- Questions
- Summary
- Transparent
- Overlay
- L2Tunnel
- L2Bridge
- Choosing Kubernetes network modes
- Limitations
- Windows Server networking in Kubernetes
- CoreOS Flannel
- Understanding the CNI project
- Kubernetes CNI network plugins
- Ingress
- ExternalName
- LoadBalancer
- NodePort
- ClusterIP
- Services
- Other solutions
- Overlay network
- L2 network
- Kubernetes networking principles
- Technical requirements
- Kubernetes Networking
- Further reading
- Questions
- Summary
- Creating AKS cluster with Windows nodes
- Managed Kubernetes providers
- AKS Engine
- kubespray
- kops
- kubeadm
- Production cluster deployment strategies
- Docker Desktop for Windows
- minikube
- Creating your own development cluster from scratch
- Kubernetes limitations on Windows
- The Windows and Kubernetes ecosystem
- Storage-related objects
- Services
- DaemonSets
- StatefulSets
- Deployments
- ReplicaSets
- Pods
- Kubernetes objects
- DNS
- kube-proxy
- Container runtime
- kubelet
- Kubernetes nodes – data plane
- cloud-controller-manager
- kube-controller-manager
- kube-scheduler
- etcd cluster
- kube-apiserver
- Kubernetes master – control plane
- What is Kubernetes?
- Kubernetes high-level architecture
- Technical requirements
- Kubernetes Concepts and Windows Support
- Section 2: Understanding Kubernetes Fundamentals
- Further reading
- Questions
- Summary
- Enabling DCT for the client
- Signing an image
- Ensuring the integrity of the image supply chain
- Semantic versioning
- Using the latest tag
- Image tagging and versioning
- Automatic builds for Azure Container Registry
- Building a Docker image using Azure Container Registry
- Creating Azure Container Registry
- Triggering the Docker Hub autobuild
- Creating a Docker Hub repository with autobuild
- Creating a GitHub repository
- Using cloud container builders
- Using a custom local registry
- Pushing an image to the Docker registry
- Storing and sharing container images
- Technical requirements
- Working with Container Images
- Further reading
- Questions
- Summary
- Writing and reading test data
- Creating a MongoDB ReplicaSet
- Running clustered solutions inside containers
- Mounting Azure Files SMB share in a container
- Creating Azure Files SMB share
- Installing the Azure CLI and Azure PowerShell module
- Using remote/cloud storage for container storage
- Mounting a local container host directory using bind mounts
- Removing volumes
- Creating and mounting volumes
- Volumes and bind mount
- Mounting local volumes for stateful applications
- Technical requirements
- Managing State in Containers
- Further reading
- Questions
- Summary
- Exec into a running container
- Inspecting container logs
- Running Windows containers
- Building a Docker image
- Creating a Dockerfile
- Creating a sample HTML web page
- Preparing a Visual Studio Code workspace
- Building your first container
- Running LCOW containers
- Running process-isolated containers
- Verifying the installation
- Installation
- Stable and Edge channels
- Installing Docker Desktop for Windows tooling
- LinuxKit LCOW and Hyper-V isolation
- LinuxKit and MobyLinuxVM
- Linux containers on Windows
- Hyper-V isolation
- Process isolation
- Understanding Windows container variants
- Key differences between containers on Linux and Windows
- Docker containerization on Windows
- Docker containerization on Linux
- Linux versus Windows containers
- Technical requirements
- Creating Containers
- Section 1: Creating and Working with Containers
- Reviews
- Get in touch
- Conventions used
- Download the color images
- Download the example code files
- To get the most out of this book
- What this book covers
- Who this book is for
- Preface
- Packt is searching for authors like you
- About the reviewer
- About the author
- Contributors
- Why subscribe?
- About Packt
- Hands-On Kubernetes on Windows
- Copyright and Credits
- Title Page
- 封面
- 封面
- Title Page
- Copyright and Credits
- Hands-On Kubernetes on Windows
- About Packt
- Why subscribe?
- Contributors
- About the author
- About the reviewer
- Packt is searching for authors like you
- Preface
- Who this book is for
- What this book covers
- To get the most out of this book
- Download the example code files
- Download the color images
- Conventions used
- Get in touch
- Reviews
- Section 1: Creating and Working with Containers
- Creating Containers
- Technical requirements
- Linux versus Windows containers
- Docker containerization on Linux
- Docker containerization on Windows
- Key differences between containers on Linux and Windows
- Understanding Windows container variants
- Process isolation
- Hyper-V isolation
- Linux containers on Windows
- LinuxKit and MobyLinuxVM
- LinuxKit LCOW and Hyper-V isolation
- Installing Docker Desktop for Windows tooling
- Stable and Edge channels
- Installation
- Verifying the installation
- Running process-isolated containers
- Running LCOW containers
- Building your first container
- Preparing a Visual Studio Code workspace
- Creating a sample HTML web page
- Creating a Dockerfile
- Building a Docker image
- Running Windows containers
- Inspecting container logs
- Exec into a running container
- Summary
- Questions
- Further reading
- Managing State in Containers
- Technical requirements
- Mounting local volumes for stateful applications
- Volumes and bind mount
- Creating and mounting volumes
- Removing volumes
- Mounting a local container host directory using bind mounts
- Using remote/cloud storage for container storage
- Installing the Azure CLI and Azure PowerShell module
- Creating Azure Files SMB share
- Mounting Azure Files SMB share in a container
- Running clustered solutions inside containers
- Creating a MongoDB ReplicaSet
- Writing and reading test data
- Summary
- Questions
- Further reading
- Working with Container Images
- Technical requirements
- Storing and sharing container images
- Pushing an image to the Docker registry
- Using a custom local registry
- Using cloud container builders
- Creating a GitHub repository
- Creating a Docker Hub repository with autobuild
- Triggering the Docker Hub autobuild
- Creating Azure Container Registry
- Building a Docker image using Azure Container Registry
- Automatic builds for Azure Container Registry
- Image tagging and versioning
- Using the latest tag
- Semantic versioning
- Ensuring the integrity of the image supply chain
- Signing an image
- Enabling DCT for the client
- Summary
- Questions
- Further reading
- Section 2: Understanding Kubernetes Fundamentals
- Kubernetes Concepts and Windows Support
- Technical requirements
- Kubernetes high-level architecture
- What is Kubernetes?
- Kubernetes master – control plane
- kube-apiserver
- etcd cluster
- kube-scheduler
- kube-controller-manager
- cloud-controller-manager
- Kubernetes nodes – data plane
- kubelet
- Container runtime
- kube-proxy
- DNS
- Kubernetes objects
- Pods
- ReplicaSets
- Deployments
- StatefulSets
- DaemonSets
- Services
- Storage-related objects
- The Windows and Kubernetes ecosystem
- Kubernetes limitations on Windows
- Creating your own development cluster from scratch
- minikube
- Docker Desktop for Windows
- Production cluster deployment strategies
- kubeadm
- kops
- kubespray
- AKS Engine
- Managed Kubernetes providers
- Creating AKS cluster with Windows nodes
- Summary
- Questions
- Further reading
- Kubernetes Networking
- Technical requirements
- Kubernetes networking principles
- L2 network
- Overlay network
- Other solutions
- Services
- ClusterIP
- NodePort
- LoadBalancer
- ExternalName
- Ingress
- Kubernetes CNI network plugins
- Understanding the CNI project
- CoreOS Flannel
- Windows Server networking in Kubernetes
- Limitations
- Choosing Kubernetes network modes
- L2Bridge
- L2Tunnel
- Overlay
- Transparent
- Summary
- Questions
- Further reading
- Interacting with Kubernetes Clusters
- Technical requirements
- Installing Kubernetes command-line tooling
- Accessing Kubernetes clusters
- Working with development clusters
- Looking at common kubectl commands
- Creating resources
- Deleting resources
- Describing and listing resources
- Editing resources
- Running an ad hoc Pod
- Accessing Pod container logs
- Execcing into a Pod container
- Copying Pod container files
- Port forwarding and proxying traffic
- Summary
- Questions
- Further reading
- Section 3: Creating Windows Kubernetes Clusters
- Deploying a Hybrid On-Premises Kubernetes Cluster
- Technical requirements
- Preparing the Hyper-V environment
- Enabling Hyper-V
- Creating an internal NAT Hyper-V vSwitch
- Creating an external Hyper-V vSwitch
- Creating a Kubernetes master node using kubeadm
- Creating a VM and installing Ubuntu Server
- Creating the VM
- Installing Ubuntu Server
- Configuring the network
- Installing additional packages for integration with Hyper-V
- Setting up a passwordless SSH login
- Installing and configuring Kubernetes prerequisites
- Planning the cluster
- Initializing the cluster
- Installing the Kubernetes network
- Preparing VMs for Windows nodes
- Creating the VM
- Installing Windows Server 2019
- Configuring the network
- Installing the SSH server
- Installing and configuring Kubernetes prerequisites
- Joining Windows nodes using kubeadm
- Deploying and inspecting your first application
- Summary
- Questions
- Further reading
- Deploying a Hybrid Azure Kubernetes Service Engine Cluster
- Technical requirements
- Installing AKS Engine
- Creating an Azure resource group and a service principal
- Using apimodel and generating an Azure resource manager template
- Deploying the cluster
- Deploying and inspecting your first application
- Basic operations
- Connecting to virtual machines
- Enabling Azure Log Analytics and Azure Monitor for containers
- Summary
- Questions
- Further reading
- Section 4: Orchestrating Windows Containers Using Kubernetes
- Deploying Your First Application
- Technical requirements
- Imperatively deploying an application
- Using Kubernetes manifest files
- Scheduling Pods on Windows nodes
- Accessing your application
- Scaling the application
- Summary
- Questions
- Further reading
- Deploying Microsoft SQL Server 2019 and a ASP.NET MVC Application
- Technical requirements
- Creating and publishing an ASP.NET MVC application to Docker Hub
- Injecting the configuration using environment variables
- Configuring logging for Windows containers log monitor
- Creating a Dockerfile
- Building and pushing the Docker image
- Preparing the AKS Engine
- Deploying a failover Microsoft SQL Server 2019
- Deploying the ASP.NET MVC application
- Accessing the application
- Scaling the application
- Debugging the application
- Creating a debug Dockerfile and publishing a debug image
- Updating the Kubernetes Deployment
- Attaching the Visual Studio remote debugger
- Summary
- Questions
- Further reading
- Configuring Applications to Use Kubernetes Features
- Technical requirements
- Using namespaces to isolate applications
- Creating namespaces
- kubectl commands and namespaces
- Deleting namespaces
- Health monitoring using liveness and readiness probes
- Readiness probes
- Liveness probes
- Startup probes
- Specifying resource limits and configuring autoscaling
- Resource requests and limits
- HPA
- Managing application configuration using ConfigMaps and Secrets
- Managing persistent data storage on Windows nodes
- Configuring rolling updates for Deployments
- Role-Based Access Control
- Summary
- Questions
- Further reading
- Development Workflow with Kubernetes
- Technical requirements
- Using developer tooling with Kubernetes
- Visual Studio 2019
- Visual Studio Code
- Packaging applications using Helm
- Installing Helm
- Deploying Microsoft SQL Server using Helm
- Creating a Helm chart for our Voting application
- Debugging a containerized application using Azure Application Insights
- Enabling Azure Application Insights
- Snapshot debugger
- Using Kubernetes Dashboard
- Deploying Kubernetes Dashboard
- Accessing pod container logs
- Executing commands in a pod container
- Working on microservices in a team using Azure Dev Spaces
- Summary
- Questions
- Further reading
- Securing Kubernetes Clusters and Applications
- Technical requirements
- Securing Kubernetes clusters
- Using built-in RBAC for authorization
- Using an external authentication provider
- Bootstrapping the cluster using kubeadm
- Disabling public API access
- Disabling the public Dashboard
- Running containers in nonprivileged mode
- Encrypting data at rest
- Using network policies
- Securing the image supply chain and scan images
- Rotating infrastructure credentials and certificates
- Enabling audit logging
- Integrating AAD with AKS Engine
- Securing container runtime in Windows
- Deploying secure applications using network policies
- Network policy support
- Configuring network policy
- Kubernetes secrets on Windows machines
- Summary
- Questions
- Further reading
- Monitoring Kubernetes Applications Using Prometheus
- Technical requirements
- Available monitoring solutions
- Prometheus and monitoring Windows nodes
- Provisioning observable Windows nodes
- Installing WMI Exporter and enabling Metrics Server in Docker
- Using extensions for AKS Engine
- Deploying Prometheus using a Helm chart
- Installing Helm charts
- Verifying the Deployment
- Windows Performance Counters
- Extending a Docker image with the Telegraf service
- Deploying an observable version of the voting application
- Monitoring .NET applications using prometheus-net
- Installing the NuGet package and adding metrics
- Deploying the new version of the voting application
- Configuring dashboards and alerts in Grafana
- Adding visualizations
- Configuring alerting
- Summary
- Questions
- Further reading
- Disaster Recovery
- Technical requirements
- Kubernetes cluster backup strategy
- Backing up an etcd cluster
- Restoring the etcd cluster backup
- Automating backup
- Replacing a failed etcd cluster member
- Summary
- Questions
- Further reading
- Production Considerations for Running Kubernetes
- Technical requirements
- Provisioning clusters reproducibly
- Infrastructure as code for clusters
- GitOps for application workloads
- Kubeadm limitations
- Upgrading clusters
- OS patching
- Configuring a network proxy for the Docker daemon and Kubernetes
- Summary
- Questions
- Further reading
- Assessments
- Chapter 1: Creating Containers
- Chapter 2: Managing State in Containers
- Chapter 3: Working with Container Images
- Chapter 4: Kubernetes Concepts and Windows Support
- Chapter 5: Kubernetes Networking
- Chapter 6: Interacting with Kubernetes Clusters
- Chapter 7: Deploying a Hybrid On-Premises Kubernetes Cluster
- Chapter 8: Deploying a Hybrid Azure Kubernetes Service Engine Cluster
- Chapter 9: Deploying Your First Application
- Chapter 10: Deploying Microsoft SQL Server 2019 and ASP.NET MVC Applications
- Chapter 11: Configuring Applications to Use Kubernetes Features
- Chapter 12: Development Workflow with Kubernetes
- Chapter 13: Securing Kubernetes Clusters and Applications
- Chapter 14: Monitoring Kubernetes Applications Using Prometheus
- Chapter 15: Disaster Recovery
- Chapter 16: Production Considerations for Running Kubernetes
- Other Books You May Enjoy
- Leave a review - let other readers know what you think 更新時間:2021-06-24 16:54:57