SlideShare a Scribd company logo
Managing Kubernetes operating Kubernetes
clusters in the real world First Edition Burns
download
https://textbookfull.com/product/managing-kubernetes-operating-
kubernetes-clusters-in-the-real-world-first-edition-burns/
Download more ebook from https://textbookfull.com
We believe these products will be a great fit for you. Click
the link to download now, or visit textbookfull.com
to discover even more!
LFS258 Kubernetes Fundamentals The Linux Foundation
https://textbookfull.com/product/lfs258-kubernetes-fundamentals-
the-linux-foundation/
The Kubernetes Book: 2024 Edition Nigel Poulton
https://textbookfull.com/product/the-kubernetes-
book-2024-edition-nigel-poulton/
Kubernetes in Action, Second Edition (MEAP V05) Marko
Luksa
https://textbookfull.com/product/kubernetes-in-action-second-
edition-meap-v05-marko-luksa/
Getting Started with Kubernetes 2nd Edition Baier
https://textbookfull.com/product/getting-started-with-
kubernetes-2nd-edition-baier/
Kubernetes for Developers 1st Edition William Denniss
https://textbookfull.com/product/kubernetes-for-developers-1st-
edition-william-denniss/
Learn Kubernetes in a Month of Lunches 1st Edition
Elton Stoneman
https://textbookfull.com/product/learn-kubernetes-in-a-month-of-
lunches-1st-edition-elton-stoneman/
Learn Kubernetes in a Month of Lunches 1st Edition
Elton Stoneman
https://textbookfull.com/product/learn-kubernetes-in-a-month-of-
lunches-1st-edition-elton-stoneman-2/
The DevOps 2.6 Toolkit: Jenkins X: Cloud-Native
Kubernetes-First Continuous Delivery 1st Edition Viktor
Farcic
https://textbookfull.com/product/the-devops-2-6-toolkit-jenkins-
x-cloud-native-kubernetes-first-continuous-delivery-1st-edition-
viktor-farcic/
Cloud Native DevOps with Kubernetes 1st Edition John
Arundel
https://textbookfull.com/product/cloud-native-devops-with-
kubernetes-1st-edition-john-arundel/
1
4. Extending the system with new and custom functionality
5. Summary
2. 2. An overview of Kubernetes
1. Containers
2. Container Orchestration
3. The Kubernetes API
1. Basic objects: Pods, Replica Sets and Services
2. Organizing your cluster with namespaces, labels and annotations
3. Advanced concepts: StatefulSets, Ingress and Deployments
4. Batch workloads: Job and ScheduledJob
5. Cluster agents and utlities: DaemonSets
4. Summary
3. 3. Kubernetes Architecture
1. Concepts
1. Declarative Configuration
2. Reconciliation or controllers
3. Implicit or Dynamic Grouping
2. Structure
1. Unix philosophy of many components
2. API driven interactions
3. Components
1. Worker and Head nodes and scheduled components.
2. Head node components
3. Components on all nodes
4. Scheduled Components
4. Summary
4. 4. The Kubernetes API Server
1. Basic characteristics for manageability
2. Pieces of the API server
1. API Management
2. API Paths
3. API Discovery
4. OpenAPI Spec Serving
5. API Translation
3. Request management
1. Types of requests
2. Life of a request
4. API Server Internals
1. CRD Control Loop
5. Debugging the API Server
1. Basic Logs
2. Audit Logs
3. Activating additional logs
4. Debugging kubectl requests
6. Summary
5. 5. Scheduler
1. An overview of scheduling
2. The process of scheduling
1. 1. Introduction
1. How the cluster operates
2. Adjust, secure and tune the cluster
3. Responding when things go wrong
2
1. Predicates
2. Priorities
3. High level algorithm
4. Conflicts
3. Controlling scheduling with labels, affinity, taints and tolerations
1. Node Selectors
2. Node Affinity
3. Taints and tolerations
4. Summary
6. 6. Installing Kubernetes
1. kubeadm
1. Requirements
2. kubelet
2. Installing the Control Plane
1. kubeadm Configuration
2. Preflight Checks
3. Certificates
4. etcd
5. kubeconfig
6. Taints
3. Installing Worker Nodes
4. Add-ons
5. Phases
6. High Availability
7. Upgrades
8. Summary
7. 7. Authentication and User Management
1. users
2. Authentication
3. kubeconfig
4. Service Accounts
5. Summary
8. 8. Authorization
1. REST
2. Authorization
3. Role-Based Access Control
1. Role and ClusterRole
2. RoleBinding and ClusterRoleBinding
3. Testing Authorization
4. Summary
9. 9. Admission Control
1. Configuration
2. Common Controllers
1. Pod Security Policies
2. ResourceQuota
3. LimitRanger
3. Dynamic Admission Controllers
1. Validating Admission Controllers
3
2. Mutating Admission Controllers
4. Summary
10. 10. Networking
1. Container Network Interface
1. Choosing a Plugin
2. kube-proxy
3. Service Discovery
1. DNS
2. Environment Variables
4. Network Policy
5. Service Mesh
6. Summary
11. 11. Monitoring Kubernetes
1. Goals for Monitoring
2. Differences between logging and monitoring
3. Building a monitoring stack
1. Getting data from your cluster and applications
2. Aggregating metrics and logs from multiple sources
3. Storing data for retreival and querying
4. Visualizing and interacting with your data
4. What to monitor?
1. Monitoring Machines
2. Monitoring Kubernetes
3. Monitoring applications
4. Black-box monitoring
5. Streaming Logs
6. Alerting
7. Summary
12. 12. Disaster Recovery
1. High Availability
2. State
3. Application Data
1. Persistent Volumes
2. Local Data
4. Worker Nodes
5. etcd
6. Ark
7. Summary
13. 13. Extending Kubernetes
1. Kubernetes Extension Points
2. Cluster Daemons
1. Use cases for cluster daemons
2. Installing a cluster daemon
3. Operational considerations for cluster daemons
4. Hands-on: Creating a cluster daemon
3. Cluster Assistants
1. Use cases for cluster assistants
2. Installing a cluster assistant
4
3. Operational considerations for cluster assistants
4. Hands-on Example of cluster assistants
4. Extending the lifecycle of the API Server
1. Use cases for extending the API lifecycle
2. Installation of API lifecycle extensions
3. Operational Considerations for lifecycle extensions
4. Hands-on Example of lifecycle extensions
5. Adding custom APIs to Kubernetes
1. Use cases for adding new APIs
2. Custom resource definitions & Aggregated API Servers
3. Architecture for custom resource definitions
4. Installation of Custom resource definitions
5. Operational Considerations for custom resources
6. Summary
14. 14. Conclusions
15. Index
5
Managing Kubernetes
Operating Kubernetes Clusters in the Real World
Brendan Burns and Craig Tracey
6
Managing Kubernetes
by Brendan Burns and Craig Tracey
Copyright © FILL IN YEAR Brendan Burns and Craig Tracey. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc. , 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online
editions are also available for most titles ( http://oreilly.com/safari ). For more information,
contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com .
Editor: Virginia Wilson
Production Editor: Justin Billing
Copyeditor: FILL IN COPYEDITOR
Proofreader: FILL IN PROOFREADER
Indexer: FILL IN INDEXER
Interior Designer: David Futato
Cover Designer: Karen Montgomery
Illustrator: Rebecca Demarest
October 2018: First Edition
7
Revision History for the First Edition
YYYY-MM-DD: First Release
See http://oreilly.com/catalog/errata.csp?isbn=9781492033912 for release details.
The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Managing Kubernetes, the
cover image, and related trade dress are trademarks of O’Reilly Media, Inc.
The views expressed in this work are those of the author(s), and do not represent the publisher’s
views. While the publisher and the author(s) have used good faith efforts to ensure that the
information and instructions contained in this work are accurate, the publisher and the author(s)
disclaim all responsibility for errors or omissions, including without limitation responsibility for
damages resulting from the use of or reliance on this work. Use of the information and
instructions contained in this work is at your own risk. If any code samples or other technology
this work contains or describes is subject to open source licenses or the intellectual property
rights of others, it is your responsibility to ensure that your use thereof complies with such
licenses and/or rights.
978-1-492-03391-2
[FILL IN]
8
Chapter 1. Introduction
Kubernetes is an open source orchestrator for deploying containerized applications. Kubernetes
was open sourced by Google, inspired by a decade of experience deploying scalable, reliable
systems in containers via application-oriented APIs.1 and developed over the last four years by a
vibrant community of open source contributors.
It is used by a large and growing number of developers to deploy reliable distributed systems, as
well as run machine learning, big data and other batch workloads. A Kubernetes cluster provides
an orchestration API that enables applications to be defined and deployed using a simple
declarative syntax. Further, the Kubernetes cluster itself provides numerous online, self-healing
control algorithms that repair applications in the presence of failures. Finally the Kubernetes API
exposes concepts like Deployments that make it easier to perform zero-downtime updates of
your software and Service load balancers that make it easy to spread traffic across a number of
replicas of your service. Additionally Kubernetes provides tools for naming and discovery of
services so that you can build loosely coupled microservice architectures. Kubernetes is widely
used across public and private clouds as well as physical infrastructure.
This book is dedicated to the topic of managing a Kuberentes cluster. Whether you are managing
your own cluster on your own hardware, part of a team managing a cluster for a larger
organization or a Kubernetes user who wants to go beyond the APIs and learn more about the
internals of the system, you will find that deepening your knowledge of how to manage
Kubernetes makes you more capable at accomplishing all of the things you need Kubernetes to
do for you.
Note
When we speak about a “cluster” we’re talking about a collection of machines that work together
to provide the aggregate computing power that Kubernetes makes available to its end-users. A
Kubernetes “cluster” is a collection of machines that are all controlled by a single API and can be
used by consumers of that API.
When we talk about managing Kubernetes there are a variety of topics that make up the
necessary skills for managing a cluster:
How the cluster operates
How to adjust, secure and tune the cluster
How to understand your cluster and respond when things go wrong
How to extend your cluster with new and custom functionality
9
How the cluster operates
Ultimately, if you are going to manage a system you need to understand how that system
operates. What are the pieces that it is made up of and how do they fit together. Without at least a
rough understanding of the components and how they inter-operate you are unlikely to be
successful at managing any system. Managing a piece of software, especially one as complex as
Kubernetes, without this understanding is like attempting to repair a car with out knowing how
the tail-pipe relates to the engine. Its a bad idea.
However, in addition to understanding how all the pieces fit together, it’s also essential to
understand how the user consumes the Kubernetes cluster. Only by understanding how a tool like
Kubernetes is intended to be used, can you truly understand the needs and demands required for
successful management of that tool. To revisit our analogy of the car, without understanding the
way in which a driver sits in the vehicle and guides it down the road, you are unlikely to be able
to successfully manage the vehicle. The same is true of a Kubernetes cluster.
Finally, it is critical that you understand the role that the Kubernetes cluster plays in a users daily
existence. What is the cluster accomplishing for the end user? What applications are they
deploying on it? What complexity and hardship is the cluster removing? What complexity is the
Kubernetes API adding? To complete the usage of our car analogy, in order to understand the
importance of a car to it’s end-user, it is critical to know that it is the thing that ensures a person
shows up to work on time. Likewise with Kubernetes, if you don’t understand that the cluster is
the place where a user’s mission critical application will be running, and the Kubernetes API is
the thing that a developer will be relying on to fix a problem when something goes wrong at
three am, then you don’t really understand what is needed to successfully manage that cluster.
10
Adjust, secure and tune the cluster
In addition to understanding how the pieces of the cluster fit together, and how the Kubernetes
API is used by developers to build and deploy their application, it is also critical to understand
the various APIs and configuration options to adjust, secure and tune your cluster. A Kubernetes
cluster, or really any significant piece of software, is not something that you simply turn up, start
running and walk away.
The cluster and its usage have a lifecycle. Developers join and leave teams. New teams are
formed and old ones die. The cluster scales with the growth of the business. New Kubernetes
releases come out to fix bugs, add new features and improve stability. Increased demand on the
cluster exposes performance problems that had previously been ignored. Responding to all of
these changes in the lifespan of your cluster requires understanding the ways in which
Kubernetes can be configured via command line flags, deployment options and API
configuration.
Additionally, your cluster is not just a target for application deployment, it can also be a vector
for attacking the security of your applications. Configuring your cluster to be secure against
many different attacks from application compromises to denial of service is a critical component
of sucessfully managing a cluster. Much of the time this hardening is in fact simply to prevent
mistakes. In many cases, the value of hardening and security is it prevents one team or user from
accidentally “attacking” another team’s service. However, additionally active attacks do
sometimes happen, and the configuration of the cluster is critical to both detecting attacks when
they occur as well as preventing them from occuring in the first place.
Finally, depending on the usage of the cluster, you may need to demonstrate a compliance to
various standards for security that are required for developers of applications in a variety of
different industries such as health-care, finance or government. Understanding how to build a
compliant cluster means that Kubernetes can be put to work in such environments.
11
Responding when things go wrong
It would be a great world to live in, if things never went wrong. Sadly of course, that is not the
world that we live in (at least not any computer system I’ve ever been a part of managing).
What’s critical when things go wrong is that you learn of it quickly. That you learn of it through
automation and alerts rather than through a user informing you your system is down and that you
are capable of responding and restoring the system as quickly as possible.
The first step in detecting when things break and understanding why they are broken is in having
the right metrics in place. Fortunately, there are two technologies present in the Kubernetes
cluster that makes this job easier. The first is that Kubernetes itself is generally deployed inside
of containers. In addition to the value in reliable packaging and deployment, the container itself
forms a boundary where basic metrics such as CPU, memory, network and disk usage can be
observed. These metrics can then be recorded into a monitoring system for both alerting and
introspection.
In addition to these container generated metrics, the Kubernetes code base itself has been
instrumented with a significant number of application metrics. These metrics include things like
the number of requests sent or received by various components, as well as the latency of those
requests. These metrics are expressed using a format popularized by the Prometheus open source
project (https://prometheus.io), and they can be easily collected and populated into Prometheus
which can be used directly, or with other tools like Grafana for visualization and introspection.
Combined together, the baseline metrics from the operating system containers as well as the
application metrics from Kubernetes itself provide a rich set of data that can be used both to
generate alerts that tell you when the system isn’t working properly, as well as the historical data
necessary to debug and determine what went wrong and when.
Of course understanding the problem is only the first half of the battle, the next step that is
necessary is responding and recovering from the problems with the system. Fortunately
Kubernetes has been built in a decoupled, modular manner with minimal state in the system. This
means that (generally) at any given time it is safe to restart any component in the system that
may be overloaded or misbehaving. This modularity and indempotency means that once you
determine the problem developing a solution is often as straight-forward as restarting a few
applications.
Of course in some cases, something truly terrible happens, and in such cases, your only recourse
is to restore the cluster from a disaster recovery back up somewhere. Of course that presumes
that you have enabled such back-ups in the first place. In addition to all of the monitoring to
show you what is happening, the alerts to tell you when something breaks and the play-books to
tell you how to repair it. Successfully managing a cluster requires that you develop and exercise
a disaster response and recovery procedure. Its important to remember that simply developing
this plan is insufficient. You need to practice it regularly, or you will not be ready (and the plan
itself may be flawed) in the presence of a real problem.
12
Extending the system with new and custom
functionality
One of the most important strengths of the Kubernetes open source project has been the
explosive growth of libraries, tools and platforms that build on, extend or otherwise improve the
usage of a Kubernetes cluster.
There are tools like Spinnaker or Jenkins for continuous deployment. There are tools like Helm
that make it easy to package and deploy complete applications. There are platforms like Deis that
provide git-push style developer workflows. There are numerous functions-as-a-service (FaaS)
platforms that build on top of Kubernetes to enable users to consume Kubernetes via simple
functions. There are tools for automating the creation and rotation of certificates. There are
service mesh technologies that make it easy to link and introspect a myriade of microservices.
All of these tools in the ecosystem can be used to enhance, extend and improve the Kubernetes
cluster that you are managing. They can provide new functionality that make your users lives
easier, and make the software that the deploy more robust and more manageable.
However, all of these tools can also make your cluster more unstable, less secure, more prone to
failures. They can expose your users to immature, poorly supported software that feels like an
“official” part of the cluster but solely serves to make the user’s life more difficult.
Part of managing a Kubernetes cluster is understanding how and when to add these tools,
platforms and projects into the cluster. It requires exploration and understanding not just of what
a particular project is attempting to accomplish, but the total set of similar solutions that exist in
the ecosystem. Often times a user will come to you with a request for a particular tool based on
some video or blog that they happened across. But in truth they are often asking for a capability
like CI/CD or certificate rotation, not any specific project. The one they mention is simply the
one they happened across in a web search.
It is your job as a cluster manager to act as a curator of such project, an editor and an advisor
who can recommend alternate solutions, or determine if a particular project is a good fit for your
cluster or if there is some other way of accomplishing the same goal for the end user.
Additionally, the Kubernetes API itself contains rich tools for extending and enhancing the API.
A Kubernetes cluster is not limited solely to the APIs that come built into the cluster. Instead
new APIs can be dynamically added and removed. In addition to the existing extensions
mentioned above, sometimes the job of managing a Kubernetes cluster involves developing new
code and new extensions that enhance your cluster in ways that were previously impossible. Part
of managing a cluster may very well be developing new tooling, and of course, once developed,
sharing that tooling with the growing Kubernetes ecosystem is a great way to give back to the
community that brought you the Kubernetes software in the first place.
13
Summary
Managing a Kubernetes cluster is more than just the act of installing some software on a set of
machines. Successful management requires understanding of how Kubernetes is put together and
how it is put to use by the developers who are Kubernetes users. It requires that you understand
how to maintain, adjust and improve the cluster over time as its usage patterns change.
Additionally, you need to know how to monitor the information put off by the cluster in
operation and develop the alerts and dashboards to tell you when the cluster is sick and how to
make it healthy again. Finally you need to be able to know when and how to extend the
Kubernetes cluster with other tools to make it even more useful to your users. We hope that
within this book you will find answers and more for all of these topics, and at completion you
will find yourself with the skills to be sucessful and Managing Kubernetes.
1 Brendan Burns et al., “Borg, Omega, and Kubernetes: Lessons Learned from Three Container-
Management Systems over a Decade,” ACM Queue 14 (2016): 70–93, available at
http://bit.ly/2vIrL4S.
14
Chapter 2. An overview of Kubernetes
Building, deploying and managing applications on top of the Kubernetes API is a complex topic
in its own right. It is beyond the scope of this book to give a complete understanding of the
Kubernetes API in all of its detail. For those purposes, there are a number of books, such as
Kubernetes Up and Running, and online resources which will give you the knowledge necessary
to build an application on Kubernetes. If you are completely new to Kubernetes and interested in
building applications on top of Kubernetes, we definitely recommend taking advantage of these
resources to augment the information in this chapter.
On the other hand, if you are responsible for managing a Kubernetes cluster, or you have some
high-level understanding of the Kubernetes API then this chapter provides an introduction to the
basic concepts of Kubernetes and their role in the development of an application. If after reading
this chapter you still feel uncomfortable having a conversation with your users about their use of
Kubernetes we highly reccomend you avail yourself to these additional resources.
This chapter proceeds as follows: first we introduce the notion of containers and how containers
can be used to package and deploy your application. Then we introduce the core concepts behind
the Kubernetes API and finally conclude with some higher level concepts that Kubernetes has
added to make specific activities easier.
15
Containers
Containers were popularized by Docker and enabled a revolution in the way in which developers
package and deploy their applications. However along the way the very word “container” has
taken on many different meanings to many different people. Because Kubernetes is a “container
orchestrator” to understand Kubernetes, it’s important to understand what we mean when we say
“container”.
In reality, a “container” is made up of two different pieces, and a group of associated features. A
“container” is made up of
A container image
A set of operating system concepts that isolate a running process or processes.
Starting with the container image, it contains the application runtime which consists of binaries,
libraries and other data needed to run the container. A developer can package up their application
as a container image on their development laptop and have strong assurances that when that
image is deployed and run in a different setting, be it another users laptop or a server in a
datacenter, the container will behave exactly as it did on the developers laptop. This portability
and consistent execution in a variety of environments is one of the primary values of container
images.
When a container image is run, it is also executed using namespaces in the operating system.
These namespaces contain the process and provide isolation for its process or processes from
other things running on the machine. This isolation means for example, that each running
container has its own separated file system (like a chroot), additionally each container has its own
network and PID namespaces, meaning that process number 42 in one container is a different
process than process number 42 in another container. There are many other namespaces within
the kernel that separate various running containers from each other. Additionally CGroups
(control groups) allow the isolation of resource usage like memory or CPU. Finally standard
operating system security features like SELinux or AppArmour can also be used with running
containers. Combined together, all of this isolation makes it more difficult for different processes
running in different containers to interfere with each other.
Note
When we say “isolation” it is incredibly important to know that this isolation is in terms of
resources like CPU, memory or files. Containers as implemented in Linux and Windows do not
currently provide strong security isolation for different processes. Containers when combined
with other kernel level isolation can provide reasonable security isolation for some use cases.
However, in the general case, only hypervisor level security is strong enough to isolate truly
hostile workloads.
In order to make all of this work, a number of different tools were built to help build and deploy
16
containerized applications.
The first is the container image builder. Typically the docker command line tool is used to build a
container image. However, the image format has been standardized through the open container
image (OCI) standard. This has enabled the development of other image builders, available via
cloud API, CI/CD or new alternative tools and libraries.
The docker tool uses a Dockerfile which specifies a set of instructions for how to construct the
container image. Full details of using the docker tool is beyond the scope of this book, but there
are numerous resources available in books like Docker up and running or in online resources. If
you have never built a container image before, put down this book right now go start reading
about containers and come back when you have built a few container images.
Once a container image has been built we need a way to distribute that image from a user’s
laptop up to other users, the cloud or a private data center. This is where the image registry
comes in. The image registry is an API for uploading and managing images. After an image has
been built it is “pushed” to the image registry. Once the image is in the registry, it can be
“pulled” or downloaded from that registry to any machine that has access to the registry. Every
registry requires some form of authorization to push an image, but some registries are “public”
meaning that once an image is pushed anyone in the world can pull and start running the image,
while others are “private” and require authorization to pull an image as well. At this point there
are registries as a service available from every public cloud, and there are open source registry
servers which you can download and run in your own environment. Before you even begin to set
up your Kubernetes cluster, its a good idea to figure out where you are going to store the images
that you run in that cluster.
Once a developer has packaged their application as a container image and pushed it to a registry,
it’s time to use that container to deploy their application, and that’s where container orchestration
comes in.
17
Container Orchestration
Once you have a container image stored in a registry somewhere, you need to run it to create a
working application. This is where a container orchestrator like Kubernetes comes into the
picture. Kuberentes’ job is to take a group of machines which provide resources like CPU,
memory and disk and transform them into a container-oriented API that a developer can use to
deploy their containers.
The Kubernetes API enables a developer to declare their desired state of the world. To make a
declarative request which is something like “I want this container image to run and it needs 3
cores and 10 gigabytes of memory to run correctly”. The Kubernetes system then looks
throughout its fleet of machines and finds a good place for that container image to run, and
schedules the execution of that container on that machine. From the developer’s perspective they
see their container image running, and more often than not they don’t need to concern
themselves with the specific location where their container is executing.
Of course running just a single container is neither that interesting, nor that reliable, so the
Kubernetes API also provides easy ways to say “I want three copies of this container image
running on different machines, each with 3 cores and 10 gigabytes of memory.”
But the orchestration system is about more than scheduling containers to machines. In addition to
scheduling containers, the Kubernetes orchestrator knows how to heal those containers if they
fail. If the process inside your container crashes, Kubernetes will restart it. If you define custom
health checks Kubernetes can use them to determine if your application is deadlocked and needs
to be restarted (liveness checks) or if it should be part of a load-balanced service (readiness
checks).
Speaking of load balancing, Kubernetes also provides API objects for defining a way to load-
balance traffic between these various replicas Kubernetes provides a way to say “Please create
this load balancer to represent these running containers” These load balancers are also given easy
to discover names so that linking different services together within a cluster is easy.
Kubernetes also has objects that perform zero down-time rollouts, manage configurations,
persistent volumes, secrets and much more. The following sections detail the specific objects in
the Kubernetes API that make all of this possible.
18
The Kubernetes API
The Kubernetes API is a RESTful API based on HTTP and JSON and provided by an API
Server. All of the components in Kubernetes communicate through the API. There are more
details of this architecture in the following chapter. As an open source project, the Kubernetes
API is always evolving, but the core objects have been stable for years and the Kubernetes
community provides a strong deprecation policy that ensures that developers and operators don’t
have to change what they are doing with each revision of the system. Kubernetes provides an
OpenAPI specification for the API as well as numerous different client libraries in a variety of
different languages (https://github.com/kubernetes-client).
19
Basic objects: Pods, Replica Sets and Services
Although it has a large and growing number of objects in its API, Kubernetes began with a
relatively small number of objects, and these are still the core of what Kubernetes does.
Pods
A Pod is the atomic unit of scheduling in a Kubernetes cluster. A Pod is made up of a collection
of one or more running containers. (A “Pod” is a collection of whales, derived from Docker’s
whale logo). When we say a Pod is “atomic” what we mean is that all of the containers in a Pod
are guaranteed to land on the same machine in the cluster. Pods also share many resources
between the containers. For example, they all share the same network namespace, which means
that each container in a Pod can see the other containers in the Pod on localhost. Pods also share
the process and inter-process communication namespaces so that different containers can use
tools like shared memory and signalling to coordinate between the different processes in the Pod.
This close grouping means that Pods are ideally suited for symbiotic relationships between their
containers, such as a main serving container and a background data loading container. Keeping
the container images separate generally makes it more agile for different teams to own or re-use
the container images, but grouping them together in a Pod at runtime enables them to operate
cooperatively.
When people first encounter Pods in Kubernetes sometimes they spring to the wrong
assumptions, for example a user may see a Pod and think: “Ah yes, a frontend and a database
server make up a Pod” but this is the generally the wrong level of granularity. To see why,
consider that the Pod is also the unit of scaling and replication, which means that if you group
your frontend and your database in the same container then you will replicate your database at
the same rate you replicate your frontends. This is unlikely the way that you want to do things.
Pods also do things to keep your application running. If the process in a container crashes,
Kubernetes automatically restarts it. Pods can also define application level health-checks that can
provide a richer, application-specific way of determining if the Pod should be automatically
restarted.
ReplicaSets
Of course, if you are deploying a container orchestrator just to run individual containers, you are
probably over-complicating your life. In general one of the main reasons for container
orchestration is to make it easier to build replicated, reliable systems. While individual containers
may fail, or be incapable of serving the load of a system, replicating an application out to a
number of different running containers dramatically reduces the probability that your service will
completely fail at a particular moment in time, and horizontal scaling enables you to grow your
application in response to load. In the Kubernetes API, this sort of stateless replication is handled
by a ReplicaSet object. A replica set takes a Pod definition and a number of replicas and ensures
20
that that number of replicas exist within the system. The actual replication is handled by the
Kubernetes “controller manager” which creates Pod objects that are scheduled by the Kubernetes
“scheduler”. These details of the architecture are described in later chapters.
Note
ReplicaSets are a slightly newer object. At it’s v1 release Kubernetes had an API object called a
ReplicationController. Due to the deprecation policy, ReplicationControllers continue to exist in
the Kubernetes API but their usage is strongly discouraged in favor of using ReplicaSets
Services
Once you can replicate your application out using a ReplicaSet, the next logical goal is to create
a load balancer to spread traffic to these different replicas. To accomplish this, Kubernetes has a
Service object. A Service represents a TCP or UDP load balanced service. Every Service that is
created, whether TCP or UDP gets three things:
It’s own IP address
A DNS entry in the Kubernetes cluster DNS
Load-balancing rules that proxy traffic to the Pods which implement the service
When a Service is created it is assigned a fixed IP address. This IP address is virtual, it does not
correspond to any interface present on the network, instead it is programmed into the network
fabric as a load-balanced IP address when packets are sent to that IP they are load-balanced out
to a set of Pods that implement the Service. The load-balancing that is performed can either be
round-robin or deterministic based on (source IP, destination IP) tuples.
Given this fixed IP address, a DNS name is programmed into the Kubernetes cluster’s DNS
server. This DNS address provides a semantic name (e.g. “frontend”) which is the same as the
name of the Kubernetes Service object and which enables other containers in the cluster to
discover the IP address of the Service load balancer.
Finally, the Service load balancing is programmed into the network fabric of the Kubernetes
cluster so that any container that tries to talk to the Service IP address is correctly load-balanced
to the corresponding pods. This programming of the network fabric is dynamic, so as Pods come
and go due to failures or scaling of a ReplicaSet, the load balancer is constantly re-programmed
to match the current state of the cluster. This means that clients can rely on connections to the
Service IP address always resolving to a Pod that implements the Service.
Storage: Persistent Volumes, ConfigMaps and Secrets
A common question that comes up after an initial exploration of Kubernetes is “what about my
files?”. With all of these containers coming and going within the cluster and landing on different
machines, it’s difficult to understand how you should manage the files and storage you want to
be associated with that running container. Fortunately Kubernetes provides several different API
21
objects to help you manage your files.
The first storage concept introduced in Kubernetes was the Volume which is actually a part of the
Pod API. Within a Pod you can define a set of Volumes. Each volume can be one of a large
number of different types. At present there are more than ten different types of volumes you can
create, including NFS, iSCSI, git, cloud storage based volumes and more.
Note
Though the Volume interface was initially a point of extensibility via writing code within
Kubernetes, the explosion of different volume types eventually showed how unsustainable this
model is. Instead, new volume types are developed outside of the Kubernetes code and
implement the container storage interface (CSI) an interface for storage that is independent of
Kubernetes.
When you add a Volume to your Pod, you can chose to mount it to an arbitrary location in each
running container. This enables your running container to have access to the storage within the
volume. Different containers can mount these volumes at different locations, or ignore the
volume entirely.
In addition to basic files, there are several types of Kubernetes objects that can themselves be
mounted into your Pod as a Volume. The first of these is the ConfigMap object. A ConfigMap
represents a collection of configuration files. In Kubernetes Configuration is separated from
container images, because often you want to have different configurations for the same container
image. When you add a ConfigMap based Volume to your Pod, the files in the config map show
up in the specified directory in your running container.
A special type of configuration is some sort of secure information like a database password or
certificate. Though these are essentially the same as configuration, it is useful to treat them as a
separate type, because their handling is generally more restricted. Kubernetes uses the Secret type
for such data. In the context of volumes, a Secret works identically to a ConfigMap. It can be
attached to a Pod via a Volume and mounted into a running container for use.
Over the course of people deploying applications with Volumes, it became clear that the tight
binding of Volumes to pods was actually problematic. For example, when creating a replicated
container (via a ReplicaSet) the same exact volume must be used by all replicas. In many
situations this is acceptable, but in some cases you want a different volume for each replica.
Additionally, specifying a precise volume type (e.g. an Azure disk persistent volume) binds your
Pod definition to a specific environment (in this case the Microsoft Azure cloud), but it is often
desirable to have a Pod definition that requests a generic type of storage (e.g. 10 gigabytes of
network storage) without specifying a provider. To accomplish this, Kubernetes introduced the
notion of PersistentVolumes and PersistentVolumeClaims. Instead of binding a Volume directly into a
Pod, a PersistentVolume is created as a separate object, this object is then claimed to a specific Pod
by a PersistentVolumeClaim and finally mounted into the Pod via this claim. At first blush this seems
overly complicated, but the abstraction of Volume and Pod enables both the portability and
automatic volume creation required by the two previous use cases.
22
Organizing your cluster with namespaces, labels and
annotations
The Kubernetes API makes it quite easy to create a large number of objects in the system, and
such a collection of objects can easily make administering a cluster a nightmare. Fortunately,
Kubernetes also has a number of objects that make it easier to manage, query and reason about
the objects in your cluster.
Namespaces
The first object for organizing your cluster is a Namespace you can think of a namespace as
something like a folder for your Kubernetes API objects. Namespaces provide directories for
container most of the other objects in the cluster. Namespaces also can provide a scope for role
based access control (RBAC) rules. Like a folder, when you delete a namespace, all of the
objects within that namespace are also destroyed, so be careful when you delete a namespace!
Every Kubernetes cluster has a single built in namespace named default and most installations of
Kubernetes also include a namespace named kube-system where cluster administration containers
are created.
Note
Kubernetes objects are devided into “namespaced” and “non-namespaced” objects depending on
whether they can be placed in a namespace. Most common Kubernetes API objects are
namespaced objects. But some objects that apply to an entire cluster, for example Namespace
objects themselves, or cluster level RBAC, are not namespaced.
In addition to organizing Kubernetes objects, namespaces are also placed into the DNS names
created for services and the DNS search paths that are provided to containers. The complete DNS
name for a Service is something like: my-service.svc.my-namespace.cluster.internal which means that
two different services in different namespaces will end up with different FQDNs. Additionally,
the DNS search paths for each container include the namespace, thus a DNS lookup for frontend
will be translated to frontend.svc.foo.cluster.internal for a container in the foo namespace and
frontend.svc.bar.cluster.internal for a container in the bar namespace.
Labels and Label Queries
Every object in the Kubernetes API can have an arbitrary set of labels associated with the object.
Labels are string key/value pairs which help identify the object. For example a label might be
“role”: “frontend”, which indicates that the object is a frontend. These labels can be used to
query and filter objects in the API. For example, you can request that the API server provide you
with a list of all Pods where the label “role” is “backend”. These requests are called “label
queries” or “label selectors”. Many objects within the Kubernetes API use label selectors as a
way to identify of set of objects that they apply to. For example a Pod can have a “node selector”
23
which identifies the set of nodes on which the Pod is elegible to run (nodes with GPUs for
example). Likewise a Service has a “pod selector” which identifies the set of Pods that the
Service should load balance traffic to. Labels and label selectors are the fundamental manner in
which Kubernetes loosely couples its objects together.
Annotations
Not every metadata value that you want to assign to an API object is identifying information.
Some of the information is simply an annotation about the object itself. Thus every Kubernetes
API object can also have arbitrary annotations. These annotations might include something like
the icon to display next to the object, or a modifier that changes the way that the object is
interpretted by the system.
Often times experimental or vendor-specific features in Kubernetes are initially implemented
using annotations, since they are not part of the formal API specification. In the case of such
annotations, the annotation itself should carry some notion of the stability of the feature (e.g.
beta.kubernetes.io/activate-some-beta-feature).
24
Advanced concepts: StatefulSets, Ingress and
Deployments
Of course, simple replicated, load-balanced services are not the only style of application that you
might want to deploy in containers, and as Kubernetes has evolved, it has added new API objects
to better suit more specialized use cases, including improved rollouts, HTTP-based load
balancing and routing, and stateful workloads.
Deployments
Though ReplicaSets are the primitive for running many different copies of the same container
image, applications are not static entities. They evolve as developers add new features and fix
bugs. This means that the act of rolling out new code to a service is as important a feature as
replicating it to reliably handle load.
The Deployment object was added to the Kubernetes API to represent this sort of safe rollout from
one version to another. A Deployment can hold pointers to multiple ReplicaSets, (e.g. v1 and v2)
and it can control the slow and safe migration from one ReplicaSet to another.
To understand how a Deployment works, imagine that you have an application which is
deployed to three replicas in a ReplicaSet named rs-v1. When you ask a Deployment to rollout a
new image (v2) the Deployment creates a new ReplicaSet (rs-v2) with a single replica. The
Deployment waits for this replica to becomes healthy, and when it is the Deployment reduces the
number of replicas in rs-v1 to two. It then increases the number of replicas in rs-v2 to two also,
and waits for the second replica of v2 to become healthy. This process continues until there are no
more replicas of v1 and there are three healthy replicas of v2.
Note
Deployments feature a large number of different knobs that can be tuned to provide a safe rollout
for the specific details of an application. Indeed in most modern clusters, users exclusively use
Deployment objects and don’t manage ReplicaSets directly.
HTTP load balancing with Ingress
While Service objects provide a great way to do simple TCP level load balancing, they don’t
provide an Application level way to do load-balancing and routing. The truth is that most of the
applications that users deploy using containers and Kubernetes are HTTP web-based
applications. These applications are better served by a load-balancer that understands HTTP. To
address these needs, the Ingress API was added to Kubernetes. Ingress represents a path and host-
based HTTP load balancer and router. When you create an Ingress object, it receives a virtual IP
address just like a Service, but instead of the 1-1 relationship between a service IP address and a
set of Pods, an Ingress can use the content of an HTTP request to route requests to different
25
services.
To get a clearer understanding of how Ingress works, imagine that I have two Kubernetes
services named “foo” and “bar”. Each has it’s own IP address, but I really want to expose them
to the internet as part of the same host. For example, foo.company.com and bar.company.com. I can do
this, by creating an Ingress object and associating its IP address with both the foo.company.com and
bar.company.com DNS names. In the Ingress object, I also map the two different hostnames to the
two different Kubernetes services. That way, when a request for https://foo.company.com is
received, it is routed to the foo service in the cluster, and similarly for https://bar.company.com.
With Ingresss the routing can be based on either host, or path or both, so https://company.com/bar
can also be routed to the bar service.
Note
The Ingress API is one of the most decoupled and flexible APIs in Kubernetes. By default while
Kubernetes will store Ingress objects, nothing will happen when they are created. Instead you
need to also run an “ingress controller” in the cluster to take appropriate actions when the Ingress
object is created. One of the most popular ingress controllers is the nginx ingress controller, but
there are numerous different implementations that use other HTTP load balancers, or use cloud
or physical load-balancer APIs
StatefulSets
Many applications are happily replicated horizontally and treated as identical clones of the same
application. Each replica really has no unique identity independent of any other. For representing
such applications a Kubernetes ReplicaSet is a perfect object. However, some applications,
especially stateful storage workloads, or sharded applications require more differentiation
between the different replicas in the application. While it is possible to add this differentiation at
the application level on top of a ReplicaSet, doing so is complicated, error-prone and repetitive
for end-users.
To resolve this, Kubernetes has recently introduced StatefulSets as a compliment to ReplicaSets,
but for more stateful workloads. Like ReplicaSets, StatefulSets create multiple instances of the
same container image running in a Kubernetes cluster, but the manner in which containers are
created and destroyed is more deterministic, as are the names of each container.
In a ReplicaSet, each replicated Pod receives a name that involves a random hash (e.g. “frontend-
14a2”), importantly there is no notion of ordering in a ReplicaSet. In contrast, with StatefulSets
each replica receives a monotonically increasing index (e.g. “backed-0”, “backend-1” and so on).
Further, StatefulSets guarantee that replica zero will be created and become healthy before
replica one is created and so forth. When combined this means that applications can easily
bootstrap themselves using the initial replica (e.g. “backend-0”) as a bootstrap master. All
subsequent replicas can rely on the fact that “backend-0” has to exist. Likewise when replicas are
removed from a StatefulSet they are removed at the highest index. If a StatefulSet is scaled down
from five to four replicas it is guaranteed that the fifth replica is the one that will be removed.
26
Additionally, StatefulSets receive DNS names so that each replica can be accessed directly, in
addition to the complete StatefulSet. This allows clients to easily target specific shards in a
sharded service.
27
Batch workloads: Job and ScheduledJob
In addition to stateful workloads, another specialized class of workloads are batch or one-time
workloads. In contrast to all of the other workloads discussed previously, these workloads are not
contstantly serving traffic. Instead they come into existence to perform some computation and
are destroyed when the computation is complete.
In Kubernetes, a Job represents a set of tasks that need to be run. Like ReplicaSets and
StatefulSets, Jobs operate by creating Pods to execute work by running container images.
However, unlike Replica and StatefulSets, the Pods created by a Job only run until they complete
and exit. In addition to the definition of the Pod to create, a Job contains a desired number of
repetitions of the Job that should be run, as well as the maximum number of Pods to create in
parallel. For example, a job with 100 repetitions and a maximum parallelism of 10 will run 10
pods simultaneously, creating new Pods as old ones complete, until there have been 100
successful executions of the container image.
ScheduledJobs build on top of the Jobs object by adding a schedule to a Job. A scheduled Job
contains the definition of the Job object that you want to create, as well as the schedule on which
that Job should be created.
28
Cluster agents and utlities: DaemonSets
One of the most common questions that comes up when people are moving to Kubernetes is:
“how do I run my machine agents?” Example of such agents include things like intrusion
detection, logging and monitoring and others. Many people attempt to use non-Kubernetes
approaches to enable these agents such as adding new systemd unit files, or initialization scripts.
While these approaches can work, they have several downsides. The first is that the resources
used by these agents is not accounted for in Kubernetes’ accounting of resources in use on the
cluster. The second is that all of the utility of container images and Kubernetes APIs for health
checking, monitoring and more can not be applied to these agents. Fortunately, Kubernetes
makes the DaemonSet API available to users to install such agents on their clusters. A DaemonSet
provides a template for a Pod that should be run on every machine. When a DaemonSet is
created, Kubernetes ensures that this Pod is running on each node in the cluster. If at some later
point a new node is added, Kubernetes creates a Pod on that node as well. While by default
Kubernetes places a Pod on every node in the cluster, a DaemonSet can also provide a node
selector label query, and Kubernetes will only place that DaemonSet’s pods onto nodes that
match that label query.
29
Another Random Document on
Scribd Without Any Related Topics
open-handed charity. The manager of Covent Garden Theatre could
always be sure of a full house when he announced her in the
character of the gay, dissipated, good-humored rake, Sir Harry
Wildare. Margaret built and endowed two almshouses at Teddington,
Middlesex, and lies buried in the principal church of the district. In
the height of her popularity she declared that she preferred the
society of men to that of women; the latter, she said, "talk of
nothing but silks and scandal." Her end was singularly dramatic. She
was playing the character of Rosalind with more than usual éclat,
when she was struck with paralysis, and died soon after in the prime
of life.[189]
We have spoken of accident as often determining the development
and directing the course of genius. Edward Shuter was one of the
most popular comedians on the London stage in 1776, but he began
life as a pot-boy at a public-house in the neighborhood of Covent
Garden. A gentleman came to the house one evening, and after
refreshing himself he sent the boy Shuter to call him a hackney-
coach. On reaching home he found that he had dropped his pocket-
book; and suspecting that he had lost it in the coach, he went the
next morning to the tavern to make inquiry. He asked Shuter if he
knew the number of the hack. The poor boy could not read or write,
and was totally unskilled in numerals; but he knew the signs by
which his master scored the quarts and pints of porter that were
drunk, and to the gentleman's inquiry as to the number of the coach
which the boy had called for him Shuter said it was "two pots and a
pint" (771). This was unintelligible to the gentleman, but was
explained by the landlord. The coachman was summoned, and the
pocket-book recovered. This acuteness of the boy interested the
gentleman, and he became his patron, sent him to school, and gave
him a start in the line of his choice, which was the theatrical
profession. Such is the story in brief of one of the famous London
comedians.
How many of our readers remember the one recorded scene when
Queen Elizabeth condescended to coquet with Shakespeare? The
great bard was performing the part of a king; Elizabeth's box was
contiguous to the stage, and she purposely dropped her
handkerchief from the box upon the boards, at the very feet of
Shakespeare, having a mind thus to try whether her poet would
stoop from his high estate of assumed majesty. "Take up our sister's
handkerchief," was his prompt and dignified order to one of the
actors in his train.
It will doubtless be found interesting to see recorded in juxtaposition
the words and the manner of death of some of the great geniuses
whom history mentions. When Alonzo Cano, the famous Spanish
artist, was dying, the attendant priest presented before him an ivory
crucifix; Cano turned away and refused to look at it because the
sculpture was so bad, calling for a plain cross, which he embraced,
and died. Chaucer breathed his last while composing a ballad. When
the priest came whom Alfieri had been prevailed upon to see, he
requested him to call the next day. "Death, I trust, will tarry four-
and-twenty hours," he said, but died in the interim. Petrarch was
found dead in his library, leaning on a book. "I could wish this tragic
scene were over," said Quin the actor, "but I hope to go through it
with becoming dignity." Pitt, the great statesman, died alone, in a
solitary house on Wimbledon Common. Rousseau, when dying,
asked to be carried to the window of the apartment overlooking his
garden, that he might look his last on Nature.
When Malherbe the lyric poet was dying, he reprimanded his nurse
for making use of a solecism in her language, and bade the priest
stop his trite, cant talk about heaven, saying, "Your wretched style
only makes me out of conceit with it." Bide, the English monk and
author, on the night of his death continued to dictate to his
amanuensis. He asked his scribe how many chapters yet remained
to complete the work, and was told there was one. "Take your pen,"
he commanded, and went on with the work. By and by the scribe
said, "It is finished," just as his master breathed his last.
Roscommon, when expiring, quoted from his own translation of the
"Dies Iræ." "All my possessions for a moment of time!" were the
dying words of Queen Elizabeth. The last words of Cardinal Beaufort
were, "What! is there no bribing death?" The last words uttered by
Byron were, "I must sleep now." In his last moments Crébillon, who
had composed two acts of his tragedy of "Catiline," regretted that he
had not been spared to complete it.
Colorden on the day of his death was visited by his friend Barthe,
who requested his opinion of the comedy of the "Selfish Man," which
he came to read at his bedside. "You may add an excellent trait to
the character of your principal personage," said Colorden. "Say that
he obliged an old friend, on the eve of his death, to hear him read a
five-act comedy!" "Let me die to the sound of delicious music," were
the last words of Mirabeau. Herder died writing an ode to the Deity,
his pen on the last line. Heller died feeling his own pulse; and when
he found it almost gone, turning his eyes to his brother physician,
said, "My friend, the artery ceases to beat!" "Tell Collingwood to
bring the fleet to anchor," said Nelson, and expired. The last words
of Charles I. were uttered on the scaffold,—"I fear not death! Death
is not terrible to me!"
Curran's ruling passion was strong in death. Near the close of his
earthly hours his physician at his morning call said he "seemed to
cough with more difficulty." "That's surprising," said the almost
exhausted invalid, "as I have been practising all night." "There is not
a drop of blood on my hands," said the expiring Frederick V. of
Denmark. "Let not poor Nellie starve" (Nell Gwynn, his mistress),
were the last words of Charles II. "I have loved righteousness and
hated iniquity, therefore do I die in exile," said Pope Gregory VII.
with his expiring breath. Anne Boleyn turned to the executioner on
the scaffold, and pointing to her neck, said pathetically, "It is small,
very small indeed!" The last words of Maria Theresa were, "I do not
sleep; I wish to meet my death awake." Madam Roland exclaimed,
"O liberty! liberty! how many crimes are committed in thy name!"
It was in perfect accord with his character when Chancellor Thurlow
said at the closing moment of his life, "I'm shot if I don't believe I'm
dying!" "World without end, Amen!" said Bunyan as he breathed his
last. "Guilty, but recommended to the mercy of the court," whispered
Lord Hermand. "For the last time I commit soul, body, and spirit into
His hands," said John Knox in dying. "Trust in God," said President
Edwards, "and you need not fear." These were his last words. "If I
had strength enough to hold a pen," said Willian Hunter, the
distinguished anatomist, "I would write how easy and delightful it is
to die." The dying words of Louis XIV. were, "I thought that dying
had been more difficult." Arthur Murphy the dramatist quoted in his
last breath Pope's lines,—
"Taught by reason, half by mere decay,
To welcome death and calmly pass away."
When asked if he heard the prayers which were offered in his
presence, the Duke of Marlborough replied, "Yes, and I join in
them." He never spoke again. "O Lord, open the King of England's
eyes," said the martyr Tyndale as he died at the stake. When those
noble English reformers, Latimer and Ridley, were being burned at
the stake, "Be of good cheer, brother," cried Ridley, "for our God will
either assuage the fury of this flame or enable us to abide it."
Latimer replied: "Be of good comfort, brother, for we shall this day
light such a candle in England as by God's grace shall never be put
out." Lady Jane Grey's last words upon the scaffold were: "Lord, into
thy hands I commend my spirit." "Many things are growing plain and
clear to me," whispered Schiller, and died with these words on his
lips.
Anna Lætitia Barbauld, the English authoress, wrote with great
poetic feeling and moral beauty. Her husband became a lunatic, and
she suffered much. It was her beautiful self-sacrifice that gave the
best charm to her character. She wrote, among many other works, a
popular life of the novelist Richardson, and some political pamphlets
of great force and excellence. Her series of books for children would
alone have given her lasting reputation. There occurs to us in these
closing pages the stanza which she wrote in her old age, probably in
her eighty-second year, not long before her death,—lines which
Rogers and Wordsworth so much and so justly admired. The former
says in his "Table Talk" that while sitting with Madame D'Arblay a few
weeks before her death, he asked her if she remembered these lines
of Mrs. Barbauld's. "Remember them!" answered the famous
authoress, "I repeat them to myself every night before I go to
sleep."
"Life! we've been long together
Through pleasant and through cloudy weather;
'T is hard to part when friends are dear;
Perhaps 't will cost a sigh, a tear;
Then steal away, give little warning,
Choose thine own time;
Say not 'Good-night,' but in some brighter clime
Bid me 'Good morning.'"
CHAPTER XI.
Genius has its hours of sunshine as well as of shadow, and when it
finds expression in wit and humor it is undoubtedly most popular.
The Emperor Titus thought he had lost a day if he had passed it
without laughing. Coleridge tells us men of humor are in some
degree men of genius; wits are rarely so, although a man of genius
may, among other gifts, possess wit. As in pathos and tenderness
"one touch of nature makes the whole world kin," so is it in true wit
and humor with the appreciative. Obtuseness will be unsympathetic
under any circumstances. "It is not in the power of every one to
taste humor," says Sterne, "however much he may wish it; it is the
gift of God! and a true feeler always brings half the entertainment
with him." Bruyere has somewhere said very finely that "wit is the
god of moments, but genius is the god of ages." Some men of
genius have found their most natural exponent to be the pen; others
indulge in practical humor. Sheridan[190] belonged to this latter
class; he was full of fun and frolic, ever on the alert for an
opportunity to exercise his humor. When on a certain occasion he
had been driving about the town for three or four hours in a
hackney-coach, he chanced to see his friend Richardson, whom he
hailed, and invited into the vehicle. When they were seated together
he at once introduced a subject upon which he and Richardson
always differed, and a controversy naturally ensued. At last,
affecting to be mortified at Richardson's argument, Sheridan said
abruptly, "You are really too bad; I cannot bear to listen to such
things: I will not stay in the coach with you." And accordingly he
opened the door and sprang out, Richardson hallooing triumphantly,
"Ah, you're beat, you're beat!" Nor was it until the heat of the victory
had a little cooled that he realized he was left in the lurch to pay for
Sheridan's three hours' coaching.[191]
Sheridan, profligate and unprincipled as he was, still was capable of
fine expression of sentiment and true poetic fire. In a poem called
"Clio's Protest; or, the Picture Varnished," we find the following really
beautiful lines:—
"Marked you her cheek of rosy hue?
Marked you her eye of sparkling blue?
That eye in liquid circles moving;
That cheek abashed at man's approving;
The one Love's arrows darting round;
The other blushing at the wound:
Did she not speak, did she not move,
Now Pallas, now the Queen of Love?"
The poets have frequently made satire an auxiliary of their wit; and
when the proportions are properly adhered to, a favorable result is
produced. Satire, like many subtle poisons used as a medicine, may
be safely taken in small quantities, while an overdose is liable to be
fatal. In Chaucer's[192] Canterbury Pilgrims he draws his portraits to
the life. While he exposes the weakness of human nature, he does
not do so in surliness; a pleasant smile wreathes his lips all the
while. There is slyness, but no bitterness in his satire. He would not
chastise, he would only reform his fellow-men. As illustrating exactly
the opposite spirit, we may instance Pope, Dryden, and Byron, who,
descending from their high estate, often prostituted their genius to
attacks upon personal enemies or rivals, with keenest weapons,
while their opponents had no means of defence. The "Dunciad" is a
monument of satiric wit, or genius belittled.
Swift, who wrote "cords" of worthless rhymes, squibs, songs, and
verses, which live as much by their vulgar smartness as for the slight
portion of true wit which tinctures them, says: "Satire is a sort of
glass wherein beholders generally discover everybody's face but
their own; which is the chief reason for that kind of reception it
meets with in the world, and that so few are offended with it."
Hawthorne gave the Dean a merited thrust when he said, "the
person or thing on which his satire fell shrivelled up as if the Devil
had spit on it." The double entendre to be found in nearly all of
Swift's effusions, epigrams, and verses, comes with ill grace from a
dignitary of the Church. He was always ready with an epigram on all
occasions. One "lives in our memory" which he addressed to Mrs.
Houghton of Bormount, who took occasion one day to praise her
husband in Swift's presence:—
"You always are making a god of your spouse;
But this neither reason nor conscience allows:
Perhaps you will say 'tis in gratitude due,
And you adore him because he adores you.
Your argument's weak, and so you will find;
For you, by this rule, must adore all mankind."
The wit and humor of Shakespeare endear him to our hearts; and
what a rich harvest does the gleaner obtain from his pages! Take
"Love's Labor's Lost," for instance, a play produced in his youth, so
full of quips and quiddity as to live in the memory by whole scenes.
There is no lack of scathing sarcasm in the play, but it leaves no
bitter taste in the mouth, like the "doses" of Swift or the more
unscrupulous productions of Pope in the same line. Ben Jonson,[193]
who ranked so high as a dramatist, has been pronounced to be, next
to Shakespeare, the greatest wit and humorist of his time. His
expression was through the pen, not by the tongue: no man was
more taciturn in society. Much of Jonson's matter was better adapted
to his time than to ours; words which seem to us so coarse and
vulgar passed unchallenged in the period which gave them birth.
Here are five lines from Jonson, with which he closes a play directed
against plagiarists and libellers generally. He sums up thus:—
"Blush, folly, blush! here's none that fears
The wagging of an ass's ears,
Although a wolfish case he wears.
Detraction is but baseness' varlet,
And apes are apes, though clothed in scarlet."
It is said that Jonson was a "sombre" man. We have seen that it is
by no means always sunshine with those who brighten others' spirits
by their pen. The great luminary is not always above the horizon.
A friend remarked to the wife of one of our wittiest poets, "What an
atmosphere of mirth you must live in, to share a home with one who
writes always so sportively and wittily!" The answer was a most
significant shake of the head.
We spoke of Dryden as a satirist; perhaps no writer ever went
further in the line of bitterness and personality. His portrait of the
Duke of Buckingham will occur to the reader in this connection:—
"A man so various that he seemed to be
Not one, but all mankind's epitome;
Stiff in opinions, always in the wrong,
Was everything by starts, and nothing long;
But, in the course of one revolving moon,
Was chymist, fiddler, statesman, and buffoon."
When a boy at school in Westminster, Dryden more than once
showed the budding promise of the genius that was in him. When
put with other classmates to write a composition on the miracle of
the conversion of water into wine, he remained idle and truant, as
usual, up to the last moment, when he had only time to produce one
line in Latin and two in English; but they were of such excellence as
to presage his future greatness as a poet, and elicit hearty praise
from his tutor. They were as follows:—
Videt et erubit lympha pudica Deum!
"The modest water, awed by power divine,
Beheld its God, and blushed itself to wine."
Dryden's complete works form the largest amount of poetical
composition from the pen of one writer, in the English language; and
yet he published scarcely anything until he was nearly thirty years of
age. From that period he was actively engaged in authorship for
forty years, and gave us some of the finest touches of his genius in
his second spring of life. Addison wrote of Dryden at this period the
following lines:—
"But see where artful Dryden next appears,
Grown old in rhyme, but charming e'en in years;
Great Dryden next, whose tuneful Muse affords
The sweetest numbers and the fittest words.
Whether in comic sounds or tragic airs
She forms her voice, she moves our smiles or tears;
If satire or heroic strains she writes,
Her hero pleases and her satire bites;
From her no harsh, unartful numbers fall,
She wears all dresses, and she charms in all."
Richard Porson, the profound scholar, linguist, and wit, reared many
monuments of classic learning, which have however crumbled away,
leaving his name familiar to us only as a writer of jeux d'esprit; but
these are admirable. He was full of the sunshine of wit; and though
sarcastic and personal, as the nature of his bon-mots compelled, he
had no bitterness in his reflections, and uttered them with a good-
natured laugh. Wonderful stories are told of his powers of memory.
He could repeat several consecutive pages of a book after reading
them once. It was he who wrote a hundred epigrams in one night on
the subject of Pitt's drinking habit, one of which occurs to us:—
"When Billy found he scarce could stand,
'Help, help!' he cried, and stretched his hand,
To faithful Harry calling.
Quoth he, 'My friend, I'm sorry for't,
'Tis not my practice to support
A minister that's falling.'"
The "faithful Harry" was Dundas, Viscount Melville.
The reply of Pitt to Walpole, March 6, 1741, is one of the finest,
most polished, and biting retorts on record: "The atrocious crime of
being a young man, which the honorable gentleman has, with such
spirit and decency, charged upon me, I shall neither attempt to
palliate nor deny, but content myself with wishing that I may be one
of those whose follies may cease with their youth, and not of that
number who are ignorant in spite of experience."
Dr. Gilles, the historian of Greece, and Dr. Porson used often to meet
and discuss matters of mutual interest relating to the classics. These
interviews were certain to lead to very earnest arguments; Porson
was much the better scholar of the two. Dr. Gilles was one day
speaking to him of the Greek tragedies and of the Odes of Pindar.
"We know nothing," said Gilles, emphatically, "of the Greek metres."
Porson answered: "If, Doctor, you will put your observation in the
singular number, I believe it will be quite correct." In repartee he
was remarkable. "Dr. Porson," said a gentleman with whom he had
been disputing,—"Dr. Porson, my opinion of you is most
contemptible." "Sir," responded the Doctor promptly, "I never knew
an opinion of yours that was not contemptible." Porson was a
natural wit, so to speak. Being once at a dinner-party where the
conversation turned upon Captain Cook and his celebrated voyages,
an ignorant person in order to contribute something towards the
conversation asked, "Pray, was Cook killed on his first voyage?" "I
believe he was," answered Porson, "though he did not mind it much,
but immediately entered upon a second."
The sharpest repartee is both witty and satirical. James II., when
Duke of York, made a visit to Milton, prompted by curiosity. In the
course of his conversation the Duke said to the poet that he thought
his blindness was a judgment of Heaven on him because he had
written against Charles I., the Duke's father; whereupon the
immortal poet replied: "If your Highness thinks that misfortunes are
indexes of the wrath of Heaven, what must you think of your father's
tragical end? I have lost my eyes—he lost his head."
Few men equalled Coleridge in the matter of prompt readiness of
retort, and few have so misused the lavish gifts of Providence.[194]
On a certain occasion he was riding along a Durham turnpike road,
in his awkward fashion,—for he was no horseman,—when a wag,
noticing his peculiarity, approached him. Quite mistaking his man, he
thought the rider a good subject for a little sport, and so accosted
him: "I say, young man, did you meet a tailor on the road?" "Yes,"
replied Coleridge, "I did, and he told me if I went a little further I
should meet a goose!" The assailant was struck dumb, while the
traveller jogged leisurely on.
Lord Bolingbroke, the ardent friend of Pope, was often bitterly
satirical, and notably quick at retort. Being at Aix-la-Chapelle during
the treaty of peace at that place, he was asked impertinently by a
Frenchman whether he came there in any public character. "No, sir,"
replied Bolingbroke, very deliberately; "I come like a French minister,
with no character at all." Bolingbroke's talents were more brilliant
than solid, but the style of his literary work is admirable. It is
generally believed that he wrote the "Essay on Man" in prose, and
that Pope put it into verse, with such additions as would naturally
occur in such an adaptation.
Painters, like poets, are equal at times to producing the keenest
epigrams. Salvator Rosa's opinion of Michael Angelo's "Last
Judgment" is an instance of this. The brother artist wrote not
unkindly as follows:—
"My Michael Angelo, I do not jest;
Thy pencil a great judgment has expressed;
But in that judgment thou, alas! hast shown
But very little judgment of thine own!"
We have already spoken of Molière[195] in these pages, though only
too briefly when his just fame is considered. England has her
Shakespeare, Spain her Cervantes, Germany her Goethe, and France
her Molière. We have seen how triumphantly his powerful genius
made its way amid adverse circumstances, until it enabled him, as
Disraeli says, "to give his country a Plautus in farce, a Terence in
composition, and a Menander in his moral truths." In short, Molière
showed that the most successful reformer of the manners and
morals of the people is a great comic poet. Did not Cervantes "laugh
Spain's chivalry away"? It is a curious fact, worthy of note, that
Molière, who was so great a comic writer, and such an admirable
comedian upon the stage, should have been socially one of the most
serious of men and of a melancholic temperament. It was a
considerable time before his genius struck out in the right direction
and became self-reliant. At the beginning of his dramatic authorship
he "borrowed bravely" from the Italian, as Shakespeare did; and
Spanish legends were also adapted by his facile pen to dramatic
purposes, himself enacting chosen comedy parts of his own plays.
This course, however, did not satisfy the genius of Molière; he felt
that he was capable of greater originality and of more truly artistic
work. After much communing with himself he sought a new and
more legitimate field of inspiration and employed fresher material.
Having now the entrée to the Hôtel de Rambouillet, he began to
study with critical eye the court life about him, soon producing his
"Précieuses Ridicules," which was a biting satire upon the follies of
the day, though delicately screened. The author skilfully parried in
the prologue any application to his court associates, by averring that
the satire was aimed at their imitators in the provinces. The ruse
was sufficient, and the play was performed without offence; but its
significance was nevertheless realized, and had its reformative
influence without producing too great a shock. It was almost his first
grand and original effort, and from thenceforth his career was a
triumphal march. He is said to have exclaimed, "I need no longer
study Plautus and Terence, nor poach on the fragments of
Menander, I have only to study the world about me." Subsequently
the brilliant success of his "Tartuffe," his "Misanthrope," and his
"Bourgeois Gentilhomme" confirmed him in his conviction. Although
society felt itself arraigned, it was also humbled and powerless. The
author had become too great a power to be suppressed.
Molière's domestic life, like that of only too many men of genius, and
especially of authors, was a wreck.[196]
It may be doubted if such persons ought to marry at all. Rousseau is
another instance of domestic infelicity; and so are Milton, Dryden,
Addison, Steele; indeed, the list could be indefinitely extended. A
young painter of great promise once told Sir Joshua Reynolds that
he had taken a wife. "Married!" responded the great master; "then
you are ruined as an artist." Michael Angelo's answer when he was
asked why he never married will be remembered: "I have espoused
my art, and that occasions me sufficient domestic cares; my works
shall be my children." The marriage of men of genius forms a theme
of no little interest in the history of literature. It is herein that genius
has oftenest found its sunshine or its shadow. Even Emerson has
said, "Is not marriage an open question, when it is alleged from the
beginning of the world that such as are in the institution wish to get
out, and such as are out wish to get in?" Rousseau married a
kitchen-girl, and Raphael allied himself for the last eleven years of
his life with a common girl of Rome, whom he first saw washing her
feet in the Tiber. Judging from her portrait, which he painted, and
which still hangs in the Barberini Gallery, she was by no means
beautiful, though the ensemble of head, face, and neck strikes the
eye as forming a very attractive whole. Margarita belonged to the
lower classes of the Eternal City, and when Raphael died she went
back to her former obscurity. There must have been many noble
qualities in this young Roman girl, to have held the consistent
devotion of so great an artist for an entire decade. She must have
possessed some inspiring influence over him other than forming his
mere physical model. Sympathetic she undoubtedly was, or else no
such union could have lasted; and one feels that he must have
imparted to her a portion of the glowing aspirations which fired his
own genius.
Goethe married to legitimize his offspring; Niebuhr, to please a
mistress; Churchill, because he was dispirited and lonely; Napoleon,
to obtain influence; Wilkes, to oblige a friend; Lamartine, in
gratitude for a fortune which was offered to him, and which he
rapidly squandered; Wycherly married his servant to spite his
relations. And so we might fill pages with brief mention of the
influences which have led men of note to assume matrimonial
relations. Balzac's marriage forms a curious example. He met by
chance, when travelling, a youthful married lady, who told him,
without knowing who he was, how much she admired Balzac's
writings. "I never travel without a volume of his," she added,
producing a copy. Greatly flattered, the author made himself known
to the lady, who was a princess by birth, and who became his
constant correspondent until the death of her husband, when she
gave him her hand and fortune. They were married, and settled to
domestic life in a château on the Rhine.
But we have wandered away from Molière before quite concluding
the consideration of himself and his works. One of his most popular
productions, "L'Impromptu de Versailles," has often been borrowed
from; indeed, the general idea has been appropriated bodily both on
the English and American stage. In this piece Molière appears in his
own person and in the midst of his whole theatrical company,
apparently taken quite aback because there is no suitable piece
prepared for the occasion. The characters are the actors as though
congregated in the Green Room, with whom the manager is
consulting, now reprimanding and now advising. In the course of his
remarks he throws out hints of plots designed for plays, criticises his
own productions, gives amusing sketches of character, and in short
presents a humorous, realistic, and unique scene which formed as a
whole a very complete comedy, and which proved a grand success.
Louis XIV. was his friend and patron; being himself particularly fond
of theatrical performances, he often made shrewd suggestions,
which the actor and dramatist took good care faithfully to adopt.
Indeed, it was said that this then unique idea of the Green Room
brought before the curtain was from his Majesty's own brain, though
greatly improved upon by Molière. Some of the plots hinted at by the
manager before his company in this play were afterwards amplified
and perfected so as to become popular dramas, not only by Molière,
but by other dramatists. This is notably the case with Beaumarchais'
"Barber of Seville," which is but the elaboration of one of these
incipient plots. However, Molière was himself so liberal a borrower,
like Montesquieu, Racine, and Corneille, he could well afford to lend
to others. Bruyère embodies whole passages from Publius Syrus in
his printed works; and La Fontaine borrowed his style and much of
his matter from Mazot and Rabelais. Though we have referred to this
subject before, we will add that Voltaire looked upon everything as
imitation; saying that the instruction which we gather from books is
like fire: we fetch it from our neighbor's, kindle it at home, and
communicate it to others, till it becomes the property of all.
CHAPTER XII.
Every thoughtful person must often have realized how close is the
natural sympathy between artists in literature and artists of the
pencil and brush; between painters and poets. Belori informs us of a
curious volume in manuscript by the hand of Rubens, which
contained among other topics descriptions of the passions and
actions of men, drawn from the poets and delineated by the artist's
own graphic pencil. Here were represented battles, shipwrecks,
landscapes, and various casualties of life, copied and illustrated from
Virgil and other classic poets, showing clearly whence Rubens often
got his inspiration and ideas of detail. The painter and the poet are
the Siamese-twins of genius. The finest picture ever produced is but
poetry realized, though each art has its distinct province. The same
may be said as to sculpture and poetry. It has long been a mooted
question whether the Laocoön in sculpture preceded or was
borrowed from the idea expressed in poetry. Lessing believed that
the sculptor borrowed from the poet. All the sister arts[197]—music,
sculpture, poetry, and painting—are most intimately allied. When
great composers, like Mozart, were contemplating a grand
expression of their genius, they endeavored to inspire themselves
with lofty ideas by reading the poets; while masters in literature and
oratory have sought for a similar purpose the elevating and soothing
influence of music.
Orators have not infrequently depended upon more material
stimulus, as we have seen in the instances of Pitt and Sheridan. The
biographer of More tells us that when Sir Thomas was sent by Henry
VIII. on an embassy to the Emperor of Germany, before he delivered
his important remarks he ordered one of his servants to fill him a
goblet of wine, which he drank off at once, and in a few moments
repeated it, still demanding another. This his faithful servant,
knowing his master's temperate habits, feared to furnish, and even
at first declined to do so, lest he should expose him thereby before
the Emperor. Still, upon a reiterated order, he brought the wine,
which was rapidly swallowed by Sir Thomas, who then made his
address to the sovereign in Latin, like one inspired, and to the
intense admiration of all the auditors, the Emperor himself
complimenting him upon his eloquence. More was a strange medley
of character. Devout in his religious convictions, he was yet as light-
hearted as a child,—at times wise as Solomon in his discourse, and
anon descending almost to buffoonery; a truly good man at heart,
and yet often espousing the worst of causes. Though a pronounced
reformer, he predicted that the Reformation would result in universal
vice. He is represented to have had a supreme contempt for money
and a true generosity of spirit. With the most solemn convictions of
the realities of death, he yet died upon the scaffold with a joke upon
his lips.
That imaginative English artist Barry, the great historical painter,
advised his pupils as follows: "Go home from the Academy, light
your lamps, and exercise yourselves in the creative part of your art,
with Homer, with Livy, and all the great characters ancient and
modern, for your companions and counsellors." Barry has left behind
him works upon art which should not be read except with care,
unbiassed judgment, and honest appreciation. His own
eccentricities, all arising from a passion for art, led his
contemporaries to criticise the man and ignore his work. He was
wildly enthusiastic in all things relating to art, but yet sometimes
exhibited the coarseness of his early associations. He was born at
Cork, from whence his father sailed as a foremast hand aboard a
coasting vessel, and designed his son for the same humble
occupation; but the lad had other and higher aspirations, until finally
he attracted the notice of people able to advise and help him.
Humbly born and self-educated as he was, he presented some of the
highest aspects of genius. By the generosity of Edmund Burke he
was sent to Rome, where he studied art for three or four years
under favorable circumstances. On his return to England he took
high rank, and was engaged by the Academy as a professor. At times
in his lectures before the students he would burst into such
vehement enthusiasm as to electrify his listeners, and they in turn
would rise to their feet and shout applauses long and deep, entirely
heedless of the great turmoil which they created. Then Barry would
exclaim: "Go it, go it, boys; they did so at Athens!"
Literature and art should be wedded together. The careful reader
and the keen observer gather up a mental harvest and store it for
use. What many conceive to be genius is often but reproduction.
Hosts of ideas have passed through the crucible of the author's mind
and have been refined by the process, coming forth individualized by
the stamp of his personality. He is none the less an originator, a
creator; originality is after all but condensed and refined
observation.
There is a great deal of nonsense written and credited by the world
at large as to the inspiration of authorship. Some of the very best
poetic turns of thought are the children of purest accident. Sir
Joshua Reynolds, calling upon Goldsmith one day, opened his door
without knocking, and found him engaged in the double occupation
of authorship and teaching a pet dog to sit upon his haunches, now
casting a glance at his writing-table, and now shaking his finger at
the dog to make him retain his upright position. The last lines upon
the paper were still wet,—as Sir Joshua[198] said when he
afterwards told the story,—and formed a part of the description of
Italy:—
"By sports like these are all their cares beguiled:
The sports of children satisfy the child."
Goldsmith, with his usual good humor, joined in the laugh caused by
his whimsical employment, and acknowledged to the great painter
that his boyish sport with the dog suggested the lines.
Goldsmith was always the wayward and erratic being whom we have
represented in these pages. His habit on retiring at night was to read
in bed until overcome by somnolence; and he was so little inclined to
sleep, that his candle was kept burning until the last moment. His
mode of extinguishing it finally, when it was out of immediate reach,
was characteristic of his indolence and carelessness: he threw his
slipper at it, which consequently was found in the morning covered
with grease beside the overturned candlestick.
If, as we have attempted to show, authors exhibit oftentimes a spirit
of vanity, it must be admitted that readers as frequently exhibit
evidence of captiousness.
Those who sit down to peruse a book without a good and
wholesome appetite for reading are very much in the same condition
as one who approaches a table loaded with food, without a sense of
hunger. In neither case can one be a proper judge of what is before
him; mental or physical pabulum requires for just appreciation a
wholesome appetite. Unjust criticism often grows out of an attempt
to force the appetite, the censor coming to his task in a wrong
humor. The author is usually severely judged; he is solus, his critics
are many: if he satisfies one class of readers he is sure to dissatisfy
another. Swift's definition of criticism, in his "Tale of a Tub," is
pertinent. "A true critic," he says, "in the perusal of a book, is like a
dog at a feast, whose thoughts and stomach are wholly set upon
what the guests fling away, and consequently is apt to snarl most
when there are the fewest bones."
Edgar A. Poe's sarcasm upon the "North American Review," in the
matter of criticism, will long be remembered. It was generally
considered at the time not only a keen but a just retort. Our erratic
genius writes: "I cannot say that I ever fairly comprehended the
force of the term 'insult,' until I was given to understand, one day,
by a member of the 'North American Review' clique, that this journal
was not only willing but anxious to render me that justice which had
been already accorded me by the 'Revue Française,' and the 'Revue
des Deux Mondes,' but was restrained from doing so by my
'invincible spirit of antagonism.' I wish the 'North American Review'
to express no opinion of me whatever,—for I have none of it. In the
mean time, as I see no motto on its titlepage, let me recommend it
one from 'Sterne's Letter from France.' Here it is: 'As we rode along
the valley, we saw a herd of asses on the top of one of the
mountains: how they viewed and reviewed us!'" No one can deny
that Poe possessed remarkable genius; but his best friends could not
approve either his temper or his habits.
Balzac complained of lack of appreciation; though, as has just been
shown, he captivated one of his readers to such a degree as to bring
him a wife and a fortune. "A period," he says, "shall have cost us the
labor of a day; we shall have distilled into an essay the essence of
our mind; it may be a finished piece of art, and they think they are
indulgent when they pronounce it to contain some pretty things, and
that the style is not bad!" Montaigne said that he found his readers
too learned or too ignorant, and that he could please only a middle
class who possessed just knowledge enough to understand him. To
read well and to a consistent purpose is as much of an art as to
write well. It was said of Dr. Johnson by Mrs. Knowles that "he
knows how to read better than any other one; he gets at the
substance of a book directly; he tears out the heart of it."
A literary friend of the writer has long adopted an effective aid to
memory in connection with reading. After perusing a book he writes
down the date, the place, and under what circumstances it was
read, and in a few concise lines gives the impression it has left upon
his mind. This he does not design as a criticism; it is intended for
himself only. At a future day he can take up the volume, since
perusing which he may have read a hundred in a similar manner,
and by turning to his brief comment at the close, the power of
association enables him to recall the subject of the volume and
virtually to remember the contents. He assures us that the
circumstances under which he became familiar with the book, if
fairly remembered, recall even its detail. For our own part, we have
trusted solely to a retentive memory, and the choice of such lines of
reading as inclination has suggested. The books which we consult
lovingly will long remain with us, requiring very little effort to
impress their contents upon the brain.
How suggestive is this theme of books and the reading of them!
Whipple eulogizes them thus appropriately: "Books,—light-houses
erected in the great sea of time; books,—the precious depositories
of the thoughts and creations of genius; books,—by whose sorcery
time past becomes time present, and the whole pageantry of the
world's history moves in solemn procession before our eyes. These
were to visit the fireside of the humble, and lavish the treasures of
the intellect upon the poor. Could we have Plato and Shakespeare
and Milton in our dwellings, in the full vigor of their imaginations, in
the full freshness of their hearts, few scholars would be affluent
enough to afford them physical support; but the living images of
their minds are within the reach of all. From their pages their mighty
souls look out upon us in all their grandeur and beauty, undimmed
by the faults and follies of earthly existence, consecrated by time."
Poets have been more addicted to building castles upon paper than
residences upon the more substantial earth. Though the old axiom
of "genius and a garret" has passed away, both as a saying and in
the experiences of real life, still it had its pertinency in the early days
of literature and art. Ariosto, who was addicted to castle-building
with the pen, was asked why he was so modestly lodged when he
prepared a permanent home for himself. He replied that palaces are
easier built with words than with stones. But the poet, nevertheless,
had a snug and pretty abode at Ferrara, Italy, a few leagues from
Bologna, which is still extant. Leigh Hunt says: "Poets love nests
from which they can take their flights, not worlds of wood and stone
to strut in." The younger Pliny was more of a substantial architect,
whose villa, devoted to literary leisure, was magnificent, surrounded
by gardens and parks. Tycho Brahe, the great Danish astronomer,
built a grand castle and observatory combined on an island of the
Baltic, opposite Copenhagen, which he named the "Castle of the
Heavens."
Many of our readers have doubtless visited the house which
Shakespeare built for himself in his native town on Red-Lion Street.
In passing through its plain apartments one receives with infinite
faith the stereotyped revelations of the local cicerone. Buffon was
content to locate himself for his literary work and study in an old
half-deserted tower, and Gibbon, as we have seen, to write his great
work in the summer-house of a Lausanne garden. Chaucer lived and
wrote in a grand palace, because he was connected with royalty; but
he never dilated upon such surroundings,—his fancy ran to outdoor
nature, to the flowers and the trees. Milton[199] sought an humble
"garden house" to live in; that is, a small house in the environs of
the city, with a pleasant little garden attached. Addison wrote his
"Campaign" "up two pair of back stairs in the Hay-market." Johnson
tells us that much of his literary work was produced from a garret in
Exeter Street. Paul Jovius,[200] the Italian author, who wrote three
hundred concise eulogies of statesmen, warriors, and literary men of
the fourteenth century, built himself an elegant château on the Lake
of Como, beside the ruins of the villa of Pliny, and declared that
when he sat down to write he was inspired by the associations of
the place. In his garden he raised a marble statue to Nature, and his
halls contained others of Apollo and the Muses.
The traveller visits with eager interest Rubens' house in his native
city of Antwerp, a veritable museum within, but plain and
unpretentious without. Rubens is to the Belgian capital what
Thorwaldsen is to Copenhagen. Spenser lived in an Irish castle
(Kilcolman Castle), which was burned over his head by a mob; and,
sad to say, his child was burned with it. In his verses Spenser was
always depicting "lowly cots," and it was on that plane that his taste
rested. Moore's vine-clad cottage at Sloperton is familiar to all. In
the environs of Florence we still see the cottage home where Landor
lived and wrote, and in the city itself the house of Michael Angelo,—
plain and unadorned externally, but with a few of the great artist's
household gods duly preserved in the several apartments. The
historic home of the poet Longfellow, in Cambridge, has become a
Mecca to lovers of poetry and genius; while Tennyson's embowered
cottage at the Isle of Wight is equally attractive to travellers from
afar.
Pope[201] had a modest nest at Twickenham, and Wordsworth at
Rydal Mount, the beauties of both being more dependent upon the
surrounding scenery than upon any architectural attraction. Pope
declared all gardens to be landscape-paintings, and he loved them.
Scott made himself a palatial home at Abbotsford, which was quite
an exception to that of his brother poets. Dr. Holmes's unpretentious
town house in the Trimountain city overlooks the broad Charles, and
affords him a glorious view of the setting sun. Emerson's Concord
home was and is the picture of rural simplicity. Hawthorne's
biographer makes us familiar with his red cottage at Lenox. Bryant
made himself an embowered summer cottage at Roslyn, New York
State. Lowell has a fine but plain residence overlooking the beautiful
grounds of Mount Auburn. Nothing could be more simple and lovely
than Whittier's Danvers home. None of these poets have built castles
of stone, whatever they may have done under poetical license.
"I never had any other desire so strong, and so like to
covetousness," says the poet Cowley, "as that I might be master at
least of a small house and a large garden, with very moderate
conveniences joined to them, and there dedicate the remainder of
my life only to the culture of them and study of Nature, and then,
with no desire beyond my wall,—
'——Whole and entire to lie,
In no unactive ease, and no unglorious poverty.'"
Cowley at last got what he so ardently desired, but it was not until
he was too old and broken in health to find that active enjoyment
which he had so fondly anticipated. He died in the forty-ninth year of
his age.
We spoke of the contrast which was manifest between the private
and public life of Molière. These paradoxes are strange, but by no
means uncommon in the character of men of genius. It will be
remembered that Grimaldi, the cleverest and most mirth-provoking
clown of his day in England, was often under medical treatment on
account of his serious attacks of melancholy. It seems almost
incredible that men of such profound judgment in most matters, as
were Dr. Johnson and Addison, should have been so inexcusably
weak as to entertain a belief in ghosts,—an eccentricity which
neither of them denied. Byron,[202] who as a rule was noted for his
shrewd common-sense, was so superstitious that he would not help
a person at table to salt, nor permit himself to be served with it by
another's hand. There were other equally absurd "omens" which he
strenuously regarded. Cowper, who was a devoutly religious man,
deliberately attempted to hang himself,—an act entirely at variance
with his serious convictions. So also Hugh Miller, one of the most
wholesome writers upon the true principles of life, wrested his own
life from his Maker's hands.
Pope, who was such a bravado with his pen, boldly denouncing an
army of scholars and wits in his "Dunciad," was personally an arrant
coward, who could not summon sufficient self-possession to make a
statement before a dozen of his personal friends. The paradox which
existed between Goldsmith's pen and tongue passed into an axiom:
with the one he was all eloquence and grace; with the other, as
foolish as a parrot. Douglas Jerrold, whose forte was as clearly that
of wit and humor as it is the sun's province to shine, was ever
wishing to write a profound essay on natural philosophy. Newton,
highest authority in algebra, could not make the proper change for a
guinea without assistance, and while he was master of the Mint was
hourly put to shame by the superior practical arithmetic of the
humblest clerks under him. Another peculiarity of Newton was that
he fancied himself a poet; but who ever saw a verse of his
composition? Judged by all accepted rules, Charles Lamb
experienced ills sufficient to have driven him to commit suicide;
whereas the truth shows that with "his sly, shy, elusive, ethereal
humor" he was ordinarily the most genial and contented of beings.
Curious beyond expression are the many-sided phases of genius,
and indeed of all humanity. Let us therefore have a care how we
judge our fellow-men, since what they truly are within themselves
we cannot know, and may only infer by what they seem to be
relatively to ourselves. Undoubtedly the germs of virtue and of vice
are born within the soul of every human being; their development is
contingent upon how slight a cause! Nor in our readiness to censure
should we forget in whose image we are all created,—"a little lower
than the angels, a little higher than the brutes." It is the nature of
man, like the harp, to give forth beautiful or discordant sounds
according to the delicacy and skill with which it is touched. We find
what we come to find,—what, indeed, we bring with us. Richard
Baxter, the prolific author upon theology, at the close of a long life
said: "I now see more good and more evil in all men than heretofore
I did. I see that good men are not so good as I once thought they
were; and I find that few are so bad as either malicious enemies or
censorious professors do imagine."
INDEX.
Adams, John, 28.
Addison, Joseph, 38, 42, 78, 86, 116 and note, 118, 202, 277,
283, 296, 299.
Æschylus, 77.
Æsop, 4.
Agassiz, Louis, 103 and note.
Akenside, Mark, 7.
Alexander the Great, 27.
Alfieri, Vittorio, 136, 266.
Allston, Washington, 45, 97 and note.
Ames, Fisher, 26, 45.
Amyot, Jacques, 6.
Andersen, Hans Christian, 22 and note, 63, 84, 205.
André, Major John, 43.
Angelo, Michael, 14, 242, 283.
Arago, Dominique François, 184.
Arc, Joan of, 29, 188.
Ariosto, Lodovico, 295.
Aristippus, 118.
Aristo, 115.
Aristophanes, 2, 3.
Arkwright, Sir Richard, 18.
Arnauld, Antoine, 33.
Astor, John Jacob, 26 and note.
Astor, William B., 26 note.
Auber, Daniel François Esprit, 82.
Audubon, John James, 222, 223 and note.
Bacon, Francis, 32, 57 and note, 77, 124.
Bailey, Philip James, 227.
Ball, Thomas, 21 and note.
Balzac, de (Honoré), 46, 207, 284, 293.
Bancroft, George, 35, 203, 227.
Bandoccin, 6.
Barbauld, Anna Lætitia, 269.
Barrow, Isaac, 116.
Barry, James, 7, 32 note, 289.
Baxter, Richard, 301.
Beaconsfield, Lord (Disraeli), 13 note, 87 note, 117 note, 135,
205, 227 and note.
Beaufort, Cardinal Henry, 266.
Beaumarchais, de (Pierre Auguste Caron), 21.
Beckford, William, 68.
Beecher, H. W., 38.
Beethoven, van, Ludwig, 127 and note, 221.
Bellini, Vincenzo, 29.
Bentham, Jeremy, 137 and note.
Bentivoglio, Ercole, 149.
Bentley, Richard, 40.
Béranger, de (Pierre Jean), 8, 139 and note, 194, 209.
Betterton, Thomas, 260.
Beveridge, Bishop, 57.
Bewick, Thomas, 24.
Bide, 266.
Biglow, Hosea, 20 note.
Blackstone, Sir William, 77.
Blessington, Lady Margaret, 67 note.
Bloomfield, Robert, 23.
Boccaccio, Giovanni, 9.
Boëthius, 131 note.
Boffin, ——, 24.
Boleyn, Anne, 268.
Bolingbroke, Lord (Henry Saint John), 280.
Bousard, ——, 135.
Bowditch, Nathaniel, 16.
Boyle, Robert, 281.
Boyle, Samuel, 164.
Bracegirdle, 262.
Bright, John, 15, 35.
Brindley, James, 19.
Britton, John, 21.
Bronté, Anne, 192.
Bronté, Charlotte, 56, 62, 192.
Bronté, Emily, 192.
Bronté, Rev. Patrick, 192.
Brooks, Shirley, 227.
Brougham, Lord, 32 note, 206.
Browning, Mrs., 163 note.
Bruyère, de la (Jean), 270, 286.
Bryant, William C., 29, 227, 298.
Brydges, Sir Samuel Egerton, 201.
Buffon, Georges Louis Leclerc, Comte, 48, 61, 83, 89, 205, 215,
227, 296.
Bulwer Lytton, 31, 37, 46, 63, 106, 108, 227, 228.
Bunyan, John, 15 and note, 131, 268.
Burgundy, Duke of, 119.
Burke, Edmund, 32 and note, 33, 38, 40, 55, 77, 78, 86, 225,
227.
Burns, Robert, 77, 79 and note, 106, 108, 117, 122, 185, 186,
208, 220.
Burritt, Elihu, 16, 112.
Burton, Robert, 120, 162 and note.
Butler, Samuel, 153 and note.
Buxton, Sir Thomas Fowell, 19.
Byron, George Gordon Noel, 37, 44, 50, 62, and note, 63, 90,
106, 116, 117, 142, 176, 177 and note, 200, 227, 266, 273, 299
and note.
Byron, Thomas, 115.
Cæsar, Julius, 60, 206.
Cæsar, Octavius, 28 note.
Calhoun, John C., 22, 28.
Calvart, Denis, 251.
Camoens, Luis, 129 and note.
Campbell, Thomas, 152, 287 note.
Cano, Alonzo, 265.
Canova, Antonio, 6, 208, 255, 256.
Carlyle, Thomas, 36, 41, 58, 63, 79, 89, 108, 128, 130, 138,
148, 149, 151, 165, 204, 218, 223, 229.
Carneades, 73.
Cato, 33, 151.
Cellini, Benvenuto, 153 and note.
Cervantes, Miguel, 12, 13 and note, 129, 131 note, 132 and
note, 206.
Channing, Dr. William E., 47, 222 and note.
Chantrey, Sir Francis, 21.
Chapin, E. H., 38.
Charlemagne, 28.
Charles, Duke of Orleans, 132.
Charles I. of England, 267.
Charles II. of England, 267.
Charles XII. of Sweden, 27 and note.
Châteaubriand, François Auguste, 124 and note.
Chatham, Earl of, 34.
Chatterton, Thomas, 31, 129, 166.
Chaucer, Geoffrey, 10, 31, 34, 131 note, 265, 273, 296.
Choate, Rufus, 45, 114.
Churchill, Charles, 87 and note, 284.
Cibber, Colley, 217.
Cicero, 21, 206, 209.
Cimarosa, Domenico, 62.
Clare, John, 137.
Clark, Samuel, 100.
Cleanthes the Stoic, 5.
Clive, Robert, Lord, 28.
Clyde, Lord, 15.
Cobbett, William, 12, 32 note, 133.
Cobden, Richard, 15.
Coleridge, S. T., 2 note, 18, 38, 39, 52, 53 note, 62, 77, 104,
105 and note, 115, 123, 139, 152 note, 208, 239, 270, 279 and
note.
Colletet, Guillaume, 135.
Collier, John Payne, 125.
Collins, William, 171 and note.
Colorden, 267.
Colton (Lacon), 91, 182, 183.
Columbus, Christopher, 10, 11 and note.
Combe, George, 166.
Congreve, William, 29, 124, 125 and note, 138, 201.
Condé, de (Louis II. de Bourbon), Prince, 28.
Cook, James, Capt., 19.
Cormontaigne, Louis de, 76.
Corneille, Peter, 43, 44, 128, 227, 241.
Correggio, Antonio Allegri da, 254.
Correra, ——, 17.
Cortes, Hernando, 28.
Cowley, Abraham, 31, 37, 239, 298.
Cowper, William, 137 and note, 161, 162, 221, 299.
Crabbe, George, 92, 129, 153.
Crassus, Roman triumvir, 5 note.
Cratinus, 77.
Crébillon, Prosper Jolyot, 84, 267.
Cromwell, Oliver, 13, 122.
Cruden, Alexander, 137.
Cunningham, Allan, 22.
Curran, John Philpot, 40, 57, 238, 267.
Cushing, Caleb, 45.
D'Alembert, Jean le Rond, 7.
Dalrymple, Sir David (Lord Hailes), 75.
Dante, Allighieri, 40, 51, 128, 148 and note, 205.
D'Arblay, Madame (Frances Burney), 269.
Darwin, Dr. Erasmus, 99.
Davenant, Sir William, 131 note.
Da Vinci, Leonardo, 121 and note.
Davy, Sir Humphry, 7, 106.
Decker, Thomas, 140.
DeFoe, Daniel, 11, 132, 153.
Demosthenes, 204.
De Quincey, Thomas, 77, 129, 136, 137 and note, 199, 211.
De Tocqueville, Alexis Charles Henry Clerel, 52, 207.
Dibdin, Charles, 53.
Dick, Robert, 24.
Dickens, Charles, 31, 46, 62, 77, 91, 109, 110, 114, 197, 204
and note, 242.
Diogenes, 211.
Dodsley, Robert, 23.
Domenichino, Zampieri, 96.
Drew, Samuel, 23.
Dryden, John, 10, 40 and note, 73, 74 and note, 106, 115, 214,
273, 276, 283.
Ducis, Jean François, 209.
Dumas, Alexandre, 13, 84 and note, 109, 194, 233.
Durer, Albert, 205.
Edgeworth, Maria, 43 and note.
Edwards, President Jonathan, 268.
Edwards, Thomas, 23.
Elizabeth, Queen, 266.
Elliott, Ebenezer, 17 and note.
Emerson, Ralph Waldo, 4, 23, 27, 38, 63 note, 69 note, 200,
204, 283, 298.
Ennius, 77.
Epictetus, 5, 110.
Erasmus, Désiré, 150.
Ereilla, Alonzo de, 133.
Eupolis, 77.
Euripides, 126.
Evarts, William, 98 and note.
Fénelon, François de Salignac de la Mothe, 94.
Fielding, Henry, 45 note, 155 and note, 156, 210.
Fields, James T., 109, 182.
Fletcher, Andrew, of Saltoun, 8 note.
Fontenelle, Bernard le Bovier, 34.
Foote, Samuel, 261.
Fordyce, Dr. George, 115.
Forrest, Edwin, 189.
Foster, John, 48, 58.
Fox, Charles James, 40.
Franklin, Dr. Benjamin, 16 and note, 34, 124, 241.
Frederick V. of Denmark, 267.
Fuller, Margaret, 41, 42 and note, 45, 204.
Fuller, Thomas, 40 and note, 123.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
textbookfull.com

More Related Content

PDF
Download full Managing Kubernetes operating Kubernetes clusters in the real w...
PDF
Kubernetes Up Running Dive Into The Future Of Infrastructure Third Edition 3r...
PDF
Kubernetes Up And Running Dive Into The Future Of Infrastructure 2nd Brendan ...
PDF
Kubernetes up running
PDF
Kubernetes in Action First Edition Marko Luksa
PDF
What is kubernet
PDF
Kubernetes in Action First Edition Marko Luksa
PDF
A Deeper Look Into How Kubernetes Works.pdf
Download full Managing Kubernetes operating Kubernetes clusters in the real w...
Kubernetes Up Running Dive Into The Future Of Infrastructure Third Edition 3r...
Kubernetes Up And Running Dive Into The Future Of Infrastructure 2nd Brendan ...
Kubernetes up running
Kubernetes in Action First Edition Marko Luksa
What is kubernet
Kubernetes in Action First Edition Marko Luksa
A Deeper Look Into How Kubernetes Works.pdf

Similar to Managing Kubernetes operating Kubernetes clusters in the real world First Edition Burns (20)

PDF
Kubernetes in Action First Edition Marko Luksa
PDF
Production Kubernetes: Building Successful Application Platforms 1st Edition ...
PPTX
TRAINING_ABOUT_KUBERNETES_Nguyen_Si_Nhan.pptx
PDF
Immediate download Kubernetes Best Practices 1st Edition Brendan Burns ebooks...
PDF
Kubernetes Best Practices 1st Edition Brendan Burns Eddie Villalba
PDF
Running and Managing Kubernetes on OpenStack
PDF
Production Kubernetes: Building Successful Application Platforms 1st Edition ...
PDF
Free GitOps Workshop + Intro to Kubernetes & GitOps
PPTX
Simplify Your Way To Expert Kubernetes Management
PPTX
Aks: k8s e azure
PPTX
Introduction to kubernetes
PPTX
Kubernetes-introduction to kubernetes for beginers.pptx
PDF
LISA2017 Kubernetes: Hit the Ground Running
PPTX
Introduction+to+Kubernetes-Details-D.pptx
PDF
DevOps in AWS with Kubernetes
PDF
Introduction to kubernetes
PPTX
KubernetesPPT.pptx
PDF
AKS: k8s e azure
PPTX
01. Kubernetes-PPT.pptx
PPTX
Introduction to Kubernetes
Kubernetes in Action First Edition Marko Luksa
Production Kubernetes: Building Successful Application Platforms 1st Edition ...
TRAINING_ABOUT_KUBERNETES_Nguyen_Si_Nhan.pptx
Immediate download Kubernetes Best Practices 1st Edition Brendan Burns ebooks...
Kubernetes Best Practices 1st Edition Brendan Burns Eddie Villalba
Running and Managing Kubernetes on OpenStack
Production Kubernetes: Building Successful Application Platforms 1st Edition ...
Free GitOps Workshop + Intro to Kubernetes & GitOps
Simplify Your Way To Expert Kubernetes Management
Aks: k8s e azure
Introduction to kubernetes
Kubernetes-introduction to kubernetes for beginers.pptx
LISA2017 Kubernetes: Hit the Ground Running
Introduction+to+Kubernetes-Details-D.pptx
DevOps in AWS with Kubernetes
Introduction to kubernetes
KubernetesPPT.pptx
AKS: k8s e azure
01. Kubernetes-PPT.pptx
Introduction to Kubernetes
Ad

Recently uploaded (20)

PDF
RMMM.pdf make it easy to upload and study
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PDF
Business Ethics Teaching Materials for college
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
Institutional Correction lecture only . . .
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
Pharma ospi slides which help in ospi learning
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
RMMM.pdf make it easy to upload and study
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Renaissance Architecture: A Journey from Faith to Humanism
Week 4 Term 3 Study Techniques revisited.pptx
Business Ethics Teaching Materials for college
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
O7-L3 Supply Chain Operations - ICLT Program
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Institutional Correction lecture only . . .
VCE English Exam - Section C Student Revision Booklet
Abdominal Access Techniques with Prof. Dr. R K Mishra
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Pharma ospi slides which help in ospi learning
2.FourierTransform-ShortQuestionswithAnswers.pdf
Microbial diseases, their pathogenesis and prophylaxis
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Ad

Managing Kubernetes operating Kubernetes clusters in the real world First Edition Burns

  • 1. Managing Kubernetes operating Kubernetes clusters in the real world First Edition Burns download https://textbookfull.com/product/managing-kubernetes-operating- kubernetes-clusters-in-the-real-world-first-edition-burns/ Download more ebook from https://textbookfull.com
  • 2. We believe these products will be a great fit for you. Click the link to download now, or visit textbookfull.com to discover even more! LFS258 Kubernetes Fundamentals The Linux Foundation https://textbookfull.com/product/lfs258-kubernetes-fundamentals- the-linux-foundation/ The Kubernetes Book: 2024 Edition Nigel Poulton https://textbookfull.com/product/the-kubernetes- book-2024-edition-nigel-poulton/ Kubernetes in Action, Second Edition (MEAP V05) Marko Luksa https://textbookfull.com/product/kubernetes-in-action-second- edition-meap-v05-marko-luksa/ Getting Started with Kubernetes 2nd Edition Baier https://textbookfull.com/product/getting-started-with- kubernetes-2nd-edition-baier/
  • 3. Kubernetes for Developers 1st Edition William Denniss https://textbookfull.com/product/kubernetes-for-developers-1st- edition-william-denniss/ Learn Kubernetes in a Month of Lunches 1st Edition Elton Stoneman https://textbookfull.com/product/learn-kubernetes-in-a-month-of- lunches-1st-edition-elton-stoneman/ Learn Kubernetes in a Month of Lunches 1st Edition Elton Stoneman https://textbookfull.com/product/learn-kubernetes-in-a-month-of- lunches-1st-edition-elton-stoneman-2/ The DevOps 2.6 Toolkit: Jenkins X: Cloud-Native Kubernetes-First Continuous Delivery 1st Edition Viktor Farcic https://textbookfull.com/product/the-devops-2-6-toolkit-jenkins- x-cloud-native-kubernetes-first-continuous-delivery-1st-edition- viktor-farcic/ Cloud Native DevOps with Kubernetes 1st Edition John Arundel https://textbookfull.com/product/cloud-native-devops-with- kubernetes-1st-edition-john-arundel/
  • 4. 1
  • 5. 4. Extending the system with new and custom functionality 5. Summary 2. 2. An overview of Kubernetes 1. Containers 2. Container Orchestration 3. The Kubernetes API 1. Basic objects: Pods, Replica Sets and Services 2. Organizing your cluster with namespaces, labels and annotations 3. Advanced concepts: StatefulSets, Ingress and Deployments 4. Batch workloads: Job and ScheduledJob 5. Cluster agents and utlities: DaemonSets 4. Summary 3. 3. Kubernetes Architecture 1. Concepts 1. Declarative Configuration 2. Reconciliation or controllers 3. Implicit or Dynamic Grouping 2. Structure 1. Unix philosophy of many components 2. API driven interactions 3. Components 1. Worker and Head nodes and scheduled components. 2. Head node components 3. Components on all nodes 4. Scheduled Components 4. Summary 4. 4. The Kubernetes API Server 1. Basic characteristics for manageability 2. Pieces of the API server 1. API Management 2. API Paths 3. API Discovery 4. OpenAPI Spec Serving 5. API Translation 3. Request management 1. Types of requests 2. Life of a request 4. API Server Internals 1. CRD Control Loop 5. Debugging the API Server 1. Basic Logs 2. Audit Logs 3. Activating additional logs 4. Debugging kubectl requests 6. Summary 5. 5. Scheduler 1. An overview of scheduling 2. The process of scheduling 1. 1. Introduction 1. How the cluster operates 2. Adjust, secure and tune the cluster 3. Responding when things go wrong 2
  • 6. 1. Predicates 2. Priorities 3. High level algorithm 4. Conflicts 3. Controlling scheduling with labels, affinity, taints and tolerations 1. Node Selectors 2. Node Affinity 3. Taints and tolerations 4. Summary 6. 6. Installing Kubernetes 1. kubeadm 1. Requirements 2. kubelet 2. Installing the Control Plane 1. kubeadm Configuration 2. Preflight Checks 3. Certificates 4. etcd 5. kubeconfig 6. Taints 3. Installing Worker Nodes 4. Add-ons 5. Phases 6. High Availability 7. Upgrades 8. Summary 7. 7. Authentication and User Management 1. users 2. Authentication 3. kubeconfig 4. Service Accounts 5. Summary 8. 8. Authorization 1. REST 2. Authorization 3. Role-Based Access Control 1. Role and ClusterRole 2. RoleBinding and ClusterRoleBinding 3. Testing Authorization 4. Summary 9. 9. Admission Control 1. Configuration 2. Common Controllers 1. Pod Security Policies 2. ResourceQuota 3. LimitRanger 3. Dynamic Admission Controllers 1. Validating Admission Controllers 3
  • 7. 2. Mutating Admission Controllers 4. Summary 10. 10. Networking 1. Container Network Interface 1. Choosing a Plugin 2. kube-proxy 3. Service Discovery 1. DNS 2. Environment Variables 4. Network Policy 5. Service Mesh 6. Summary 11. 11. Monitoring Kubernetes 1. Goals for Monitoring 2. Differences between logging and monitoring 3. Building a monitoring stack 1. Getting data from your cluster and applications 2. Aggregating metrics and logs from multiple sources 3. Storing data for retreival and querying 4. Visualizing and interacting with your data 4. What to monitor? 1. Monitoring Machines 2. Monitoring Kubernetes 3. Monitoring applications 4. Black-box monitoring 5. Streaming Logs 6. Alerting 7. Summary 12. 12. Disaster Recovery 1. High Availability 2. State 3. Application Data 1. Persistent Volumes 2. Local Data 4. Worker Nodes 5. etcd 6. Ark 7. Summary 13. 13. Extending Kubernetes 1. Kubernetes Extension Points 2. Cluster Daemons 1. Use cases for cluster daemons 2. Installing a cluster daemon 3. Operational considerations for cluster daemons 4. Hands-on: Creating a cluster daemon 3. Cluster Assistants 1. Use cases for cluster assistants 2. Installing a cluster assistant 4
  • 8. 3. Operational considerations for cluster assistants 4. Hands-on Example of cluster assistants 4. Extending the lifecycle of the API Server 1. Use cases for extending the API lifecycle 2. Installation of API lifecycle extensions 3. Operational Considerations for lifecycle extensions 4. Hands-on Example of lifecycle extensions 5. Adding custom APIs to Kubernetes 1. Use cases for adding new APIs 2. Custom resource definitions & Aggregated API Servers 3. Architecture for custom resource definitions 4. Installation of Custom resource definitions 5. Operational Considerations for custom resources 6. Summary 14. 14. Conclusions 15. Index 5
  • 9. Managing Kubernetes Operating Kubernetes Clusters in the Real World Brendan Burns and Craig Tracey 6
  • 10. Managing Kubernetes by Brendan Burns and Craig Tracey Copyright © FILL IN YEAR Brendan Burns and Craig Tracey. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc. , 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles ( http://oreilly.com/safari ). For more information, contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com . Editor: Virginia Wilson Production Editor: Justin Billing Copyeditor: FILL IN COPYEDITOR Proofreader: FILL IN PROOFREADER Indexer: FILL IN INDEXER Interior Designer: David Futato Cover Designer: Karen Montgomery Illustrator: Rebecca Demarest October 2018: First Edition 7
  • 11. Revision History for the First Edition YYYY-MM-DD: First Release See http://oreilly.com/catalog/errata.csp?isbn=9781492033912 for release details. The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Managing Kubernetes, the cover image, and related trade dress are trademarks of O’Reilly Media, Inc. The views expressed in this work are those of the author(s), and do not represent the publisher’s views. While the publisher and the author(s) have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the author(s) disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights. 978-1-492-03391-2 [FILL IN] 8
  • 12. Chapter 1. Introduction Kubernetes is an open source orchestrator for deploying containerized applications. Kubernetes was open sourced by Google, inspired by a decade of experience deploying scalable, reliable systems in containers via application-oriented APIs.1 and developed over the last four years by a vibrant community of open source contributors. It is used by a large and growing number of developers to deploy reliable distributed systems, as well as run machine learning, big data and other batch workloads. A Kubernetes cluster provides an orchestration API that enables applications to be defined and deployed using a simple declarative syntax. Further, the Kubernetes cluster itself provides numerous online, self-healing control algorithms that repair applications in the presence of failures. Finally the Kubernetes API exposes concepts like Deployments that make it easier to perform zero-downtime updates of your software and Service load balancers that make it easy to spread traffic across a number of replicas of your service. Additionally Kubernetes provides tools for naming and discovery of services so that you can build loosely coupled microservice architectures. Kubernetes is widely used across public and private clouds as well as physical infrastructure. This book is dedicated to the topic of managing a Kuberentes cluster. Whether you are managing your own cluster on your own hardware, part of a team managing a cluster for a larger organization or a Kubernetes user who wants to go beyond the APIs and learn more about the internals of the system, you will find that deepening your knowledge of how to manage Kubernetes makes you more capable at accomplishing all of the things you need Kubernetes to do for you. Note When we speak about a “cluster” we’re talking about a collection of machines that work together to provide the aggregate computing power that Kubernetes makes available to its end-users. A Kubernetes “cluster” is a collection of machines that are all controlled by a single API and can be used by consumers of that API. When we talk about managing Kubernetes there are a variety of topics that make up the necessary skills for managing a cluster: How the cluster operates How to adjust, secure and tune the cluster How to understand your cluster and respond when things go wrong How to extend your cluster with new and custom functionality 9
  • 13. How the cluster operates Ultimately, if you are going to manage a system you need to understand how that system operates. What are the pieces that it is made up of and how do they fit together. Without at least a rough understanding of the components and how they inter-operate you are unlikely to be successful at managing any system. Managing a piece of software, especially one as complex as Kubernetes, without this understanding is like attempting to repair a car with out knowing how the tail-pipe relates to the engine. Its a bad idea. However, in addition to understanding how all the pieces fit together, it’s also essential to understand how the user consumes the Kubernetes cluster. Only by understanding how a tool like Kubernetes is intended to be used, can you truly understand the needs and demands required for successful management of that tool. To revisit our analogy of the car, without understanding the way in which a driver sits in the vehicle and guides it down the road, you are unlikely to be able to successfully manage the vehicle. The same is true of a Kubernetes cluster. Finally, it is critical that you understand the role that the Kubernetes cluster plays in a users daily existence. What is the cluster accomplishing for the end user? What applications are they deploying on it? What complexity and hardship is the cluster removing? What complexity is the Kubernetes API adding? To complete the usage of our car analogy, in order to understand the importance of a car to it’s end-user, it is critical to know that it is the thing that ensures a person shows up to work on time. Likewise with Kubernetes, if you don’t understand that the cluster is the place where a user’s mission critical application will be running, and the Kubernetes API is the thing that a developer will be relying on to fix a problem when something goes wrong at three am, then you don’t really understand what is needed to successfully manage that cluster. 10
  • 14. Adjust, secure and tune the cluster In addition to understanding how the pieces of the cluster fit together, and how the Kubernetes API is used by developers to build and deploy their application, it is also critical to understand the various APIs and configuration options to adjust, secure and tune your cluster. A Kubernetes cluster, or really any significant piece of software, is not something that you simply turn up, start running and walk away. The cluster and its usage have a lifecycle. Developers join and leave teams. New teams are formed and old ones die. The cluster scales with the growth of the business. New Kubernetes releases come out to fix bugs, add new features and improve stability. Increased demand on the cluster exposes performance problems that had previously been ignored. Responding to all of these changes in the lifespan of your cluster requires understanding the ways in which Kubernetes can be configured via command line flags, deployment options and API configuration. Additionally, your cluster is not just a target for application deployment, it can also be a vector for attacking the security of your applications. Configuring your cluster to be secure against many different attacks from application compromises to denial of service is a critical component of sucessfully managing a cluster. Much of the time this hardening is in fact simply to prevent mistakes. In many cases, the value of hardening and security is it prevents one team or user from accidentally “attacking” another team’s service. However, additionally active attacks do sometimes happen, and the configuration of the cluster is critical to both detecting attacks when they occur as well as preventing them from occuring in the first place. Finally, depending on the usage of the cluster, you may need to demonstrate a compliance to various standards for security that are required for developers of applications in a variety of different industries such as health-care, finance or government. Understanding how to build a compliant cluster means that Kubernetes can be put to work in such environments. 11
  • 15. Responding when things go wrong It would be a great world to live in, if things never went wrong. Sadly of course, that is not the world that we live in (at least not any computer system I’ve ever been a part of managing). What’s critical when things go wrong is that you learn of it quickly. That you learn of it through automation and alerts rather than through a user informing you your system is down and that you are capable of responding and restoring the system as quickly as possible. The first step in detecting when things break and understanding why they are broken is in having the right metrics in place. Fortunately, there are two technologies present in the Kubernetes cluster that makes this job easier. The first is that Kubernetes itself is generally deployed inside of containers. In addition to the value in reliable packaging and deployment, the container itself forms a boundary where basic metrics such as CPU, memory, network and disk usage can be observed. These metrics can then be recorded into a monitoring system for both alerting and introspection. In addition to these container generated metrics, the Kubernetes code base itself has been instrumented with a significant number of application metrics. These metrics include things like the number of requests sent or received by various components, as well as the latency of those requests. These metrics are expressed using a format popularized by the Prometheus open source project (https://prometheus.io), and they can be easily collected and populated into Prometheus which can be used directly, or with other tools like Grafana for visualization and introspection. Combined together, the baseline metrics from the operating system containers as well as the application metrics from Kubernetes itself provide a rich set of data that can be used both to generate alerts that tell you when the system isn’t working properly, as well as the historical data necessary to debug and determine what went wrong and when. Of course understanding the problem is only the first half of the battle, the next step that is necessary is responding and recovering from the problems with the system. Fortunately Kubernetes has been built in a decoupled, modular manner with minimal state in the system. This means that (generally) at any given time it is safe to restart any component in the system that may be overloaded or misbehaving. This modularity and indempotency means that once you determine the problem developing a solution is often as straight-forward as restarting a few applications. Of course in some cases, something truly terrible happens, and in such cases, your only recourse is to restore the cluster from a disaster recovery back up somewhere. Of course that presumes that you have enabled such back-ups in the first place. In addition to all of the monitoring to show you what is happening, the alerts to tell you when something breaks and the play-books to tell you how to repair it. Successfully managing a cluster requires that you develop and exercise a disaster response and recovery procedure. Its important to remember that simply developing this plan is insufficient. You need to practice it regularly, or you will not be ready (and the plan itself may be flawed) in the presence of a real problem. 12
  • 16. Extending the system with new and custom functionality One of the most important strengths of the Kubernetes open source project has been the explosive growth of libraries, tools and platforms that build on, extend or otherwise improve the usage of a Kubernetes cluster. There are tools like Spinnaker or Jenkins for continuous deployment. There are tools like Helm that make it easy to package and deploy complete applications. There are platforms like Deis that provide git-push style developer workflows. There are numerous functions-as-a-service (FaaS) platforms that build on top of Kubernetes to enable users to consume Kubernetes via simple functions. There are tools for automating the creation and rotation of certificates. There are service mesh technologies that make it easy to link and introspect a myriade of microservices. All of these tools in the ecosystem can be used to enhance, extend and improve the Kubernetes cluster that you are managing. They can provide new functionality that make your users lives easier, and make the software that the deploy more robust and more manageable. However, all of these tools can also make your cluster more unstable, less secure, more prone to failures. They can expose your users to immature, poorly supported software that feels like an “official” part of the cluster but solely serves to make the user’s life more difficult. Part of managing a Kubernetes cluster is understanding how and when to add these tools, platforms and projects into the cluster. It requires exploration and understanding not just of what a particular project is attempting to accomplish, but the total set of similar solutions that exist in the ecosystem. Often times a user will come to you with a request for a particular tool based on some video or blog that they happened across. But in truth they are often asking for a capability like CI/CD or certificate rotation, not any specific project. The one they mention is simply the one they happened across in a web search. It is your job as a cluster manager to act as a curator of such project, an editor and an advisor who can recommend alternate solutions, or determine if a particular project is a good fit for your cluster or if there is some other way of accomplishing the same goal for the end user. Additionally, the Kubernetes API itself contains rich tools for extending and enhancing the API. A Kubernetes cluster is not limited solely to the APIs that come built into the cluster. Instead new APIs can be dynamically added and removed. In addition to the existing extensions mentioned above, sometimes the job of managing a Kubernetes cluster involves developing new code and new extensions that enhance your cluster in ways that were previously impossible. Part of managing a cluster may very well be developing new tooling, and of course, once developed, sharing that tooling with the growing Kubernetes ecosystem is a great way to give back to the community that brought you the Kubernetes software in the first place. 13
  • 17. Summary Managing a Kubernetes cluster is more than just the act of installing some software on a set of machines. Successful management requires understanding of how Kubernetes is put together and how it is put to use by the developers who are Kubernetes users. It requires that you understand how to maintain, adjust and improve the cluster over time as its usage patterns change. Additionally, you need to know how to monitor the information put off by the cluster in operation and develop the alerts and dashboards to tell you when the cluster is sick and how to make it healthy again. Finally you need to be able to know when and how to extend the Kubernetes cluster with other tools to make it even more useful to your users. We hope that within this book you will find answers and more for all of these topics, and at completion you will find yourself with the skills to be sucessful and Managing Kubernetes. 1 Brendan Burns et al., “Borg, Omega, and Kubernetes: Lessons Learned from Three Container- Management Systems over a Decade,” ACM Queue 14 (2016): 70–93, available at http://bit.ly/2vIrL4S. 14
  • 18. Chapter 2. An overview of Kubernetes Building, deploying and managing applications on top of the Kubernetes API is a complex topic in its own right. It is beyond the scope of this book to give a complete understanding of the Kubernetes API in all of its detail. For those purposes, there are a number of books, such as Kubernetes Up and Running, and online resources which will give you the knowledge necessary to build an application on Kubernetes. If you are completely new to Kubernetes and interested in building applications on top of Kubernetes, we definitely recommend taking advantage of these resources to augment the information in this chapter. On the other hand, if you are responsible for managing a Kubernetes cluster, or you have some high-level understanding of the Kubernetes API then this chapter provides an introduction to the basic concepts of Kubernetes and their role in the development of an application. If after reading this chapter you still feel uncomfortable having a conversation with your users about their use of Kubernetes we highly reccomend you avail yourself to these additional resources. This chapter proceeds as follows: first we introduce the notion of containers and how containers can be used to package and deploy your application. Then we introduce the core concepts behind the Kubernetes API and finally conclude with some higher level concepts that Kubernetes has added to make specific activities easier. 15
  • 19. Containers Containers were popularized by Docker and enabled a revolution in the way in which developers package and deploy their applications. However along the way the very word “container” has taken on many different meanings to many different people. Because Kubernetes is a “container orchestrator” to understand Kubernetes, it’s important to understand what we mean when we say “container”. In reality, a “container” is made up of two different pieces, and a group of associated features. A “container” is made up of A container image A set of operating system concepts that isolate a running process or processes. Starting with the container image, it contains the application runtime which consists of binaries, libraries and other data needed to run the container. A developer can package up their application as a container image on their development laptop and have strong assurances that when that image is deployed and run in a different setting, be it another users laptop or a server in a datacenter, the container will behave exactly as it did on the developers laptop. This portability and consistent execution in a variety of environments is one of the primary values of container images. When a container image is run, it is also executed using namespaces in the operating system. These namespaces contain the process and provide isolation for its process or processes from other things running on the machine. This isolation means for example, that each running container has its own separated file system (like a chroot), additionally each container has its own network and PID namespaces, meaning that process number 42 in one container is a different process than process number 42 in another container. There are many other namespaces within the kernel that separate various running containers from each other. Additionally CGroups (control groups) allow the isolation of resource usage like memory or CPU. Finally standard operating system security features like SELinux or AppArmour can also be used with running containers. Combined together, all of this isolation makes it more difficult for different processes running in different containers to interfere with each other. Note When we say “isolation” it is incredibly important to know that this isolation is in terms of resources like CPU, memory or files. Containers as implemented in Linux and Windows do not currently provide strong security isolation for different processes. Containers when combined with other kernel level isolation can provide reasonable security isolation for some use cases. However, in the general case, only hypervisor level security is strong enough to isolate truly hostile workloads. In order to make all of this work, a number of different tools were built to help build and deploy 16
  • 20. containerized applications. The first is the container image builder. Typically the docker command line tool is used to build a container image. However, the image format has been standardized through the open container image (OCI) standard. This has enabled the development of other image builders, available via cloud API, CI/CD or new alternative tools and libraries. The docker tool uses a Dockerfile which specifies a set of instructions for how to construct the container image. Full details of using the docker tool is beyond the scope of this book, but there are numerous resources available in books like Docker up and running or in online resources. If you have never built a container image before, put down this book right now go start reading about containers and come back when you have built a few container images. Once a container image has been built we need a way to distribute that image from a user’s laptop up to other users, the cloud or a private data center. This is where the image registry comes in. The image registry is an API for uploading and managing images. After an image has been built it is “pushed” to the image registry. Once the image is in the registry, it can be “pulled” or downloaded from that registry to any machine that has access to the registry. Every registry requires some form of authorization to push an image, but some registries are “public” meaning that once an image is pushed anyone in the world can pull and start running the image, while others are “private” and require authorization to pull an image as well. At this point there are registries as a service available from every public cloud, and there are open source registry servers which you can download and run in your own environment. Before you even begin to set up your Kubernetes cluster, its a good idea to figure out where you are going to store the images that you run in that cluster. Once a developer has packaged their application as a container image and pushed it to a registry, it’s time to use that container to deploy their application, and that’s where container orchestration comes in. 17
  • 21. Container Orchestration Once you have a container image stored in a registry somewhere, you need to run it to create a working application. This is where a container orchestrator like Kubernetes comes into the picture. Kuberentes’ job is to take a group of machines which provide resources like CPU, memory and disk and transform them into a container-oriented API that a developer can use to deploy their containers. The Kubernetes API enables a developer to declare their desired state of the world. To make a declarative request which is something like “I want this container image to run and it needs 3 cores and 10 gigabytes of memory to run correctly”. The Kubernetes system then looks throughout its fleet of machines and finds a good place for that container image to run, and schedules the execution of that container on that machine. From the developer’s perspective they see their container image running, and more often than not they don’t need to concern themselves with the specific location where their container is executing. Of course running just a single container is neither that interesting, nor that reliable, so the Kubernetes API also provides easy ways to say “I want three copies of this container image running on different machines, each with 3 cores and 10 gigabytes of memory.” But the orchestration system is about more than scheduling containers to machines. In addition to scheduling containers, the Kubernetes orchestrator knows how to heal those containers if they fail. If the process inside your container crashes, Kubernetes will restart it. If you define custom health checks Kubernetes can use them to determine if your application is deadlocked and needs to be restarted (liveness checks) or if it should be part of a load-balanced service (readiness checks). Speaking of load balancing, Kubernetes also provides API objects for defining a way to load- balance traffic between these various replicas Kubernetes provides a way to say “Please create this load balancer to represent these running containers” These load balancers are also given easy to discover names so that linking different services together within a cluster is easy. Kubernetes also has objects that perform zero down-time rollouts, manage configurations, persistent volumes, secrets and much more. The following sections detail the specific objects in the Kubernetes API that make all of this possible. 18
  • 22. The Kubernetes API The Kubernetes API is a RESTful API based on HTTP and JSON and provided by an API Server. All of the components in Kubernetes communicate through the API. There are more details of this architecture in the following chapter. As an open source project, the Kubernetes API is always evolving, but the core objects have been stable for years and the Kubernetes community provides a strong deprecation policy that ensures that developers and operators don’t have to change what they are doing with each revision of the system. Kubernetes provides an OpenAPI specification for the API as well as numerous different client libraries in a variety of different languages (https://github.com/kubernetes-client). 19
  • 23. Basic objects: Pods, Replica Sets and Services Although it has a large and growing number of objects in its API, Kubernetes began with a relatively small number of objects, and these are still the core of what Kubernetes does. Pods A Pod is the atomic unit of scheduling in a Kubernetes cluster. A Pod is made up of a collection of one or more running containers. (A “Pod” is a collection of whales, derived from Docker’s whale logo). When we say a Pod is “atomic” what we mean is that all of the containers in a Pod are guaranteed to land on the same machine in the cluster. Pods also share many resources between the containers. For example, they all share the same network namespace, which means that each container in a Pod can see the other containers in the Pod on localhost. Pods also share the process and inter-process communication namespaces so that different containers can use tools like shared memory and signalling to coordinate between the different processes in the Pod. This close grouping means that Pods are ideally suited for symbiotic relationships between their containers, such as a main serving container and a background data loading container. Keeping the container images separate generally makes it more agile for different teams to own or re-use the container images, but grouping them together in a Pod at runtime enables them to operate cooperatively. When people first encounter Pods in Kubernetes sometimes they spring to the wrong assumptions, for example a user may see a Pod and think: “Ah yes, a frontend and a database server make up a Pod” but this is the generally the wrong level of granularity. To see why, consider that the Pod is also the unit of scaling and replication, which means that if you group your frontend and your database in the same container then you will replicate your database at the same rate you replicate your frontends. This is unlikely the way that you want to do things. Pods also do things to keep your application running. If the process in a container crashes, Kubernetes automatically restarts it. Pods can also define application level health-checks that can provide a richer, application-specific way of determining if the Pod should be automatically restarted. ReplicaSets Of course, if you are deploying a container orchestrator just to run individual containers, you are probably over-complicating your life. In general one of the main reasons for container orchestration is to make it easier to build replicated, reliable systems. While individual containers may fail, or be incapable of serving the load of a system, replicating an application out to a number of different running containers dramatically reduces the probability that your service will completely fail at a particular moment in time, and horizontal scaling enables you to grow your application in response to load. In the Kubernetes API, this sort of stateless replication is handled by a ReplicaSet object. A replica set takes a Pod definition and a number of replicas and ensures 20
  • 24. that that number of replicas exist within the system. The actual replication is handled by the Kubernetes “controller manager” which creates Pod objects that are scheduled by the Kubernetes “scheduler”. These details of the architecture are described in later chapters. Note ReplicaSets are a slightly newer object. At it’s v1 release Kubernetes had an API object called a ReplicationController. Due to the deprecation policy, ReplicationControllers continue to exist in the Kubernetes API but their usage is strongly discouraged in favor of using ReplicaSets Services Once you can replicate your application out using a ReplicaSet, the next logical goal is to create a load balancer to spread traffic to these different replicas. To accomplish this, Kubernetes has a Service object. A Service represents a TCP or UDP load balanced service. Every Service that is created, whether TCP or UDP gets three things: It’s own IP address A DNS entry in the Kubernetes cluster DNS Load-balancing rules that proxy traffic to the Pods which implement the service When a Service is created it is assigned a fixed IP address. This IP address is virtual, it does not correspond to any interface present on the network, instead it is programmed into the network fabric as a load-balanced IP address when packets are sent to that IP they are load-balanced out to a set of Pods that implement the Service. The load-balancing that is performed can either be round-robin or deterministic based on (source IP, destination IP) tuples. Given this fixed IP address, a DNS name is programmed into the Kubernetes cluster’s DNS server. This DNS address provides a semantic name (e.g. “frontend”) which is the same as the name of the Kubernetes Service object and which enables other containers in the cluster to discover the IP address of the Service load balancer. Finally, the Service load balancing is programmed into the network fabric of the Kubernetes cluster so that any container that tries to talk to the Service IP address is correctly load-balanced to the corresponding pods. This programming of the network fabric is dynamic, so as Pods come and go due to failures or scaling of a ReplicaSet, the load balancer is constantly re-programmed to match the current state of the cluster. This means that clients can rely on connections to the Service IP address always resolving to a Pod that implements the Service. Storage: Persistent Volumes, ConfigMaps and Secrets A common question that comes up after an initial exploration of Kubernetes is “what about my files?”. With all of these containers coming and going within the cluster and landing on different machines, it’s difficult to understand how you should manage the files and storage you want to be associated with that running container. Fortunately Kubernetes provides several different API 21
  • 25. objects to help you manage your files. The first storage concept introduced in Kubernetes was the Volume which is actually a part of the Pod API. Within a Pod you can define a set of Volumes. Each volume can be one of a large number of different types. At present there are more than ten different types of volumes you can create, including NFS, iSCSI, git, cloud storage based volumes and more. Note Though the Volume interface was initially a point of extensibility via writing code within Kubernetes, the explosion of different volume types eventually showed how unsustainable this model is. Instead, new volume types are developed outside of the Kubernetes code and implement the container storage interface (CSI) an interface for storage that is independent of Kubernetes. When you add a Volume to your Pod, you can chose to mount it to an arbitrary location in each running container. This enables your running container to have access to the storage within the volume. Different containers can mount these volumes at different locations, or ignore the volume entirely. In addition to basic files, there are several types of Kubernetes objects that can themselves be mounted into your Pod as a Volume. The first of these is the ConfigMap object. A ConfigMap represents a collection of configuration files. In Kubernetes Configuration is separated from container images, because often you want to have different configurations for the same container image. When you add a ConfigMap based Volume to your Pod, the files in the config map show up in the specified directory in your running container. A special type of configuration is some sort of secure information like a database password or certificate. Though these are essentially the same as configuration, it is useful to treat them as a separate type, because their handling is generally more restricted. Kubernetes uses the Secret type for such data. In the context of volumes, a Secret works identically to a ConfigMap. It can be attached to a Pod via a Volume and mounted into a running container for use. Over the course of people deploying applications with Volumes, it became clear that the tight binding of Volumes to pods was actually problematic. For example, when creating a replicated container (via a ReplicaSet) the same exact volume must be used by all replicas. In many situations this is acceptable, but in some cases you want a different volume for each replica. Additionally, specifying a precise volume type (e.g. an Azure disk persistent volume) binds your Pod definition to a specific environment (in this case the Microsoft Azure cloud), but it is often desirable to have a Pod definition that requests a generic type of storage (e.g. 10 gigabytes of network storage) without specifying a provider. To accomplish this, Kubernetes introduced the notion of PersistentVolumes and PersistentVolumeClaims. Instead of binding a Volume directly into a Pod, a PersistentVolume is created as a separate object, this object is then claimed to a specific Pod by a PersistentVolumeClaim and finally mounted into the Pod via this claim. At first blush this seems overly complicated, but the abstraction of Volume and Pod enables both the portability and automatic volume creation required by the two previous use cases. 22
  • 26. Organizing your cluster with namespaces, labels and annotations The Kubernetes API makes it quite easy to create a large number of objects in the system, and such a collection of objects can easily make administering a cluster a nightmare. Fortunately, Kubernetes also has a number of objects that make it easier to manage, query and reason about the objects in your cluster. Namespaces The first object for organizing your cluster is a Namespace you can think of a namespace as something like a folder for your Kubernetes API objects. Namespaces provide directories for container most of the other objects in the cluster. Namespaces also can provide a scope for role based access control (RBAC) rules. Like a folder, when you delete a namespace, all of the objects within that namespace are also destroyed, so be careful when you delete a namespace! Every Kubernetes cluster has a single built in namespace named default and most installations of Kubernetes also include a namespace named kube-system where cluster administration containers are created. Note Kubernetes objects are devided into “namespaced” and “non-namespaced” objects depending on whether they can be placed in a namespace. Most common Kubernetes API objects are namespaced objects. But some objects that apply to an entire cluster, for example Namespace objects themselves, or cluster level RBAC, are not namespaced. In addition to organizing Kubernetes objects, namespaces are also placed into the DNS names created for services and the DNS search paths that are provided to containers. The complete DNS name for a Service is something like: my-service.svc.my-namespace.cluster.internal which means that two different services in different namespaces will end up with different FQDNs. Additionally, the DNS search paths for each container include the namespace, thus a DNS lookup for frontend will be translated to frontend.svc.foo.cluster.internal for a container in the foo namespace and frontend.svc.bar.cluster.internal for a container in the bar namespace. Labels and Label Queries Every object in the Kubernetes API can have an arbitrary set of labels associated with the object. Labels are string key/value pairs which help identify the object. For example a label might be “role”: “frontend”, which indicates that the object is a frontend. These labels can be used to query and filter objects in the API. For example, you can request that the API server provide you with a list of all Pods where the label “role” is “backend”. These requests are called “label queries” or “label selectors”. Many objects within the Kubernetes API use label selectors as a way to identify of set of objects that they apply to. For example a Pod can have a “node selector” 23
  • 27. which identifies the set of nodes on which the Pod is elegible to run (nodes with GPUs for example). Likewise a Service has a “pod selector” which identifies the set of Pods that the Service should load balance traffic to. Labels and label selectors are the fundamental manner in which Kubernetes loosely couples its objects together. Annotations Not every metadata value that you want to assign to an API object is identifying information. Some of the information is simply an annotation about the object itself. Thus every Kubernetes API object can also have arbitrary annotations. These annotations might include something like the icon to display next to the object, or a modifier that changes the way that the object is interpretted by the system. Often times experimental or vendor-specific features in Kubernetes are initially implemented using annotations, since they are not part of the formal API specification. In the case of such annotations, the annotation itself should carry some notion of the stability of the feature (e.g. beta.kubernetes.io/activate-some-beta-feature). 24
  • 28. Advanced concepts: StatefulSets, Ingress and Deployments Of course, simple replicated, load-balanced services are not the only style of application that you might want to deploy in containers, and as Kubernetes has evolved, it has added new API objects to better suit more specialized use cases, including improved rollouts, HTTP-based load balancing and routing, and stateful workloads. Deployments Though ReplicaSets are the primitive for running many different copies of the same container image, applications are not static entities. They evolve as developers add new features and fix bugs. This means that the act of rolling out new code to a service is as important a feature as replicating it to reliably handle load. The Deployment object was added to the Kubernetes API to represent this sort of safe rollout from one version to another. A Deployment can hold pointers to multiple ReplicaSets, (e.g. v1 and v2) and it can control the slow and safe migration from one ReplicaSet to another. To understand how a Deployment works, imagine that you have an application which is deployed to three replicas in a ReplicaSet named rs-v1. When you ask a Deployment to rollout a new image (v2) the Deployment creates a new ReplicaSet (rs-v2) with a single replica. The Deployment waits for this replica to becomes healthy, and when it is the Deployment reduces the number of replicas in rs-v1 to two. It then increases the number of replicas in rs-v2 to two also, and waits for the second replica of v2 to become healthy. This process continues until there are no more replicas of v1 and there are three healthy replicas of v2. Note Deployments feature a large number of different knobs that can be tuned to provide a safe rollout for the specific details of an application. Indeed in most modern clusters, users exclusively use Deployment objects and don’t manage ReplicaSets directly. HTTP load balancing with Ingress While Service objects provide a great way to do simple TCP level load balancing, they don’t provide an Application level way to do load-balancing and routing. The truth is that most of the applications that users deploy using containers and Kubernetes are HTTP web-based applications. These applications are better served by a load-balancer that understands HTTP. To address these needs, the Ingress API was added to Kubernetes. Ingress represents a path and host- based HTTP load balancer and router. When you create an Ingress object, it receives a virtual IP address just like a Service, but instead of the 1-1 relationship between a service IP address and a set of Pods, an Ingress can use the content of an HTTP request to route requests to different 25
  • 29. services. To get a clearer understanding of how Ingress works, imagine that I have two Kubernetes services named “foo” and “bar”. Each has it’s own IP address, but I really want to expose them to the internet as part of the same host. For example, foo.company.com and bar.company.com. I can do this, by creating an Ingress object and associating its IP address with both the foo.company.com and bar.company.com DNS names. In the Ingress object, I also map the two different hostnames to the two different Kubernetes services. That way, when a request for https://foo.company.com is received, it is routed to the foo service in the cluster, and similarly for https://bar.company.com. With Ingresss the routing can be based on either host, or path or both, so https://company.com/bar can also be routed to the bar service. Note The Ingress API is one of the most decoupled and flexible APIs in Kubernetes. By default while Kubernetes will store Ingress objects, nothing will happen when they are created. Instead you need to also run an “ingress controller” in the cluster to take appropriate actions when the Ingress object is created. One of the most popular ingress controllers is the nginx ingress controller, but there are numerous different implementations that use other HTTP load balancers, or use cloud or physical load-balancer APIs StatefulSets Many applications are happily replicated horizontally and treated as identical clones of the same application. Each replica really has no unique identity independent of any other. For representing such applications a Kubernetes ReplicaSet is a perfect object. However, some applications, especially stateful storage workloads, or sharded applications require more differentiation between the different replicas in the application. While it is possible to add this differentiation at the application level on top of a ReplicaSet, doing so is complicated, error-prone and repetitive for end-users. To resolve this, Kubernetes has recently introduced StatefulSets as a compliment to ReplicaSets, but for more stateful workloads. Like ReplicaSets, StatefulSets create multiple instances of the same container image running in a Kubernetes cluster, but the manner in which containers are created and destroyed is more deterministic, as are the names of each container. In a ReplicaSet, each replicated Pod receives a name that involves a random hash (e.g. “frontend- 14a2”), importantly there is no notion of ordering in a ReplicaSet. In contrast, with StatefulSets each replica receives a monotonically increasing index (e.g. “backed-0”, “backend-1” and so on). Further, StatefulSets guarantee that replica zero will be created and become healthy before replica one is created and so forth. When combined this means that applications can easily bootstrap themselves using the initial replica (e.g. “backend-0”) as a bootstrap master. All subsequent replicas can rely on the fact that “backend-0” has to exist. Likewise when replicas are removed from a StatefulSet they are removed at the highest index. If a StatefulSet is scaled down from five to four replicas it is guaranteed that the fifth replica is the one that will be removed. 26
  • 30. Additionally, StatefulSets receive DNS names so that each replica can be accessed directly, in addition to the complete StatefulSet. This allows clients to easily target specific shards in a sharded service. 27
  • 31. Batch workloads: Job and ScheduledJob In addition to stateful workloads, another specialized class of workloads are batch or one-time workloads. In contrast to all of the other workloads discussed previously, these workloads are not contstantly serving traffic. Instead they come into existence to perform some computation and are destroyed when the computation is complete. In Kubernetes, a Job represents a set of tasks that need to be run. Like ReplicaSets and StatefulSets, Jobs operate by creating Pods to execute work by running container images. However, unlike Replica and StatefulSets, the Pods created by a Job only run until they complete and exit. In addition to the definition of the Pod to create, a Job contains a desired number of repetitions of the Job that should be run, as well as the maximum number of Pods to create in parallel. For example, a job with 100 repetitions and a maximum parallelism of 10 will run 10 pods simultaneously, creating new Pods as old ones complete, until there have been 100 successful executions of the container image. ScheduledJobs build on top of the Jobs object by adding a schedule to a Job. A scheduled Job contains the definition of the Job object that you want to create, as well as the schedule on which that Job should be created. 28
  • 32. Cluster agents and utlities: DaemonSets One of the most common questions that comes up when people are moving to Kubernetes is: “how do I run my machine agents?” Example of such agents include things like intrusion detection, logging and monitoring and others. Many people attempt to use non-Kubernetes approaches to enable these agents such as adding new systemd unit files, or initialization scripts. While these approaches can work, they have several downsides. The first is that the resources used by these agents is not accounted for in Kubernetes’ accounting of resources in use on the cluster. The second is that all of the utility of container images and Kubernetes APIs for health checking, monitoring and more can not be applied to these agents. Fortunately, Kubernetes makes the DaemonSet API available to users to install such agents on their clusters. A DaemonSet provides a template for a Pod that should be run on every machine. When a DaemonSet is created, Kubernetes ensures that this Pod is running on each node in the cluster. If at some later point a new node is added, Kubernetes creates a Pod on that node as well. While by default Kubernetes places a Pod on every node in the cluster, a DaemonSet can also provide a node selector label query, and Kubernetes will only place that DaemonSet’s pods onto nodes that match that label query. 29
  • 33. Another Random Document on Scribd Without Any Related Topics
  • 34. open-handed charity. The manager of Covent Garden Theatre could always be sure of a full house when he announced her in the character of the gay, dissipated, good-humored rake, Sir Harry Wildare. Margaret built and endowed two almshouses at Teddington, Middlesex, and lies buried in the principal church of the district. In the height of her popularity she declared that she preferred the society of men to that of women; the latter, she said, "talk of nothing but silks and scandal." Her end was singularly dramatic. She was playing the character of Rosalind with more than usual éclat, when she was struck with paralysis, and died soon after in the prime of life.[189] We have spoken of accident as often determining the development and directing the course of genius. Edward Shuter was one of the most popular comedians on the London stage in 1776, but he began life as a pot-boy at a public-house in the neighborhood of Covent Garden. A gentleman came to the house one evening, and after refreshing himself he sent the boy Shuter to call him a hackney- coach. On reaching home he found that he had dropped his pocket- book; and suspecting that he had lost it in the coach, he went the next morning to the tavern to make inquiry. He asked Shuter if he knew the number of the hack. The poor boy could not read or write, and was totally unskilled in numerals; but he knew the signs by which his master scored the quarts and pints of porter that were drunk, and to the gentleman's inquiry as to the number of the coach which the boy had called for him Shuter said it was "two pots and a pint" (771). This was unintelligible to the gentleman, but was explained by the landlord. The coachman was summoned, and the pocket-book recovered. This acuteness of the boy interested the gentleman, and he became his patron, sent him to school, and gave him a start in the line of his choice, which was the theatrical profession. Such is the story in brief of one of the famous London comedians. How many of our readers remember the one recorded scene when Queen Elizabeth condescended to coquet with Shakespeare? The
  • 35. great bard was performing the part of a king; Elizabeth's box was contiguous to the stage, and she purposely dropped her handkerchief from the box upon the boards, at the very feet of Shakespeare, having a mind thus to try whether her poet would stoop from his high estate of assumed majesty. "Take up our sister's handkerchief," was his prompt and dignified order to one of the actors in his train. It will doubtless be found interesting to see recorded in juxtaposition the words and the manner of death of some of the great geniuses whom history mentions. When Alonzo Cano, the famous Spanish artist, was dying, the attendant priest presented before him an ivory crucifix; Cano turned away and refused to look at it because the sculpture was so bad, calling for a plain cross, which he embraced, and died. Chaucer breathed his last while composing a ballad. When the priest came whom Alfieri had been prevailed upon to see, he requested him to call the next day. "Death, I trust, will tarry four- and-twenty hours," he said, but died in the interim. Petrarch was found dead in his library, leaning on a book. "I could wish this tragic scene were over," said Quin the actor, "but I hope to go through it with becoming dignity." Pitt, the great statesman, died alone, in a solitary house on Wimbledon Common. Rousseau, when dying, asked to be carried to the window of the apartment overlooking his garden, that he might look his last on Nature. When Malherbe the lyric poet was dying, he reprimanded his nurse for making use of a solecism in her language, and bade the priest stop his trite, cant talk about heaven, saying, "Your wretched style only makes me out of conceit with it." Bide, the English monk and author, on the night of his death continued to dictate to his amanuensis. He asked his scribe how many chapters yet remained to complete the work, and was told there was one. "Take your pen," he commanded, and went on with the work. By and by the scribe
  • 36. said, "It is finished," just as his master breathed his last. Roscommon, when expiring, quoted from his own translation of the "Dies Iræ." "All my possessions for a moment of time!" were the dying words of Queen Elizabeth. The last words of Cardinal Beaufort were, "What! is there no bribing death?" The last words uttered by Byron were, "I must sleep now." In his last moments Crébillon, who had composed two acts of his tragedy of "Catiline," regretted that he had not been spared to complete it. Colorden on the day of his death was visited by his friend Barthe, who requested his opinion of the comedy of the "Selfish Man," which he came to read at his bedside. "You may add an excellent trait to the character of your principal personage," said Colorden. "Say that he obliged an old friend, on the eve of his death, to hear him read a five-act comedy!" "Let me die to the sound of delicious music," were the last words of Mirabeau. Herder died writing an ode to the Deity, his pen on the last line. Heller died feeling his own pulse; and when he found it almost gone, turning his eyes to his brother physician, said, "My friend, the artery ceases to beat!" "Tell Collingwood to bring the fleet to anchor," said Nelson, and expired. The last words of Charles I. were uttered on the scaffold,—"I fear not death! Death is not terrible to me!" Curran's ruling passion was strong in death. Near the close of his earthly hours his physician at his morning call said he "seemed to cough with more difficulty." "That's surprising," said the almost exhausted invalid, "as I have been practising all night." "There is not a drop of blood on my hands," said the expiring Frederick V. of Denmark. "Let not poor Nellie starve" (Nell Gwynn, his mistress), were the last words of Charles II. "I have loved righteousness and hated iniquity, therefore do I die in exile," said Pope Gregory VII. with his expiring breath. Anne Boleyn turned to the executioner on the scaffold, and pointing to her neck, said pathetically, "It is small, very small indeed!" The last words of Maria Theresa were, "I do not sleep; I wish to meet my death awake." Madam Roland exclaimed, "O liberty! liberty! how many crimes are committed in thy name!"
  • 37. It was in perfect accord with his character when Chancellor Thurlow said at the closing moment of his life, "I'm shot if I don't believe I'm dying!" "World without end, Amen!" said Bunyan as he breathed his last. "Guilty, but recommended to the mercy of the court," whispered Lord Hermand. "For the last time I commit soul, body, and spirit into His hands," said John Knox in dying. "Trust in God," said President Edwards, "and you need not fear." These were his last words. "If I had strength enough to hold a pen," said Willian Hunter, the distinguished anatomist, "I would write how easy and delightful it is to die." The dying words of Louis XIV. were, "I thought that dying had been more difficult." Arthur Murphy the dramatist quoted in his last breath Pope's lines,— "Taught by reason, half by mere decay, To welcome death and calmly pass away." When asked if he heard the prayers which were offered in his presence, the Duke of Marlborough replied, "Yes, and I join in them." He never spoke again. "O Lord, open the King of England's eyes," said the martyr Tyndale as he died at the stake. When those noble English reformers, Latimer and Ridley, were being burned at the stake, "Be of good cheer, brother," cried Ridley, "for our God will either assuage the fury of this flame or enable us to abide it." Latimer replied: "Be of good comfort, brother, for we shall this day light such a candle in England as by God's grace shall never be put out." Lady Jane Grey's last words upon the scaffold were: "Lord, into thy hands I commend my spirit." "Many things are growing plain and clear to me," whispered Schiller, and died with these words on his lips. Anna Lætitia Barbauld, the English authoress, wrote with great poetic feeling and moral beauty. Her husband became a lunatic, and she suffered much. It was her beautiful self-sacrifice that gave the best charm to her character. She wrote, among many other works, a popular life of the novelist Richardson, and some political pamphlets of great force and excellence. Her series of books for children would
  • 38. alone have given her lasting reputation. There occurs to us in these closing pages the stanza which she wrote in her old age, probably in her eighty-second year, not long before her death,—lines which Rogers and Wordsworth so much and so justly admired. The former says in his "Table Talk" that while sitting with Madame D'Arblay a few weeks before her death, he asked her if she remembered these lines of Mrs. Barbauld's. "Remember them!" answered the famous authoress, "I repeat them to myself every night before I go to sleep." "Life! we've been long together Through pleasant and through cloudy weather; 'T is hard to part when friends are dear; Perhaps 't will cost a sigh, a tear; Then steal away, give little warning, Choose thine own time; Say not 'Good-night,' but in some brighter clime Bid me 'Good morning.'" CHAPTER XI. Genius has its hours of sunshine as well as of shadow, and when it finds expression in wit and humor it is undoubtedly most popular. The Emperor Titus thought he had lost a day if he had passed it without laughing. Coleridge tells us men of humor are in some degree men of genius; wits are rarely so, although a man of genius may, among other gifts, possess wit. As in pathos and tenderness "one touch of nature makes the whole world kin," so is it in true wit and humor with the appreciative. Obtuseness will be unsympathetic under any circumstances. "It is not in the power of every one to
  • 39. taste humor," says Sterne, "however much he may wish it; it is the gift of God! and a true feeler always brings half the entertainment with him." Bruyere has somewhere said very finely that "wit is the god of moments, but genius is the god of ages." Some men of genius have found their most natural exponent to be the pen; others indulge in practical humor. Sheridan[190] belonged to this latter class; he was full of fun and frolic, ever on the alert for an opportunity to exercise his humor. When on a certain occasion he had been driving about the town for three or four hours in a hackney-coach, he chanced to see his friend Richardson, whom he hailed, and invited into the vehicle. When they were seated together he at once introduced a subject upon which he and Richardson always differed, and a controversy naturally ensued. At last, affecting to be mortified at Richardson's argument, Sheridan said abruptly, "You are really too bad; I cannot bear to listen to such things: I will not stay in the coach with you." And accordingly he opened the door and sprang out, Richardson hallooing triumphantly, "Ah, you're beat, you're beat!" Nor was it until the heat of the victory had a little cooled that he realized he was left in the lurch to pay for Sheridan's three hours' coaching.[191] Sheridan, profligate and unprincipled as he was, still was capable of fine expression of sentiment and true poetic fire. In a poem called "Clio's Protest; or, the Picture Varnished," we find the following really beautiful lines:— "Marked you her cheek of rosy hue? Marked you her eye of sparkling blue? That eye in liquid circles moving; That cheek abashed at man's approving; The one Love's arrows darting round; The other blushing at the wound: Did she not speak, did she not move, Now Pallas, now the Queen of Love?"
  • 40. The poets have frequently made satire an auxiliary of their wit; and when the proportions are properly adhered to, a favorable result is produced. Satire, like many subtle poisons used as a medicine, may be safely taken in small quantities, while an overdose is liable to be fatal. In Chaucer's[192] Canterbury Pilgrims he draws his portraits to the life. While he exposes the weakness of human nature, he does not do so in surliness; a pleasant smile wreathes his lips all the while. There is slyness, but no bitterness in his satire. He would not chastise, he would only reform his fellow-men. As illustrating exactly the opposite spirit, we may instance Pope, Dryden, and Byron, who, descending from their high estate, often prostituted their genius to attacks upon personal enemies or rivals, with keenest weapons, while their opponents had no means of defence. The "Dunciad" is a monument of satiric wit, or genius belittled. Swift, who wrote "cords" of worthless rhymes, squibs, songs, and verses, which live as much by their vulgar smartness as for the slight portion of true wit which tinctures them, says: "Satire is a sort of glass wherein beholders generally discover everybody's face but their own; which is the chief reason for that kind of reception it meets with in the world, and that so few are offended with it." Hawthorne gave the Dean a merited thrust when he said, "the person or thing on which his satire fell shrivelled up as if the Devil had spit on it." The double entendre to be found in nearly all of Swift's effusions, epigrams, and verses, comes with ill grace from a dignitary of the Church. He was always ready with an epigram on all occasions. One "lives in our memory" which he addressed to Mrs. Houghton of Bormount, who took occasion one day to praise her husband in Swift's presence:— "You always are making a god of your spouse; But this neither reason nor conscience allows: Perhaps you will say 'tis in gratitude due, And you adore him because he adores you. Your argument's weak, and so you will find; For you, by this rule, must adore all mankind."
  • 41. The wit and humor of Shakespeare endear him to our hearts; and what a rich harvest does the gleaner obtain from his pages! Take "Love's Labor's Lost," for instance, a play produced in his youth, so full of quips and quiddity as to live in the memory by whole scenes. There is no lack of scathing sarcasm in the play, but it leaves no bitter taste in the mouth, like the "doses" of Swift or the more unscrupulous productions of Pope in the same line. Ben Jonson,[193] who ranked so high as a dramatist, has been pronounced to be, next to Shakespeare, the greatest wit and humorist of his time. His expression was through the pen, not by the tongue: no man was more taciturn in society. Much of Jonson's matter was better adapted to his time than to ours; words which seem to us so coarse and vulgar passed unchallenged in the period which gave them birth. Here are five lines from Jonson, with which he closes a play directed against plagiarists and libellers generally. He sums up thus:— "Blush, folly, blush! here's none that fears The wagging of an ass's ears, Although a wolfish case he wears. Detraction is but baseness' varlet, And apes are apes, though clothed in scarlet." It is said that Jonson was a "sombre" man. We have seen that it is by no means always sunshine with those who brighten others' spirits by their pen. The great luminary is not always above the horizon. A friend remarked to the wife of one of our wittiest poets, "What an atmosphere of mirth you must live in, to share a home with one who writes always so sportively and wittily!" The answer was a most significant shake of the head. We spoke of Dryden as a satirist; perhaps no writer ever went further in the line of bitterness and personality. His portrait of the Duke of Buckingham will occur to the reader in this connection:—
  • 42. "A man so various that he seemed to be Not one, but all mankind's epitome; Stiff in opinions, always in the wrong, Was everything by starts, and nothing long; But, in the course of one revolving moon, Was chymist, fiddler, statesman, and buffoon." When a boy at school in Westminster, Dryden more than once showed the budding promise of the genius that was in him. When put with other classmates to write a composition on the miracle of the conversion of water into wine, he remained idle and truant, as usual, up to the last moment, when he had only time to produce one line in Latin and two in English; but they were of such excellence as to presage his future greatness as a poet, and elicit hearty praise from his tutor. They were as follows:— Videt et erubit lympha pudica Deum! "The modest water, awed by power divine, Beheld its God, and blushed itself to wine." Dryden's complete works form the largest amount of poetical composition from the pen of one writer, in the English language; and yet he published scarcely anything until he was nearly thirty years of age. From that period he was actively engaged in authorship for forty years, and gave us some of the finest touches of his genius in his second spring of life. Addison wrote of Dryden at this period the following lines:— "But see where artful Dryden next appears, Grown old in rhyme, but charming e'en in years; Great Dryden next, whose tuneful Muse affords The sweetest numbers and the fittest words. Whether in comic sounds or tragic airs She forms her voice, she moves our smiles or tears; If satire or heroic strains she writes,
  • 43. Her hero pleases and her satire bites; From her no harsh, unartful numbers fall, She wears all dresses, and she charms in all." Richard Porson, the profound scholar, linguist, and wit, reared many monuments of classic learning, which have however crumbled away, leaving his name familiar to us only as a writer of jeux d'esprit; but these are admirable. He was full of the sunshine of wit; and though sarcastic and personal, as the nature of his bon-mots compelled, he had no bitterness in his reflections, and uttered them with a good- natured laugh. Wonderful stories are told of his powers of memory. He could repeat several consecutive pages of a book after reading them once. It was he who wrote a hundred epigrams in one night on the subject of Pitt's drinking habit, one of which occurs to us:— "When Billy found he scarce could stand, 'Help, help!' he cried, and stretched his hand, To faithful Harry calling. Quoth he, 'My friend, I'm sorry for't, 'Tis not my practice to support A minister that's falling.'" The "faithful Harry" was Dundas, Viscount Melville. The reply of Pitt to Walpole, March 6, 1741, is one of the finest, most polished, and biting retorts on record: "The atrocious crime of being a young man, which the honorable gentleman has, with such spirit and decency, charged upon me, I shall neither attempt to palliate nor deny, but content myself with wishing that I may be one of those whose follies may cease with their youth, and not of that number who are ignorant in spite of experience." Dr. Gilles, the historian of Greece, and Dr. Porson used often to meet and discuss matters of mutual interest relating to the classics. These interviews were certain to lead to very earnest arguments; Porson was much the better scholar of the two. Dr. Gilles was one day speaking to him of the Greek tragedies and of the Odes of Pindar.
  • 44. "We know nothing," said Gilles, emphatically, "of the Greek metres." Porson answered: "If, Doctor, you will put your observation in the singular number, I believe it will be quite correct." In repartee he was remarkable. "Dr. Porson," said a gentleman with whom he had been disputing,—"Dr. Porson, my opinion of you is most contemptible." "Sir," responded the Doctor promptly, "I never knew an opinion of yours that was not contemptible." Porson was a natural wit, so to speak. Being once at a dinner-party where the conversation turned upon Captain Cook and his celebrated voyages, an ignorant person in order to contribute something towards the conversation asked, "Pray, was Cook killed on his first voyage?" "I believe he was," answered Porson, "though he did not mind it much, but immediately entered upon a second." The sharpest repartee is both witty and satirical. James II., when Duke of York, made a visit to Milton, prompted by curiosity. In the course of his conversation the Duke said to the poet that he thought his blindness was a judgment of Heaven on him because he had written against Charles I., the Duke's father; whereupon the immortal poet replied: "If your Highness thinks that misfortunes are indexes of the wrath of Heaven, what must you think of your father's tragical end? I have lost my eyes—he lost his head." Few men equalled Coleridge in the matter of prompt readiness of retort, and few have so misused the lavish gifts of Providence.[194] On a certain occasion he was riding along a Durham turnpike road, in his awkward fashion,—for he was no horseman,—when a wag, noticing his peculiarity, approached him. Quite mistaking his man, he thought the rider a good subject for a little sport, and so accosted him: "I say, young man, did you meet a tailor on the road?" "Yes," replied Coleridge, "I did, and he told me if I went a little further I should meet a goose!" The assailant was struck dumb, while the traveller jogged leisurely on. Lord Bolingbroke, the ardent friend of Pope, was often bitterly satirical, and notably quick at retort. Being at Aix-la-Chapelle during
  • 45. the treaty of peace at that place, he was asked impertinently by a Frenchman whether he came there in any public character. "No, sir," replied Bolingbroke, very deliberately; "I come like a French minister, with no character at all." Bolingbroke's talents were more brilliant than solid, but the style of his literary work is admirable. It is generally believed that he wrote the "Essay on Man" in prose, and that Pope put it into verse, with such additions as would naturally occur in such an adaptation. Painters, like poets, are equal at times to producing the keenest epigrams. Salvator Rosa's opinion of Michael Angelo's "Last Judgment" is an instance of this. The brother artist wrote not unkindly as follows:— "My Michael Angelo, I do not jest; Thy pencil a great judgment has expressed; But in that judgment thou, alas! hast shown But very little judgment of thine own!" We have already spoken of Molière[195] in these pages, though only too briefly when his just fame is considered. England has her Shakespeare, Spain her Cervantes, Germany her Goethe, and France her Molière. We have seen how triumphantly his powerful genius made its way amid adverse circumstances, until it enabled him, as Disraeli says, "to give his country a Plautus in farce, a Terence in composition, and a Menander in his moral truths." In short, Molière showed that the most successful reformer of the manners and morals of the people is a great comic poet. Did not Cervantes "laugh Spain's chivalry away"? It is a curious fact, worthy of note, that Molière, who was so great a comic writer, and such an admirable comedian upon the stage, should have been socially one of the most serious of men and of a melancholic temperament. It was a considerable time before his genius struck out in the right direction and became self-reliant. At the beginning of his dramatic authorship he "borrowed bravely" from the Italian, as Shakespeare did; and
  • 46. Spanish legends were also adapted by his facile pen to dramatic purposes, himself enacting chosen comedy parts of his own plays. This course, however, did not satisfy the genius of Molière; he felt that he was capable of greater originality and of more truly artistic work. After much communing with himself he sought a new and more legitimate field of inspiration and employed fresher material. Having now the entrée to the Hôtel de Rambouillet, he began to study with critical eye the court life about him, soon producing his "Précieuses Ridicules," which was a biting satire upon the follies of the day, though delicately screened. The author skilfully parried in the prologue any application to his court associates, by averring that the satire was aimed at their imitators in the provinces. The ruse was sufficient, and the play was performed without offence; but its significance was nevertheless realized, and had its reformative influence without producing too great a shock. It was almost his first grand and original effort, and from thenceforth his career was a triumphal march. He is said to have exclaimed, "I need no longer study Plautus and Terence, nor poach on the fragments of Menander, I have only to study the world about me." Subsequently the brilliant success of his "Tartuffe," his "Misanthrope," and his "Bourgeois Gentilhomme" confirmed him in his conviction. Although society felt itself arraigned, it was also humbled and powerless. The author had become too great a power to be suppressed. Molière's domestic life, like that of only too many men of genius, and especially of authors, was a wreck.[196] It may be doubted if such persons ought to marry at all. Rousseau is another instance of domestic infelicity; and so are Milton, Dryden, Addison, Steele; indeed, the list could be indefinitely extended. A young painter of great promise once told Sir Joshua Reynolds that he had taken a wife. "Married!" responded the great master; "then you are ruined as an artist." Michael Angelo's answer when he was asked why he never married will be remembered: "I have espoused my art, and that occasions me sufficient domestic cares; my works
  • 47. shall be my children." The marriage of men of genius forms a theme of no little interest in the history of literature. It is herein that genius has oftenest found its sunshine or its shadow. Even Emerson has said, "Is not marriage an open question, when it is alleged from the beginning of the world that such as are in the institution wish to get out, and such as are out wish to get in?" Rousseau married a kitchen-girl, and Raphael allied himself for the last eleven years of his life with a common girl of Rome, whom he first saw washing her feet in the Tiber. Judging from her portrait, which he painted, and which still hangs in the Barberini Gallery, she was by no means beautiful, though the ensemble of head, face, and neck strikes the eye as forming a very attractive whole. Margarita belonged to the lower classes of the Eternal City, and when Raphael died she went back to her former obscurity. There must have been many noble qualities in this young Roman girl, to have held the consistent devotion of so great an artist for an entire decade. She must have possessed some inspiring influence over him other than forming his mere physical model. Sympathetic she undoubtedly was, or else no such union could have lasted; and one feels that he must have imparted to her a portion of the glowing aspirations which fired his own genius. Goethe married to legitimize his offspring; Niebuhr, to please a mistress; Churchill, because he was dispirited and lonely; Napoleon, to obtain influence; Wilkes, to oblige a friend; Lamartine, in gratitude for a fortune which was offered to him, and which he rapidly squandered; Wycherly married his servant to spite his relations. And so we might fill pages with brief mention of the influences which have led men of note to assume matrimonial relations. Balzac's marriage forms a curious example. He met by chance, when travelling, a youthful married lady, who told him, without knowing who he was, how much she admired Balzac's writings. "I never travel without a volume of his," she added, producing a copy. Greatly flattered, the author made himself known to the lady, who was a princess by birth, and who became his constant correspondent until the death of her husband, when she
  • 48. gave him her hand and fortune. They were married, and settled to domestic life in a château on the Rhine. But we have wandered away from Molière before quite concluding the consideration of himself and his works. One of his most popular productions, "L'Impromptu de Versailles," has often been borrowed from; indeed, the general idea has been appropriated bodily both on the English and American stage. In this piece Molière appears in his own person and in the midst of his whole theatrical company, apparently taken quite aback because there is no suitable piece prepared for the occasion. The characters are the actors as though congregated in the Green Room, with whom the manager is consulting, now reprimanding and now advising. In the course of his remarks he throws out hints of plots designed for plays, criticises his own productions, gives amusing sketches of character, and in short presents a humorous, realistic, and unique scene which formed as a whole a very complete comedy, and which proved a grand success. Louis XIV. was his friend and patron; being himself particularly fond of theatrical performances, he often made shrewd suggestions, which the actor and dramatist took good care faithfully to adopt. Indeed, it was said that this then unique idea of the Green Room brought before the curtain was from his Majesty's own brain, though greatly improved upon by Molière. Some of the plots hinted at by the manager before his company in this play were afterwards amplified and perfected so as to become popular dramas, not only by Molière, but by other dramatists. This is notably the case with Beaumarchais' "Barber of Seville," which is but the elaboration of one of these incipient plots. However, Molière was himself so liberal a borrower, like Montesquieu, Racine, and Corneille, he could well afford to lend to others. Bruyère embodies whole passages from Publius Syrus in his printed works; and La Fontaine borrowed his style and much of his matter from Mazot and Rabelais. Though we have referred to this subject before, we will add that Voltaire looked upon everything as imitation; saying that the instruction which we gather from books is like fire: we fetch it from our neighbor's, kindle it at home, and communicate it to others, till it becomes the property of all.
  • 49. CHAPTER XII. Every thoughtful person must often have realized how close is the natural sympathy between artists in literature and artists of the pencil and brush; between painters and poets. Belori informs us of a curious volume in manuscript by the hand of Rubens, which contained among other topics descriptions of the passions and actions of men, drawn from the poets and delineated by the artist's own graphic pencil. Here were represented battles, shipwrecks, landscapes, and various casualties of life, copied and illustrated from Virgil and other classic poets, showing clearly whence Rubens often got his inspiration and ideas of detail. The painter and the poet are the Siamese-twins of genius. The finest picture ever produced is but poetry realized, though each art has its distinct province. The same may be said as to sculpture and poetry. It has long been a mooted question whether the Laocoön in sculpture preceded or was borrowed from the idea expressed in poetry. Lessing believed that the sculptor borrowed from the poet. All the sister arts[197]—music, sculpture, poetry, and painting—are most intimately allied. When great composers, like Mozart, were contemplating a grand expression of their genius, they endeavored to inspire themselves with lofty ideas by reading the poets; while masters in literature and oratory have sought for a similar purpose the elevating and soothing influence of music. Orators have not infrequently depended upon more material stimulus, as we have seen in the instances of Pitt and Sheridan. The biographer of More tells us that when Sir Thomas was sent by Henry VIII. on an embassy to the Emperor of Germany, before he delivered his important remarks he ordered one of his servants to fill him a goblet of wine, which he drank off at once, and in a few moments
  • 50. repeated it, still demanding another. This his faithful servant, knowing his master's temperate habits, feared to furnish, and even at first declined to do so, lest he should expose him thereby before the Emperor. Still, upon a reiterated order, he brought the wine, which was rapidly swallowed by Sir Thomas, who then made his address to the sovereign in Latin, like one inspired, and to the intense admiration of all the auditors, the Emperor himself complimenting him upon his eloquence. More was a strange medley of character. Devout in his religious convictions, he was yet as light- hearted as a child,—at times wise as Solomon in his discourse, and anon descending almost to buffoonery; a truly good man at heart, and yet often espousing the worst of causes. Though a pronounced reformer, he predicted that the Reformation would result in universal vice. He is represented to have had a supreme contempt for money and a true generosity of spirit. With the most solemn convictions of the realities of death, he yet died upon the scaffold with a joke upon his lips. That imaginative English artist Barry, the great historical painter, advised his pupils as follows: "Go home from the Academy, light your lamps, and exercise yourselves in the creative part of your art, with Homer, with Livy, and all the great characters ancient and modern, for your companions and counsellors." Barry has left behind him works upon art which should not be read except with care, unbiassed judgment, and honest appreciation. His own eccentricities, all arising from a passion for art, led his contemporaries to criticise the man and ignore his work. He was wildly enthusiastic in all things relating to art, but yet sometimes exhibited the coarseness of his early associations. He was born at Cork, from whence his father sailed as a foremast hand aboard a coasting vessel, and designed his son for the same humble occupation; but the lad had other and higher aspirations, until finally he attracted the notice of people able to advise and help him. Humbly born and self-educated as he was, he presented some of the highest aspects of genius. By the generosity of Edmund Burke he was sent to Rome, where he studied art for three or four years
  • 51. under favorable circumstances. On his return to England he took high rank, and was engaged by the Academy as a professor. At times in his lectures before the students he would burst into such vehement enthusiasm as to electrify his listeners, and they in turn would rise to their feet and shout applauses long and deep, entirely heedless of the great turmoil which they created. Then Barry would exclaim: "Go it, go it, boys; they did so at Athens!" Literature and art should be wedded together. The careful reader and the keen observer gather up a mental harvest and store it for use. What many conceive to be genius is often but reproduction. Hosts of ideas have passed through the crucible of the author's mind and have been refined by the process, coming forth individualized by the stamp of his personality. He is none the less an originator, a creator; originality is after all but condensed and refined observation. There is a great deal of nonsense written and credited by the world at large as to the inspiration of authorship. Some of the very best poetic turns of thought are the children of purest accident. Sir Joshua Reynolds, calling upon Goldsmith one day, opened his door without knocking, and found him engaged in the double occupation of authorship and teaching a pet dog to sit upon his haunches, now casting a glance at his writing-table, and now shaking his finger at the dog to make him retain his upright position. The last lines upon the paper were still wet,—as Sir Joshua[198] said when he afterwards told the story,—and formed a part of the description of Italy:— "By sports like these are all their cares beguiled: The sports of children satisfy the child." Goldsmith, with his usual good humor, joined in the laugh caused by his whimsical employment, and acknowledged to the great painter that his boyish sport with the dog suggested the lines.
  • 52. Goldsmith was always the wayward and erratic being whom we have represented in these pages. His habit on retiring at night was to read in bed until overcome by somnolence; and he was so little inclined to sleep, that his candle was kept burning until the last moment. His mode of extinguishing it finally, when it was out of immediate reach, was characteristic of his indolence and carelessness: he threw his slipper at it, which consequently was found in the morning covered with grease beside the overturned candlestick. If, as we have attempted to show, authors exhibit oftentimes a spirit of vanity, it must be admitted that readers as frequently exhibit evidence of captiousness. Those who sit down to peruse a book without a good and wholesome appetite for reading are very much in the same condition as one who approaches a table loaded with food, without a sense of hunger. In neither case can one be a proper judge of what is before him; mental or physical pabulum requires for just appreciation a wholesome appetite. Unjust criticism often grows out of an attempt to force the appetite, the censor coming to his task in a wrong humor. The author is usually severely judged; he is solus, his critics are many: if he satisfies one class of readers he is sure to dissatisfy another. Swift's definition of criticism, in his "Tale of a Tub," is pertinent. "A true critic," he says, "in the perusal of a book, is like a dog at a feast, whose thoughts and stomach are wholly set upon what the guests fling away, and consequently is apt to snarl most when there are the fewest bones." Edgar A. Poe's sarcasm upon the "North American Review," in the matter of criticism, will long be remembered. It was generally considered at the time not only a keen but a just retort. Our erratic genius writes: "I cannot say that I ever fairly comprehended the force of the term 'insult,' until I was given to understand, one day, by a member of the 'North American Review' clique, that this journal was not only willing but anxious to render me that justice which had been already accorded me by the 'Revue Française,' and the 'Revue des Deux Mondes,' but was restrained from doing so by my
  • 53. 'invincible spirit of antagonism.' I wish the 'North American Review' to express no opinion of me whatever,—for I have none of it. In the mean time, as I see no motto on its titlepage, let me recommend it one from 'Sterne's Letter from France.' Here it is: 'As we rode along the valley, we saw a herd of asses on the top of one of the mountains: how they viewed and reviewed us!'" No one can deny that Poe possessed remarkable genius; but his best friends could not approve either his temper or his habits. Balzac complained of lack of appreciation; though, as has just been shown, he captivated one of his readers to such a degree as to bring him a wife and a fortune. "A period," he says, "shall have cost us the labor of a day; we shall have distilled into an essay the essence of our mind; it may be a finished piece of art, and they think they are indulgent when they pronounce it to contain some pretty things, and that the style is not bad!" Montaigne said that he found his readers too learned or too ignorant, and that he could please only a middle class who possessed just knowledge enough to understand him. To read well and to a consistent purpose is as much of an art as to write well. It was said of Dr. Johnson by Mrs. Knowles that "he knows how to read better than any other one; he gets at the substance of a book directly; he tears out the heart of it." A literary friend of the writer has long adopted an effective aid to memory in connection with reading. After perusing a book he writes down the date, the place, and under what circumstances it was read, and in a few concise lines gives the impression it has left upon his mind. This he does not design as a criticism; it is intended for himself only. At a future day he can take up the volume, since perusing which he may have read a hundred in a similar manner, and by turning to his brief comment at the close, the power of association enables him to recall the subject of the volume and virtually to remember the contents. He assures us that the circumstances under which he became familiar with the book, if fairly remembered, recall even its detail. For our own part, we have trusted solely to a retentive memory, and the choice of such lines of
  • 54. reading as inclination has suggested. The books which we consult lovingly will long remain with us, requiring very little effort to impress their contents upon the brain. How suggestive is this theme of books and the reading of them! Whipple eulogizes them thus appropriately: "Books,—light-houses erected in the great sea of time; books,—the precious depositories of the thoughts and creations of genius; books,—by whose sorcery time past becomes time present, and the whole pageantry of the world's history moves in solemn procession before our eyes. These were to visit the fireside of the humble, and lavish the treasures of the intellect upon the poor. Could we have Plato and Shakespeare and Milton in our dwellings, in the full vigor of their imaginations, in the full freshness of their hearts, few scholars would be affluent enough to afford them physical support; but the living images of their minds are within the reach of all. From their pages their mighty souls look out upon us in all their grandeur and beauty, undimmed by the faults and follies of earthly existence, consecrated by time." Poets have been more addicted to building castles upon paper than residences upon the more substantial earth. Though the old axiom of "genius and a garret" has passed away, both as a saying and in the experiences of real life, still it had its pertinency in the early days of literature and art. Ariosto, who was addicted to castle-building with the pen, was asked why he was so modestly lodged when he prepared a permanent home for himself. He replied that palaces are easier built with words than with stones. But the poet, nevertheless, had a snug and pretty abode at Ferrara, Italy, a few leagues from Bologna, which is still extant. Leigh Hunt says: "Poets love nests from which they can take their flights, not worlds of wood and stone to strut in." The younger Pliny was more of a substantial architect, whose villa, devoted to literary leisure, was magnificent, surrounded by gardens and parks. Tycho Brahe, the great Danish astronomer, built a grand castle and observatory combined on an island of the Baltic, opposite Copenhagen, which he named the "Castle of the Heavens."
  • 55. Many of our readers have doubtless visited the house which Shakespeare built for himself in his native town on Red-Lion Street. In passing through its plain apartments one receives with infinite faith the stereotyped revelations of the local cicerone. Buffon was content to locate himself for his literary work and study in an old half-deserted tower, and Gibbon, as we have seen, to write his great work in the summer-house of a Lausanne garden. Chaucer lived and wrote in a grand palace, because he was connected with royalty; but he never dilated upon such surroundings,—his fancy ran to outdoor nature, to the flowers and the trees. Milton[199] sought an humble "garden house" to live in; that is, a small house in the environs of the city, with a pleasant little garden attached. Addison wrote his "Campaign" "up two pair of back stairs in the Hay-market." Johnson tells us that much of his literary work was produced from a garret in Exeter Street. Paul Jovius,[200] the Italian author, who wrote three hundred concise eulogies of statesmen, warriors, and literary men of the fourteenth century, built himself an elegant château on the Lake of Como, beside the ruins of the villa of Pliny, and declared that when he sat down to write he was inspired by the associations of the place. In his garden he raised a marble statue to Nature, and his halls contained others of Apollo and the Muses. The traveller visits with eager interest Rubens' house in his native city of Antwerp, a veritable museum within, but plain and unpretentious without. Rubens is to the Belgian capital what Thorwaldsen is to Copenhagen. Spenser lived in an Irish castle (Kilcolman Castle), which was burned over his head by a mob; and, sad to say, his child was burned with it. In his verses Spenser was always depicting "lowly cots," and it was on that plane that his taste rested. Moore's vine-clad cottage at Sloperton is familiar to all. In the environs of Florence we still see the cottage home where Landor lived and wrote, and in the city itself the house of Michael Angelo,— plain and unadorned externally, but with a few of the great artist's household gods duly preserved in the several apartments. The historic home of the poet Longfellow, in Cambridge, has become a
  • 56. Mecca to lovers of poetry and genius; while Tennyson's embowered cottage at the Isle of Wight is equally attractive to travellers from afar. Pope[201] had a modest nest at Twickenham, and Wordsworth at Rydal Mount, the beauties of both being more dependent upon the surrounding scenery than upon any architectural attraction. Pope declared all gardens to be landscape-paintings, and he loved them. Scott made himself a palatial home at Abbotsford, which was quite an exception to that of his brother poets. Dr. Holmes's unpretentious town house in the Trimountain city overlooks the broad Charles, and affords him a glorious view of the setting sun. Emerson's Concord home was and is the picture of rural simplicity. Hawthorne's biographer makes us familiar with his red cottage at Lenox. Bryant made himself an embowered summer cottage at Roslyn, New York State. Lowell has a fine but plain residence overlooking the beautiful grounds of Mount Auburn. Nothing could be more simple and lovely than Whittier's Danvers home. None of these poets have built castles of stone, whatever they may have done under poetical license. "I never had any other desire so strong, and so like to covetousness," says the poet Cowley, "as that I might be master at least of a small house and a large garden, with very moderate conveniences joined to them, and there dedicate the remainder of my life only to the culture of them and study of Nature, and then, with no desire beyond my wall,— '——Whole and entire to lie, In no unactive ease, and no unglorious poverty.'" Cowley at last got what he so ardently desired, but it was not until he was too old and broken in health to find that active enjoyment which he had so fondly anticipated. He died in the forty-ninth year of his age. We spoke of the contrast which was manifest between the private and public life of Molière. These paradoxes are strange, but by no
  • 57. means uncommon in the character of men of genius. It will be remembered that Grimaldi, the cleverest and most mirth-provoking clown of his day in England, was often under medical treatment on account of his serious attacks of melancholy. It seems almost incredible that men of such profound judgment in most matters, as were Dr. Johnson and Addison, should have been so inexcusably weak as to entertain a belief in ghosts,—an eccentricity which neither of them denied. Byron,[202] who as a rule was noted for his shrewd common-sense, was so superstitious that he would not help a person at table to salt, nor permit himself to be served with it by another's hand. There were other equally absurd "omens" which he strenuously regarded. Cowper, who was a devoutly religious man, deliberately attempted to hang himself,—an act entirely at variance with his serious convictions. So also Hugh Miller, one of the most wholesome writers upon the true principles of life, wrested his own life from his Maker's hands. Pope, who was such a bravado with his pen, boldly denouncing an army of scholars and wits in his "Dunciad," was personally an arrant coward, who could not summon sufficient self-possession to make a statement before a dozen of his personal friends. The paradox which existed between Goldsmith's pen and tongue passed into an axiom: with the one he was all eloquence and grace; with the other, as foolish as a parrot. Douglas Jerrold, whose forte was as clearly that of wit and humor as it is the sun's province to shine, was ever wishing to write a profound essay on natural philosophy. Newton, highest authority in algebra, could not make the proper change for a guinea without assistance, and while he was master of the Mint was hourly put to shame by the superior practical arithmetic of the humblest clerks under him. Another peculiarity of Newton was that he fancied himself a poet; but who ever saw a verse of his composition? Judged by all accepted rules, Charles Lamb experienced ills sufficient to have driven him to commit suicide; whereas the truth shows that with "his sly, shy, elusive, ethereal humor" he was ordinarily the most genial and contented of beings.
  • 58. Curious beyond expression are the many-sided phases of genius, and indeed of all humanity. Let us therefore have a care how we judge our fellow-men, since what they truly are within themselves we cannot know, and may only infer by what they seem to be relatively to ourselves. Undoubtedly the germs of virtue and of vice are born within the soul of every human being; their development is contingent upon how slight a cause! Nor in our readiness to censure should we forget in whose image we are all created,—"a little lower than the angels, a little higher than the brutes." It is the nature of man, like the harp, to give forth beautiful or discordant sounds according to the delicacy and skill with which it is touched. We find what we come to find,—what, indeed, we bring with us. Richard Baxter, the prolific author upon theology, at the close of a long life said: "I now see more good and more evil in all men than heretofore I did. I see that good men are not so good as I once thought they were; and I find that few are so bad as either malicious enemies or censorious professors do imagine." INDEX. Adams, John, 28. Addison, Joseph, 38, 42, 78, 86, 116 and note, 118, 202, 277, 283, 296, 299. Æschylus, 77. Æsop, 4. Agassiz, Louis, 103 and note. Akenside, Mark, 7. Alexander the Great, 27. Alfieri, Vittorio, 136, 266. Allston, Washington, 45, 97 and note.
  • 59. Ames, Fisher, 26, 45. Amyot, Jacques, 6. Andersen, Hans Christian, 22 and note, 63, 84, 205. André, Major John, 43. Angelo, Michael, 14, 242, 283. Arago, Dominique François, 184. Arc, Joan of, 29, 188. Ariosto, Lodovico, 295. Aristippus, 118. Aristo, 115. Aristophanes, 2, 3. Arkwright, Sir Richard, 18. Arnauld, Antoine, 33. Astor, John Jacob, 26 and note. Astor, William B., 26 note. Auber, Daniel François Esprit, 82. Audubon, John James, 222, 223 and note. Bacon, Francis, 32, 57 and note, 77, 124. Bailey, Philip James, 227. Ball, Thomas, 21 and note. Balzac, de (Honoré), 46, 207, 284, 293. Bancroft, George, 35, 203, 227. Bandoccin, 6. Barbauld, Anna Lætitia, 269. Barrow, Isaac, 116. Barry, James, 7, 32 note, 289. Baxter, Richard, 301. Beaconsfield, Lord (Disraeli), 13 note, 87 note, 117 note, 135, 205, 227 and note. Beaufort, Cardinal Henry, 266. Beaumarchais, de (Pierre Auguste Caron), 21. Beckford, William, 68. Beecher, H. W., 38. Beethoven, van, Ludwig, 127 and note, 221. Bellini, Vincenzo, 29.
  • 60. Bentham, Jeremy, 137 and note. Bentivoglio, Ercole, 149. Bentley, Richard, 40. Béranger, de (Pierre Jean), 8, 139 and note, 194, 209. Betterton, Thomas, 260. Beveridge, Bishop, 57. Bewick, Thomas, 24. Bide, 266. Biglow, Hosea, 20 note. Blackstone, Sir William, 77. Blessington, Lady Margaret, 67 note. Bloomfield, Robert, 23. Boccaccio, Giovanni, 9. Boëthius, 131 note. Boffin, ——, 24. Boleyn, Anne, 268. Bolingbroke, Lord (Henry Saint John), 280. Bousard, ——, 135. Bowditch, Nathaniel, 16. Boyle, Robert, 281. Boyle, Samuel, 164. Bracegirdle, 262. Bright, John, 15, 35. Brindley, James, 19. Britton, John, 21. Bronté, Anne, 192. Bronté, Charlotte, 56, 62, 192. Bronté, Emily, 192. Bronté, Rev. Patrick, 192. Brooks, Shirley, 227. Brougham, Lord, 32 note, 206. Browning, Mrs., 163 note. Bruyère, de la (Jean), 270, 286. Bryant, William C., 29, 227, 298. Brydges, Sir Samuel Egerton, 201.
  • 61. Buffon, Georges Louis Leclerc, Comte, 48, 61, 83, 89, 205, 215, 227, 296. Bulwer Lytton, 31, 37, 46, 63, 106, 108, 227, 228. Bunyan, John, 15 and note, 131, 268. Burgundy, Duke of, 119. Burke, Edmund, 32 and note, 33, 38, 40, 55, 77, 78, 86, 225, 227. Burns, Robert, 77, 79 and note, 106, 108, 117, 122, 185, 186, 208, 220. Burritt, Elihu, 16, 112. Burton, Robert, 120, 162 and note. Butler, Samuel, 153 and note. Buxton, Sir Thomas Fowell, 19. Byron, George Gordon Noel, 37, 44, 50, 62, and note, 63, 90, 106, 116, 117, 142, 176, 177 and note, 200, 227, 266, 273, 299 and note. Byron, Thomas, 115. Cæsar, Julius, 60, 206. Cæsar, Octavius, 28 note. Calhoun, John C., 22, 28. Calvart, Denis, 251. Camoens, Luis, 129 and note. Campbell, Thomas, 152, 287 note. Cano, Alonzo, 265. Canova, Antonio, 6, 208, 255, 256. Carlyle, Thomas, 36, 41, 58, 63, 79, 89, 108, 128, 130, 138, 148, 149, 151, 165, 204, 218, 223, 229. Carneades, 73. Cato, 33, 151. Cellini, Benvenuto, 153 and note. Cervantes, Miguel, 12, 13 and note, 129, 131 note, 132 and note, 206. Channing, Dr. William E., 47, 222 and note. Chantrey, Sir Francis, 21. Chapin, E. H., 38.
  • 62. Charlemagne, 28. Charles, Duke of Orleans, 132. Charles I. of England, 267. Charles II. of England, 267. Charles XII. of Sweden, 27 and note. Châteaubriand, François Auguste, 124 and note. Chatham, Earl of, 34. Chatterton, Thomas, 31, 129, 166. Chaucer, Geoffrey, 10, 31, 34, 131 note, 265, 273, 296. Choate, Rufus, 45, 114. Churchill, Charles, 87 and note, 284. Cibber, Colley, 217. Cicero, 21, 206, 209. Cimarosa, Domenico, 62. Clare, John, 137. Clark, Samuel, 100. Cleanthes the Stoic, 5. Clive, Robert, Lord, 28. Clyde, Lord, 15. Cobbett, William, 12, 32 note, 133. Cobden, Richard, 15. Coleridge, S. T., 2 note, 18, 38, 39, 52, 53 note, 62, 77, 104, 105 and note, 115, 123, 139, 152 note, 208, 239, 270, 279 and note. Colletet, Guillaume, 135. Collier, John Payne, 125. Collins, William, 171 and note. Colorden, 267. Colton (Lacon), 91, 182, 183. Columbus, Christopher, 10, 11 and note. Combe, George, 166. Congreve, William, 29, 124, 125 and note, 138, 201. Condé, de (Louis II. de Bourbon), Prince, 28. Cook, James, Capt., 19. Cormontaigne, Louis de, 76. Corneille, Peter, 43, 44, 128, 227, 241.
  • 63. Correggio, Antonio Allegri da, 254. Correra, ——, 17. Cortes, Hernando, 28. Cowley, Abraham, 31, 37, 239, 298. Cowper, William, 137 and note, 161, 162, 221, 299. Crabbe, George, 92, 129, 153. Crassus, Roman triumvir, 5 note. Cratinus, 77. Crébillon, Prosper Jolyot, 84, 267. Cromwell, Oliver, 13, 122. Cruden, Alexander, 137. Cunningham, Allan, 22. Curran, John Philpot, 40, 57, 238, 267. Cushing, Caleb, 45. D'Alembert, Jean le Rond, 7. Dalrymple, Sir David (Lord Hailes), 75. Dante, Allighieri, 40, 51, 128, 148 and note, 205. D'Arblay, Madame (Frances Burney), 269. Darwin, Dr. Erasmus, 99. Davenant, Sir William, 131 note. Da Vinci, Leonardo, 121 and note. Davy, Sir Humphry, 7, 106. Decker, Thomas, 140. DeFoe, Daniel, 11, 132, 153. Demosthenes, 204. De Quincey, Thomas, 77, 129, 136, 137 and note, 199, 211. De Tocqueville, Alexis Charles Henry Clerel, 52, 207. Dibdin, Charles, 53. Dick, Robert, 24. Dickens, Charles, 31, 46, 62, 77, 91, 109, 110, 114, 197, 204 and note, 242. Diogenes, 211. Dodsley, Robert, 23. Domenichino, Zampieri, 96. Drew, Samuel, 23.
  • 64. Dryden, John, 10, 40 and note, 73, 74 and note, 106, 115, 214, 273, 276, 283. Ducis, Jean François, 209. Dumas, Alexandre, 13, 84 and note, 109, 194, 233. Durer, Albert, 205. Edgeworth, Maria, 43 and note. Edwards, President Jonathan, 268. Edwards, Thomas, 23. Elizabeth, Queen, 266. Elliott, Ebenezer, 17 and note. Emerson, Ralph Waldo, 4, 23, 27, 38, 63 note, 69 note, 200, 204, 283, 298. Ennius, 77. Epictetus, 5, 110. Erasmus, Désiré, 150. Ereilla, Alonzo de, 133. Eupolis, 77. Euripides, 126. Evarts, William, 98 and note. Fénelon, François de Salignac de la Mothe, 94. Fielding, Henry, 45 note, 155 and note, 156, 210. Fields, James T., 109, 182. Fletcher, Andrew, of Saltoun, 8 note. Fontenelle, Bernard le Bovier, 34. Foote, Samuel, 261. Fordyce, Dr. George, 115. Forrest, Edwin, 189. Foster, John, 48, 58. Fox, Charles James, 40. Franklin, Dr. Benjamin, 16 and note, 34, 124, 241. Frederick V. of Denmark, 267. Fuller, Margaret, 41, 42 and note, 45, 204. Fuller, Thomas, 40 and note, 123.
  • 65. Welcome to our website – the ideal destination for book lovers and knowledge seekers. With a mission to inspire endlessly, we offer a vast collection of books, ranging from classic literary works to specialized publications, self-development books, and children's literature. Each book is a new journey of discovery, expanding knowledge and enriching the soul of the reade Our website is not just a platform for buying books, but a bridge connecting readers to the timeless values of culture and wisdom. With an elegant, user-friendly interface and an intelligent search system, we are committed to providing a quick and convenient shopping experience. Additionally, our special promotions and home delivery services ensure that you save time and fully enjoy the joy of reading. Let us accompany you on the journey of exploring knowledge and personal growth! textbookfull.com