| Contents at a Glance | 4 |
---|
| Contents | 6 |
---|
| About the Author | 14 |
---|
| About the Technical Reviewer | 15 |
---|
| Introduction | 16 |
---|
| Part I: Platforms | 20 |
---|
| Chapter 1: Kubernetes on AWS | 21 |
| Problem | 21 |
| Solution | 21 |
| Overview | 21 |
| Setting the Environment | 22 |
| Configuring AWS | 25 |
| Starting the Kubernetes Cluster | 29 |
| Testing the Cluster | 35 |
| Configuring the Cluster | 36 |
| Stopping the Cluster | 39 |
| Summary | 40 |
| Chapter 2: Kubernetes on CoreOS on AWS | 41 |
| Problem | 41 |
| Solution | 41 |
| Overview | 42 |
| Setting the Environment | 43 |
| Configuring AWS Credentials | 43 |
| Installing Kube-aws | 43 |
| Setting Up Cluster Parameters | 45 |
| Creating a KMS Key | 46 |
| Setting Up an External DNS Name | 47 |
| Creating the Cluster | 47 |
| Creating an Asset Directory | 47 |
| Initializing the Cluster CloudFormation | 48 |
| Rendering Contents of the Asset Directory | 48 |
| Customizing the Cluster | 49 |
| Validating the CloudFormation Stack | 52 |
| Launching the Cluster CloudFormation | 52 |
| Configuring DNS | 53 |
| Accessing the Cluster | 57 |
| Testing the Cluster | 59 |
| Summary | 65 |
| Chapter 3: Kubernetes on Google Cloud Platform | 66 |
| Problem | 66 |
| Solution | 66 |
| Overview | 66 |
| Setting the Environment | 67 |
| Creating a Project on Google Cloud Platform | 67 |
| Enabling Permissions | 72 |
| Enabling the Compute Engine API | 73 |
| Creating a VM Instance | 79 |
| Connecting to the VM Instance | 83 |
| Reserving a Static External IP Address | 84 |
| Creating a Kubernetes Cluster | 84 |
| Creating a Kubernetes Application and Service | 88 |
| Stopping the Cluster | 92 |
| Using Kubernetes with Google Container Engine | 94 |
| Creating a Google Container Cluster | 94 |
| Connecting to the Google Cloud Shell | 97 |
| Configuring kubectl | 97 |
| Testing the Kubernetes Cluster | 98 |
| Summary | 104 |
| Part II: Administration and Configuration | 105 |
---|
| Chapter 4: Using Multiple Zones | 106 |
| Problem | 106 |
| Solution | 107 |
| Overview | 108 |
| Setting the Environment | 108 |
| Initializing a CloudFormation | 110 |
| Configuring cluster.yaml for Multiple Zones | 110 |
| Launching the CloudFormation | 114 |
| Configuring External DNS | 115 |
| Running a Kubernetes Application | 116 |
| Using Multiple Zones on AWS | 118 |
| Summary | 131 |
| Chapter 5: Using the Tectonic Console | 132 |
| Problem | 132 |
| Solution | 132 |
| Overview | 133 |
| Setting the Environment | 133 |
| Downloading the Pull Secret and the Tectonic Console Manifest | 135 |
| Installing the Pull Secret and the Tectonic Console Manifest | 137 |
| Accessing the Tectonic Console | 138 |
| Using the Tectonic Console | 139 |
| Removing the Tectonic Console | 149 |
| Summary | 149 |
| Chapter 6: Using Volumes | 150 |
| Problem | 150 |
| Solution | 150 |
| Overview | 151 |
| Setting the Environment | 152 |
| Creating an AWS Volume | 154 |
| Using an awsElasticBlockStore Volume | 156 |
| Creating a Git Repo | 160 |
| Using a gitRepo Volume | 164 |
| Summary | 167 |
| Chapter 7: Using Services | 168 |
| Problem | 168 |
| Solution | 169 |
| Overview | 169 |
| Setting the Environment | 170 |
| Creating a ClusterIP Service | 171 |
| Creating a NodePort Service | 174 |
| Creating a LoadBalancer Service | 181 |
| Summary | 185 |
| Chapter 8: Using Rolling Updates | 186 |
| Problem | 186 |
| Solution | 186 |
| Overview | 187 |
| Setting the Environment | 188 |
| Rolling Update with an RC Definition File | 189 |
| Rolling Update by Updating the Container Image | 192 |
| Rolling Back an Update | 199 |
| Using Only Either File or Image | 201 |
| Multiple-Container Pods | 201 |
| Rolling Update to a Deployment | 201 |
| Summary | 213 |
| Chapter 9: Scheduling Pods on Nodes | 214 |
| Problem | 214 |
| Solution | 214 |
| Overview | 215 |
| Defining a Scheduling Policy | 215 |
| Setting the Environment | 217 |
| Using the Default Scheduler | 218 |
| Scheduling Pods without a Node Selector | 228 |
| Setting Node Labels | 228 |
| Scheduling Pods with a Node Selector | 229 |
| Setting Node Affinity | 235 |
| Setting requiredDuringSchedulingIgnoredDuringExecution | 237 |
| Setting preferredDuringSchedulingIgnoredDuringExecution | 244 |
| Summary | 251 |
| C
|