Getting Started with Kubernetes 2nd Edition Jonathan Baier - The latest updated ebook is now available for download
Getting Started with Kubernetes 2nd Edition Jonathan Baier - The latest updated ebook is now available for download
https://ebookultra.com/download/getting-started-with-openshift-1st-
edition-steven-pousty/
https://ebookultra.com/download/getting-started-with-arduino-1st-
edition-massimo-banzi/
https://ebookultra.com/download/getting-started-with-sapui5-1st-
edition-miroslav-antolovic/
https://ebookultra.com/download/getting-started-with-electronic-
projects-1st-edition-pretty/
Getting Started with Processing 1st Edition Casey Reas
https://ebookultra.com/download/getting-started-with-processing-1st-
edition-casey-reas/
https://ebookultra.com/download/getting-started-with-google-apps-1st-
edition-paul-darbyshire/
https://ebookultra.com/download/getting-started-with-google-apps-1st-
edition-paul-darbyshire-2/
https://ebookultra.com/download/getting-started-with-
libreoffice-6-0-libreoffice-documentation-team/
https://ebookultra.com/download/getting-started-with-hipaa-1st-
edition-uday-o-ali-pabrai/
Getting Started with Kubernetes 2nd Edition Jonathan
Baier Digital Instant Download
Author(s): Jonathan Baier
ISBN(s): 9781787283367, 1787283364
Edition: 2nd
File Details: PDF, 11.60 MB
Year: 2017
Language: english
Getting Started with
Kubernetes
Second Edition
Jonathan Baier
BIRMINGHAM - MUMBAI
Getting Started with Kubernetes
Second Edition
Copyright © 2017 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or
transmitted in any form or by any means, without the prior written permission of the
publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the
information presented. However, the information contained in this book is sold without
warranty, either express or implied. Neither the author, nor Packt Publishing, and its
dealers and distributors will be held liable for any damages caused or alleged to be caused
directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.
ISBN 978-1-78728-336-7
www.packtpub.com
Credits
He currently enjoys working for Moody's as Vice President of Global Cloud Engineering.
He has over a decade of experience delivering technology strategies and solutions for both
public and private sector businesses of all sizes. He has a breadth of experience working
with a wide variety of technologies and he enjoys helping organizations and management
embrace new technology to transform their businesses.
Working in the areas of architecture, containerization, and cloud security, he has created
strategic roadmaps to guide and help mature the overall IT capabilities of various
enterprises. Furthermore, he has helped organizations of various sizes build and implement
their cloud strategy and solve the many challenges that arise when "designs on paper" meet
reality.
Acknowledgement
I'd like to give a tremendous thank you to my wonderful wife, Tomoko, and my playful
son, Nikko. You both gave me incredible support and motivation during the writing
process for both editions of this book. There were many early morning, long weekend and
late night writing sessions that I could not have done without you both. You're smiles move
mountains I could not on my own. You are my True north and guiding light in the storm.
I'd also like to give a special thanks to all my colleagues and friends at Cloud Technology
Partners. Many of whom provided the encouragement and support for the original
inception of this book. I'd like to especially thank Mike Kavis, David Linthicum, Alan Zall,
Lisa Noon, Charles Radi and also the amazing CTP marketing team (Brad Young, Shannon
Croy, and Nicole Givin) for guiding me along the way!
About the Reviewer
Jay Payne has been a database administrator 5 at Rackspace for over 10 years, working on
the design, development, implementation, and operation of storage systems.
Previously, Jay worked on billing and support systems for hosting companies. For the last
20 years, he has primarily focused on the data life cycle from database architecture,
administration, operations, reporting, disaster recovery, and compliance. He has domain
experience in hosting, finance, billing, and customer support industries.
www.PacktPub.com
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and
ePub files available? You can upgrade to the eBook version at www.PacktPub.comand as a
print book customer, you are entitled to a discount on the eBook copy. Get in touch with us
at service@packtpub.com for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a
range of free newsletters and receive exclusive discounts and offers on Packt books and
eBooks.
https://www.packtpub.com/mapt
Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt
books and video courses, as well as industry-leading tools to help you plan your personal
development and advance your career.
Why subscribe?
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Customer Feedback
Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial
process. To help us improve, please leave us an honest review on this book's Amazon page
at https://www.amazon.com/dp/1787283364.
If you'd like to join our team of regular reviewers, you can e-mail us at
customerreviews@packtpub.com. We award our regular reviewers with free eBooks and
videos in exchange for their valuable feedback. Help us be relentless in improving our
products!
Table of Contents
Preface 1
Chapter 1: Introduction to Kubernetes 8
A brief overview of containers 9
What is a container? 9
Why are containers so cool? 12
The advantages of Continuous Integration/Continuous Deployment 12
Resource utilization 13
Microservices and orchestration 13
Future challenges 14
The birth of Kubernetes 14
Our first cluster 15
Kubernetes UI 21
Grafana 23
Command line 25
Services running on the master 26
Services running on the minions 29
Tear down cluster 31
Working with other providers 31
Resetting the cluster 35
Modifying kube-up parameters 36
Alternatives to kube-up.sh 36
Starting from scratch 37
Cluster setup 37
Installing Kubernetes components (kubelet and kubeadm) 38
Setting up a Master 39
Joining nodes 39
Networking 40
Joining the cluster 41
Summary 41
References 42
Chapter 2: Pods, Services, Replication Controllers, and Labels 43
The architecture 43
Master 45
Node (formerly minions) 45
Core constructs 46
Pods 46
Pod example 46
Labels 48
The container's afterlife 48
Services 49
Replication controllers and replica sets 50
Our first Kubernetes application 50
More on labels 57
Replica sets 60
Health checks 61
TCP checks 66
Life cycle hooks or graceful shutdown 67
Application scheduling 69
Scheduling example 69
Summary 73
References 73
Chapter 3: Networking, Load Balancers, and Ingress 74
Kubernetes networking 74
Networking options 75
Networking comparisons 76
Docker 76
Docker user-defined networks 76
Weave 77
Flannel 77
Project Calico 78
Canal 78
Balanced design 78
Advanced services 79
External services 81
Internal services 82
Custom load balancing 83
Cross-node proxy 86
Custom ports 87
Multiple ports 88
Ingress 89
Migrations, multicluster, and more 95
Custom addressing 97
Service discovery 98
DNS 98
Multitenancy 99
[ ii ]
Limits 100
A note on resource usage 104
Summary 104
References 104
Chapter 4: Updates, Gradual Rollouts, and Autoscaling 105
Example set up 106
Scaling up 107
Smooth updates 108
Testing, releases, and cutovers 110
Application autoscaling 114
Scaling a cluster 117
Autoscaling 117
Scaling up the cluster on GCE 118
Scaling up the cluster on AWS 121
Scaling manually 123
Summary 123
Chapter 5: Deployments, Jobs, and DaemonSets 124
Deployments 124
Scaling 126
Updates and rollouts 127
History and rollbacks 130
Autoscaling 132
Jobs 134
Other types of jobs 136
Parallel jobs 137
Scheduled jobs 137
DaemonSets 138
Node selection 139
Summary 142
References 142
Chapter 6: Storage and Running Stateful Applications 143
Persistent storage 143
Temporary disks 144
Cloud volumes 145
GCE persistent disks 145
AWS Elastic Block Store 151
Other storage options 152
PersistentVolumes and StorageClasses 152
StatefulSets 153
[ iii ]
A stateful example 154
Summary 160
References 160
Chapter 7: Continuous Delivery 161
Integrating with continuous delivery pipeline 161
Gulp.js 162
Prerequisites 162
Gulp build example 162
Kubernetes plugin for Jenkins 166
Prerequisites 166
Installing plugins 167
Configuring the Kubernetes plugin 170
Bonus fun 175
Summary 175
Chapter 8: Monitoring and Logging 176
Monitoring operations 176
Built-in monitoring 177
Exploring Heapster 179
Customizing our dashboards 182
FluentD and Google Cloud Logging 187
FluentD 188
Maturing our monitoring operations 189
GCE (StackDriver) 189
Sign-up for GCE monitoring 189
Alerts 190
Beyond system monitoring with Sysdig 191
Sysdig Cloud 191
Detailed views 193
Topology views 193
Metrics 196
Alerting 196
The sysdig command line 198
The csysdig command-line UI 199
Prometheus 201
Summary 202
References 202
Chapter 9: Cluster Federation 203
Introduction to federation 203
Setting up federation 204
Contexts 204
[ iv ]
New clusters for federation 205
Initializing the federation control plane 206
Adding clusters to the federation system 207
Federated resources 207
Federated configurations 210
Other federated resources 213
True multi-cloud 214
Summary 214
Chapter 10: Container Security 215
Basics of container security 215
Keeping containers contained 216
Resource exhaustion and orchestration security 216
Image repositories 217
Continuous vulnerability scanning 217
Image signing and verification 218
Kubernetes cluster security 219
Secure API calls 220
Secure node communication 220
Authorization and authentication plugins 221
Admission controllers 221
Pod security policies and context 222
Enabling beta APIs 222
Creating a PodSecurityPolicy 224
Creating a pod with a PodSecurityContext 228
Clean up 229
Additional considerations 229
Securing sensitive application data (secrets) 230
Summary 231
References 231
Chapter 11: Extending Kubernetes with OCP, CoreOS, and Tectonic 233
The importance of standards 233
The Open Container Initiative 234
Cloud Native Computing Foundation 235
Standard container specification 235
CoreOS 237
rkt 239
etcd 239
Kubernetes with CoreOS 239
Tectonic 241
Dashboard highlights 242
[v]
Summary 246
References 247
Chapter 12: Towards Production Ready 248
Ready for production 248
Ready, set, go 250
Third-party companies 250
Private registries 251
Google Container Engine 251
Azure Container Service 252
ClusterHQ 252
Portworx 252
Shippable 253
Twistlock 253
AquaSec 253
Mesosphere (Kubernetes on Mesos) 254
Deis 254
OpenShift 254
Where to learn more? 255
Summary 255
Index 256
[ vi ]
Preface
This book is a guide to getting started with Kubernetes and overall container management.
We will walk you through the features and functions of Kubernetes and show how it fits
into an overall operations strategy. You’ll learn what hurdles lurk in moving a container off
the developer's laptop and managing them at a larger scale. You’ll also see how Kubernetes
is the perfect tool to help you face these challenges with confidence.
Chapter 2, Pods, Services, Replication Controllers, and Labels, uses a few simple examples to
explore core Kubernetes constructs, namely pods, services, replication controllers, replica
sets, and labels. Basic operations including health checks and scheduling will also be
covered.
Chapter 3, Networking, Load Balancers, and Ingress, covers cluster networking for Kubernetes
and the Kubernetes proxy. It also takes a deeper dive into services, finishing up, it shows a
brief overview of some higher level isolation features for mutli-tenancy.
Chapter 4, Updates, Gradual Rollouts, and Autoscaling, is a quick look at how to roll out
updates and new features with minimal disruption to uptime. We will also look at scaling
for applications and the Kubernetes cluster.
Chapter 6, Storage and Running Stateful Applications, covers storage concerns and persistent
data across pods and the container life cycle. We will also look at new constructs for
working with stateful application in Kubernetes.
Preface
Chapter 7, Continuous Delivery, explains how to integrate Kubernetes into your continuous
delivery pipeline. We will see how to use a k8s cluster with Gulp.js and Jenkins as well.
Chapter 8, Monitoring and Logging, teaches how to use and customize built-in and third-
party monitoring tools on your Kubernetes cluster. We will look at built-in logging and
monitoring, the Google Cloud Monitoring/Logging service, and Sysdig.
Chapter 9, Cluster Federation, enables you to try out the new federation capabilities and
explains how to use them to manage multiple clusters across cloud providers. We will also
cover the federated version of the core constructs from previous chapters.
Chapter 10, Container Security, teaches the basics of container security from the container
runtime level to the host itself. It also explains how to apply these concepts to running
containers and some of the security concerns and practices that relate specifically to running
Kubernetes.
Chapter 11, Extending Kubernetes with OCP, CoreOS, and Tectonic, discovers how open
standards benefit the entire container ecosystem. We’ll look at a few of the prominent
standards organizations and cover CoreOS and Tectonic, exploring their advantages as a
host OS and enterprise platform.
Chapter 12, Towards Production Ready, the final chapter, shows some of the helpful tools
and third-party projects that are available and where you can go to get more help.
Additionally, you should have a Google Cloud Platform account. You can sign up for a free
trial here:
https://cloud.google.com/
Also, an AWS account is necessary for a few sections of the book. You can sign up for a free
trial here:
https://aws.amazon.com/
[2]
Preface
Having some familiarity with Docker containers, general software developments, and
operations at a high-level will be helpful.
Conventions
In this book, you will find a number of text styles that distinguish between different kinds
of information. Here are some examples of these styles and an explanation of their meaning.
Code words in text, folder names, filenames, file extensions, and pathnames are shown as
follows: "Do a simple curl command to the pod IP."
If we wish you to replace a portion of the URL with your own values it will be shown like
this:
https://<your master ip>/swagger-ui/
Resource definition files and other code blocks are set as follows:
apiVersion: v1
kind: Pod
metadata:
name: node-js-pod
spec:
containers:
- name: node-js-pod
image: bitnami/apache:latest
ports:
- containerPort: 80
[3]
Preface
When we wish you to replace a portion of the listing with your own value, the relevant
lines or items are set in bold between less than and greater than symbols:
subsets:
- addresses:
- IP: <X.X.X.X>
ports:
- name: http
port: 80
protocol: TCP
New terms and important words are shown in bold. Words that you see on the screen, for
example, in menus or dialog boxes, appear in the text like this: "Clicking the Add
New button moves you to the next screen."
There are several areas where the text refers to key-value pairs or to input dialogs on the
screen. In these case the key or input label will be shown in bold and the value will be
shown in bold italics. For example: "In the box labelled Timeout enter 5s."
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this
book-what you liked or disliked. Reader feedback is important for us as it helps us develop
titles that you will really get the most out of.
If there is a topic that you have expertise in and you are interested in either writing or
contributing to a book, see our author guide at www.packtpub.com/authors.
[4]
Preface
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help you
to get the most from your purchase.
1. Log in or register to our website using your e-mail address and password.
2. Hover the mouse pointer on the SUPPORT tab at the top.
3. Click on Code Downloads & Errata.
4. Enter the name of the book in the Search box.
5. Select the book for which you're looking to download the code files.
6. Choose from the drop-down menu where you purchased this book from.
7. Click on Code Download.
Once the file is downloaded, please make sure that you unzip or extract the folder using the
latest version of:
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPubl
ishing/Getting-Started-with-Kubernetes-Second-Edition. We also have other code
bundles from our rich catalog of books and videos available at https://github.com/Packt
Publishing/. Check them out!
[5]
Other documents randomly have
different content
this subject is urgently needed on social grounds. That hypocritical
affectation of theological belief against which we have to fight, is
designed to prevent, or at least has the effect of preventing, the just
enforcement of popular claims. These unscrupulous attempts to
mystify the people involve their mental subjection. The result is, that
their legitimate aspirations for real progress are evaded, by diverting
their thoughts towards an imaginary future state. It is for the
working classes themselves to break through this concerted scheme,
which is even more contemptible than it is odious. They have only to
declare without disguise what their intellectual position really is; and
to do this so emphatically as to make any mistake on the part of the
governing classes impossible. They will consequently reject all
teachers who are insufficiently emancipated, or who in any way
support the system of theological hypocrisy, which, from Robespierre
downwards, has been the refuge of all reactionists, whether
democrat or royalist. But there are teachers of another kind, who
sincerely maintain that our life here on earth is a temporary
banishment, and that we ought to take as little interest in it as
possible. A prompt answer may be given to such instructors as
these. They should be requested to follow out their principle
consistently, and to cease to interfere in the management of a world
which is so alien to what, in their ideas, is the sole aim of life.
From metaphysical Metaphysical principles have more hold on our
doctrines working classes than theological; yet their
abandonment is equally necessary. The subtle
extravagances by which the German mind has been so confused,
find, it is true, little favour in Catholic countries. But even in Paris the
people retains a prejudice in favour of metaphysical instruction,
though happily it has not been able to obtain it. It is most desirable
that this last illusion of our working classes should be dissipated, as
it forms the one great obstacle to their social action. One reason for
it is that they fall into the common error of confounding knowledge
with intelligence, and imagine in their modesty that none but
instructed men are capable of governing. Now this error, natural as it
is, often leads them to choose incompetent leaders. A truer estimate
of modern society would teach them that it is not among our literary,
or even our scientific men, proud as they may be of their
attainments, that the largest number of really powerful intellects are
to be found. There are more of them among the despised practical
class, and even amongst the most uninstructed working men. In the
Middle Ages this truth was better known than it is now. Education
was thought more of than instruction. A knight would be appreciated
for his sagacity and penetration, and appointed to important posts,
though he might be extremely ignorant. Clear-sightedness, wisdom,
and even consistency of thought, are qualities which are very
independent of learning; and, as matters now stand, they are far
better cultivated in practical life than in scholastic study. In breadth
of view, which lies at the root of all political capacity, our literary
classes have certainly shown themselves far below the average.
Their mistaken And now we come to another and a deeper
preference of reason for the prejudice of which I am speaking. It
literary and
is that they make no distinction between one kind
rhetorical talent to
real intellectual of instruction and another. The unfortunate
power confidence which they still bestow on literary men
and lawyers shows that the prestige of pedantry
lingers among them longer than the prestige of theology or
monarchy. But all this will soon be altered under the influence of
republican government, and the strong discipline of a sound
philosophical system. Popular instinct will soon discover that
constant practice of the faculty of expression, whether in speech or
in writing, is no guarantee for real power of thought; indeed that it
has a tendency to incapacitate men from forming a clear and
decided judgment on any question. The instruction which such men
receive is utterly deficient in solid principles, and it almost always
either presupposes or causes a total absence of fixed convictions.
Most minds thus trained, while skilled in putting other men’s
thoughts into shape, become incapable of distinguishing true from
false in the commonest subjects, even when their own interest
requires it. The people must give up the feeling of blind respect
which leads them to intrust such men with their higher interests.
Reverence for superiors is doubtless indispensable to a well-ordered
state; only it needs to be better guided than it is now.
What then, working men may ask, is the proper training for
themselves, and consequently for those who claim to guide them?
The answer is, systematic cultivation of the Positive spirit. It is
already called into exercise by their daily occupations; and all that is
wanted is to strengthen it by a course of scientific study. Their daily
work involves a rudimentary application of the Positive method: it
turns their attention to many most important natural laws. In fact,
the workmen of Paris, whom I take as the best type of their class,
have a clearer sense of that union of reality with utility by which the
Positive spirit is characterized, than most of our scientific men. The
speciality of their employment is no doubt disadvantageous with
respect to breadth and coherence of ideas. But it leaves the mind
free from responsibility, and this is the most favourable condition for
developing these qualities to which all vigorous intellects are
naturally disposed. But nothing will so strongly impress on the
people the importance of extending and organizing their scientific
knowledge, as their interest in social questions. Their determination
to rectify a faulty condition of society will suggest to them that they
must first know what the laws of Social life really are; knowledge
which is obviously necessary in every other subject. They will then
feel how impossible it is to understand the present state of society,
without understanding its relation on the one hand with the Past,
and on the other with the Future. Their desire to modify the natural
course of social phenomena will make them anxious to know the
antecedents and consequences of these phenomena, so as to avoid
all mischievous or useless interference. They will thus discover that
Political Art is even more dependent than other arts, upon its
corresponding Science. And then they will soon see that this science
is no isolated department of knowledge, but that it involves
preliminary study of Man and of the World. In this way they will pass
downwards through the hierarchic scale of Positive conceptions, until
they come back to the inorganic world, the sphere more immediately
connected with their own special avocations. And thus they will
reach the conclusion that Positivism is the only system which can
satisfy either the intellectual or material wants of the people, since
its subject-matter and its objects are identical with their own, and
since, like themselves, it subordinates everything to social
considerations. All that it claims is to present in a systematic form
principles which they already hold instinctively. By co-ordinating
these principles of morality and good sense, their value, whether in
public or in private questions, is largely increased; and the union of
the two forms of wisdom, theoretical and practical wisdom, is
permanently secured. When all this is understood, the people will
feel some shame at having entrusted questions of the greatest
complexity to minds that have never quite comprehended the
difference between a cubic inch and a cubic foot. As to men of
science, in the common acceptation of the word, who are so
respected by the middle classes, we need not be afraid of their
gaining much influence with the people. They are alienated from
them by their utter indifference to social questions; and before these
their learned puerilities fade into insignificance. Absorbed in the
details of their own special science, they are quite incapable of
satisfying unsophisticated minds. What the people want is to have
clear conceptions on all subjects, des clartés de tout, as Molière has
it. Whenever the savants of our time are drawn by their foolish
ambition into politics, ordinary men find to their surprise that, except
in a few questions of limited extent and importance, their minds
have become thoroughly narrow under the influence of the
specializing system of which they are so proud. Positivism explains
the mystery, by showing that, since the necessity for the specializing
system now no longer exists, it naturally results if prolonged, in a
sort of academic idiocy. During the last three centuries it did real
service to society, by laying down the scientific groundwork for the
renovation of Philosophy projected by Bacon and Descartes. But as
soon as the groundwork was sufficiently finished to admit of the
formation of true Science, that is, of Science viewed relatively to
Humanity, the specializing method became retrograde. It ceased to
be of any assistance to the modern spirit; and indeed it is now,
especially in France, a serious obstacle to its diffusion and systematic
working. The wise revolutionists of the Convention were well aware
of this when they took the bold step of suppressing the Academy of
Sciences. The beneficial results of this statesman-like policy will soon
be appreciated by our workmen. The danger lest, in withdrawing
their confidence from metaphysicians or literary men, they should
fall into the bad scientific spirit, is not therefore very great. With the
social aims which they have in view, they cannot but see that
generality in their conceptions is as necessary as positivity. The
Capitalist class by which industry is directed, being more
concentrated on special objects, will always look on men of pure
science with more respect. But the people will be drawn by their
political leanings towards philosophers in the true sense of that
word. The number of such men is but very small at present; but it
will soon increase at the call of the working classes, and will indeed
be recruited from their ranks.
Moral attitude of This, then, should be the attitude of the
the people. The working class, intellectually. Morally, what is
workman should
regard himself as a
required is, that they should have a sufficient
public functionary sense of the dignity of labour, and that they should
be prepared for the mission that now lies before
them.
The workman must learn to look upon himself, morally, as a
public servant, with functions of a special and also of a general kind.
Not that he is to receive his wages for the future from the State
instead of from a private hand. The present plan is perfectly well
adapted to all services which are so direct and definite, that a
common standard of value can be at once applied to them. Only let
it be understood that the service is not sufficiently recompensed,
without the social feeling of gratitude towards the agent that
performs it. In what are called liberal professions, this feeling
already obtains. The client or patient is not dispensed from gratitude
by payment of his fee. In this respect the republican instincts of the
Convention have anticipated the teaching of philosophy. They valued
the workman’s labour at its true worth. Workmen have only to
imagine labour suppressed or even suspended in the trade to which
they may belong, to see its importance to the whole fabric of
modern society. Their general function as a class, the function of
forming public opinion, and of supporting the action of the spiritual
power, it is of course less easy for them to understand at present.
But, as I have already shown, it follows so naturally from their
character and position, and corresponds so perfectly with their
requirements as a class, that they cannot fail to appreciate its
importance, when the course of events allows, or rather compels
them to bring it into play. The only danger lies in their insisting on
the possession of what metaphysicians call political rights, and in
engaging in useless discussions about the distribution of power,
instead of fixing their attention on the manner in which it is used. Of
this, however, there is no great fear, at all events in France, where
the metaphysical theory of Right has never reached so fanatical a
pitch with the working classes as elsewhere. Ideologists may blame
them, and may use their official influence as they will; but the
people have too much good sense to be permanently misled as to
their true function in society. Deluged as they have been with
electoral votes, they will soon voluntarily abandon this useless
qualification, which now has not even the charm of a privilege.
Questions of pure politics have ceased to interest the people; their
attention is fixed, and will remain fixed, on social questions, which
are to be solved for the most part through moral agencies. That
substitutions of one person or party for another, or that mere
modifications of any kind in the administration should be looked on
as the final issue of the great Revolution, is a result in which they
will never acquiesce.
And if this is to be the attitude of the people, it must be the
attitude no less of those who seek to gain their confidence. With
them, as with the people, political questions should be subordinate
to social questions; and with them the conviction should be even
more distinct, that the solution of social problems depends
essentially on moral agencies. They must, in fact, accept the great
principle of separation of spiritual from temporal power, as the basis
on which modern society is to be prominently organized. So entirely
does the principle meet the wants of the people, that they will soon
insist on its adoption by their teachers. They will accept none who
do not formally abandon any prospects they may have of temporal
power, parliamentary as well as administrative. And by thus
dedicating their lives without reservation to the priesthood of
Humanity, they will gain confidence, not merely from the people, but
from the governing classes. Governments will offer no impediment to
social speculations which do not profess to be susceptible of
immediate application; and thus the normal state may be prepared
for in the future without disturbance, and yet without neglecting the
present. Practical statesmen meanwhile, no longer interfered with by
pretentious sophists, will give up their retrograde tendencies, and
will gradually adapt their policy to the new ideas current in the
public mind, while discharging the indispensable function of
maintaining material order.
Ambition of power For the people to rise to the true level of their
and wealth must be position, they have only to develop and cultivate
abandoned
certain dispositions which already exist in them
spontaneously. And the most important of these is, absence of
ambition for wealth or rank. Political metaphysicians would say that
the sole object of the Great Revolution was to give the working
classes easier access to political and civil power. But this, though it
should always be open to them, is very far from meeting their true
wants. Individuals among them may be benefited by it, but the mass
is left unaffected, or rather is placed often in a worse position, by
the desertion of the more energetic members. The Convention is the
only government by which this result has been properly appreciated.
It is the only government which has shown due consideration for
working men as such; which has recognized the value of their
services, and encouraged what is the chief compensation for their
condition of poverty, their participation in public life. All subsequent
governments, whether retrograde or constitutional, have, on the
contrary, done all they could to divert the people from their true
social function, by affording opportunity for individuals among them
to rise to higher positions. The monied classes, under the influence
of blind routine, have lent their aid to this degrading policy, by
continually preaching to the people the necessity of saving; a
precept which is indeed incumbent on their own class, but not on
others. Without saving, capital could not be accumulated and
administered; it is therefore of the highest importance that the
monied classes should be as economical as possible. But in other
classes, and especially in those dependent on fixed wages,
parsimonious habits are uncalled for and injurious; they lower the
character of the labourer, while they do little or nothing to improve
his physical condition; and neither the working classes nor their
teachers should encourage them. Both the one and the other will
find their truest happiness in keeping clear of all serious practical
responsibility, and in allowing free play to their mental and moral
faculties in public as well as private life. In spite of the Economists,
savings-banks are regarded by the working classes with
unmistakable repugnance. And the repugnance is justifiable; they do
harm morally, by checking the exercise of generous feelings. Again,
it is the fashion to declaim against wine-shops; and yet after all they
are at present the only places where the people can enjoy society.
Social instincts are cultivated there which deserve our approval far
more than the self-helping spirit which carries men to the savings-
bank. No doubt this unconcern for money, wise as it is, involves real
personal risk; but it is a danger which civilization is constantly
tending to diminish, without effacing qualities which do the workman
honour, and which are the source of his most cherished pleasures.
The danger ceases when the mental and moral faculties are called
into stronger exercise. The interest which Positivism will arouse
among the people in public questions, will lead to the substitution of
the club for the wine-shop. In these questions, the generous
inspirations of popular instinct hold out a model which philosophers
will do well to follow themselves. Fondness for money is as much a
disqualification for the spiritual government of Humanity, as political
ambition. It is a clear proof of moral incompetence, which is
generally connected in one way or other with intellectual feebleness.
One of the principal results of the spiritual power exercised by
philosophers and the working classes under the Positivist system,
will be to compensate by a just distribution of blame and praise for
the imperfect arrangements of social rank, in which wealth must
always preponderate. Leaving the present subordination of offices
untouched, each functionary will be judged by the intrinsic worth of
his mind and heart, without servility and yet without any
encouragement to anarchy. It must always be obvious that the
political importance which high position gives, is out of all proportion
to the real merit implied in gaining that position. The people will
come to see more and more clearly that real happiness, so far from
depending on rank, is far more compatible with their own humble
station. Exceptional men no doubt there are, whose character impels
them to seek power; a character more dangerous than useful, unless
there be sufficient wisdom in the social body to turn it to good
account. The best workmen, like the best philosophers, will soon
cease to feel envy for greatness, laden, as it always must be, with
heavy responsibilities. At present, the compensation which I hold out
to them has not been realized; but when it exists, the people will
feel that their spiritual and temporal leaders are combining all the
energies of society for the satisfaction of their wants. Recognizing
this, they will care but little for fame that must be bought by long
and tedious meditation, or for power burdened with constant care.
There are men whose talents call them to these important duties,
and they will be left free to perform them; but the great mass of
society will be well satisfied that their own lot is one far more in
keeping with the constitution of our nature; more compatible with
that harmonious exercise of the faculties of Thought, Feeling, and
Action, which is most conducive to happiness. The immediate
pressure of poverty once removed, the highest reward of honourable
conduct will be found in the permanent esteem, posthumous as it
may be sometimes, of that portion of Humanity which has witnessed
it. In a word the title, servus servorum, which is still retained by the
Papacy from false humility, but which originated in anticipation of a
social truth, is applicable to all functionaries in high position. They
may be described as the involuntary servants of voluntary
subordinates. It is not chimerical to conceive Positivist society so
organized that its theoretical and practical directors, with all their
personal advantages, will often regret that they were not born, or
that they did not remain, in the condition of workmen. The only solid
satisfaction which great minds have hitherto found in political or
spiritual power has been that, being more occupied with public
interests, they had a wider scope for the exercise of social feeling.
But the excellence of the future condition of society will be, that the
possibility of combining public and private life will be open to all. The
humblest citizen will be able to influence not by command but by
counsel, in proportion to his energy and worth.
All the views brought forward in this chapter bear out the
statement with which it began, that the Proletariate forms the
principal basis of the social system, not merely as finally constituted,
but in its present state of transition; and admitting this, the present
state will be seen to have no essential difference from the normal
future to which it tends. The principal conditions of our transitional
policy were described at the conclusion of the last chapter. The
security for these conditions is to be found in the natural tendencies
of the people of Western Europe, and especially of France. Our
governors will do well to follow these tendencies instead of
attempting to lead them; for they are in perfect keeping with the
two great requirements of the present time, Liberty and Public Order.
The working classes
Liberty of thought and speech is enjoyed in
are the best France, and especially in Paris, to an extent
guarantee for impossible in any other country, and it is due
Liberty and for
principally to the intellectual emancipation of our
Order
workmen. They have rid themselves of theology in
all its forms, and yet have not accepted any metaphysical system. At
the same time, though totally devoid at present of systematic
convictions, there is in them a submissiveness of mind which
predisposes them to receive convictions combining reality with utility.
In all other classes there is a tendency to use forcible measures in
spreading their doctrines when discussion fails. It is only to the
people that philosophers can look for the support and extension of
Liberty, which is so essential to their objects; and from this they
derive moral confidence far more reassuring than any legal security.
However reactionary or stationary the views of particular leaders or
sects may be, with such a population as that of Paris, no real
oppression is possible. Of all the claims which France has to the
leadership of Europe, this is the strongest. The resistance which is
still offered to freedom of association and freedom of education will
soon be overcome by the force of its liberal sympathies. A population
of such strong social feeling as ours will certainly not allow itself to
be permanently deprived of the power of meeting together freely in
clubs; institutions most conducive both to its culture and to the
protection of its interests. It will insist with equal force upon perfect
liberty of teaching, feeling deeply the need of solid instruction, and
the incapacity of metaphysicians and theologians to give it. Without
popular pressure, the essential conditions of educational liberty will
always be evaded.
And if Liberty depends upon popular support, Public Order,
whether at home or abroad, depends upon it no less. The
inclinations of the working classes are altogether on the side of
peace. Their strong dislike of war is the principal reason of the
present remarkable tranquillity of Europe. The foolish regret
expressed by all the retrograde parties for the decline of the military
spirit is a sufficient indication of what the popular feeling is; but
even more significant is the necessity for compulsory enlistment,
which began in France and has extended to other parts of Europe.
There has been much factitious indignation on the subject, but at
least it must be allowed, that in our armies the officers are the only
volunteers. Again, the working class is more free than any other
from international prejudices, which still disunite the great family of
Western nations, although they are very much weaker than formerly.
They are strongest in the middle classes, a fact principally due to
industrial competition. But working men feel how similar their wants
and their conditions are in all countries, and this feeling checks their
animosity. And the consciousness of union will become far stronger,
now that the great social problem of their incorporation into modern
society is being raised everywhere. No errors that statesmen can
commit, whether in matters of war or peace, can prevent this from
becoming the preponderating question in every European country;
and thus it tends to preserve their mutual concord.
Popular sympathies of this sort are, it may be said, less
conducive to internal tranquillity than to pacific foreign relations. But
the alarm which is naturally aroused by the spiritual anarchy around
us must not blind us to the real guarantees for Order which popular
tendencies, rightly interpreted, hold out. It is to the people that we
must look for the ascendancy of central over local power, which, as
we have seen, is so indispensable to public order. The executive
authority, provided only that it gives no cause to fear reaction, will
always have their support when opposed by an assembly the
prevalent tendencies of which will usually be adverse to their
interests. They will always turn instinctively to the dictatorial rather
than to the parliamentary branch of the administration; feeling that
from its practical character and the directness of its action, it is more
likely to meet their wants. Useless discussions on constitutional
questions may suit ambitious members of the middle classes, by
facilitating their arrival to power. But the people take very little
interest in all this unmeaning agitation, and often treat it with
merited contempt. They know that it can be of no use to them, and
that its only result is to evade their real wants by undermining the
only authority that can do them justice. Consequently the people are
certain to give their support to every government that deserves it;
especially in France, where political passions have already yielded to
the superior and more permanent interest of social questions. And
while strengthening the government they may do much to elevate its
character; by confining it strictly to its practical function, and
resisting any attempts that it may make to interfere with opinion. In
all these respects the spontaneous influence of the working classes
will be of material assistance in carrying out the systematic
conceptions of social philosophy.
It is from them that But a more striking proof of the political
we shall obtain the influence to be exercised by the people is this. The
dictatorial power
dictatorship which our transitional policy requires
which is
provisionally as long as the spiritual interregnum lasts must
required arise in the first instance from their ranks.
In the word People, especially in the French language, there is a
fortunate ambiguity, which may serve to remind us that the
proletariate class is not, properly speaking, a class at all, but
constitutes the body of society. From it proceed the various special
classes, which we may regard as organs necessary to that body.
Since the abolition of royalty, the last remnant of caste, our political
leaders have been recruited, and will continue to be so, from the
working class. In the normal state, however, it will be required as a
preliminary condition, that the holder of dictatorial power shall have
first received the political training which is given by the exercise of
authority in his own business. In a settled state of society,
Government, strictly so called, is a mere extension of civil influence.
Ultimately, therefore, political power will fall into the hands of the
great leaders of industry. As spiritual reorganization proceeds, they
will gradually become more worthy of it than they are at present.
Besides, the tenure of power will become less burdensome, because
it will be confined to duties of a purely practical kind.
As yet, however, the case is very different; and therefore the
wealthy, though ultimately they will be the administrators of power,
are not those to whom it should as a rule be entrusted in our
present condition. Special departments may be given to them with
advantage, as we have seen proved recently, and that in cases
where the functions to be performed had no relation whatever to
industrial skill. But they are not competent as yet for dictatorial
power, the power which has to supply the place of royalty. Individual
exceptions, of course, there may be, though none have appeared
hitherto, and at least they are not enough for our provisional system
to rely on. As yet the wealthy classes have shown themselves too
debased in thought and feeling for an office of such importance. Nor
do we find greater aptitude for it outside the industrial class.
Scientific men are most assuredly unfit for it, especially in France,
where the system of Academies has narrowed the mind, withered
the feelings, and enervated the character to such an extent, that
most of them fail in the conduct of common life, and are utterly
unworthy of the smallest post of authority, even in their own
department.
All other classes failing us, we have to look to the working class,
which has been left more free to form broad views, and in which the
sense of duty has been better cultivated. On historical grounds I feel
convinced that the workmen of France are more likely than any
other class to supply men competent for supreme power, as long as
the spiritual interregnum lasts; that is, for at least one generation.
On looking at this question calmly and without scholastic or
aristocratic prejudice, it will be seen, as I pointed out at the
beginning of this chapter, that the working class is better situated
than any other with respect to generality of views and generosity of
feeling. In knowledge and experience of administration they would
ordinarily be deficient; they would therefore not be fit for the work
of any special department. But this is no disqualification for the
supreme power, or indeed for any of the higher offices for which
breadth of view rather than special knowledge is required. These
may be filled by working men, whose good sense and modesty will
at once lead them to choose their agents for special departments
from the classes who have usually furnished them before. The
practical character and progressive spirit of such a government being
beyond suspicion, special talent of whatever kind may be made
available, even in the case of men who, if they had been placed in a
higher position, would have proved thoroughly hostile to republican
institutions. Of all the diversified elements of modern society, there
is not one which may not be of real service in assisting the
transition. Among soldiers and magistrates, for instance, there are
many who will join the popular movement, and become sincere
supporters of republicanism. A government of this kind would
tranquillize the people, would obviate the necessity for violent
compressive measures, and would at the same time have a most
beneficial influence on the capitalist class. It would show them the
necessity of attaining to greater purity of feeling and greater breadth
of view, if they are to become worthy of the position for which they
are ultimately destined.
Thus, whether we look at the interests of Public Order, or at
those of Liberty, it appears necessary as a provisional measure,
during the continuance of our spiritual interregnum, that the holders
of dictatorial power shall be chosen from the working class. The
success of a few working men in the pursuit of wealth has exercised
an unsettling influence on the rest; but in the present instance we
need not fear this result. It will be obvious that the career of a
proletary governor is a rare exception, and one which requires
peculiar endowments.
In examining the mode in which this anomalous policy should be
carried out, we must bear in mind the object with which it was
instituted. It is most important to get rid of the custom, based on
motives of self-interest, which has grown up during the last
generation, of insisting on parliamentary experience as an
apprenticeship for executive power; executive power being always
the real object of ambition. We have found from experience what we
might have anticipated on theoretical grounds, that this plan
excludes all except mere talkers of the Girondin type, men totally
devoid of statesman-like qualities. To working men it offers almost
insurmountable obstacles; and even supposing these obstacles to be
overcome, we may be sure that they would lose the
straightforwardness and native vigour which constitute their best
claim to the exceptional position proposed for them.
It is best, then, that they should reach the position assigned to
them at once, without the circuitous process of a parliamentary
career. Our transition towards the normal state will then exhibit its
true character. It will be tranquil and yet decisive; for it will rest on
the combined action of philosophers without political ambition, and
dictators adverse to spiritual encroachment. The teacher who
attempts to govern, the governor who attempts to educate, will both
incur severe public censure, as enemies alike of peace and progress.
The whole result will be a change in our revolutionary condition
identical with that which the Convention would have realized, if, as
its founders contemplated, it had lasted till the Peace.
Such, then, is the nature of the compact into which all true
philosophers should enter with the leading members of the proletary
class. Their object is to direct the organic and final phase through
which the Great Revolution is now passing. What they have to do is
carefully to prolong the provisional system adopted by the
Convention, and to ignore, as far as possible, the traditions of all
succeeding governments, whether stationary or retrograde.
Comprehensiveness of view and social sympathy predominate alike
in both members of this great alliance; and it is thus a guarantee for
our present state of transition, and a sure earnest of the normal
future. The people are the spontaneous representatives of this
alliance; the philosophers its systematic organ. The intellectual
deficiencies of the former will easily be remedied by philosophers,
who will show them how essential it is on social grounds that they
should understand the true meaning of history; since otherwise their
conception of the union of mankind must be limited to the present
generation, ignoring the more important truth of the continuity of
the Present with the Past and the Future. A far greater obstacle is
the moral deficiency of most philosophers of our time. But the
wholesome influence of the people upon them, combined with a
deep philosophic conviction of the preponderance of Feeling in every
subject of thought, will do much to overcome the ambitious instincts
which weaken and distract their energies in the common cause of
social renovation.
CHAPTER IV
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.
ebookultra.com