0% found this document useful (0 votes)
9 views

Kubernetes Programming with Go: Programming Kubernetes Clients and Operators Using Go and the Kubernetes API 1st Edition Philippe Martin download

The document is about the book 'Kubernetes Programming with Go' by Philippe Martin, which focuses on programming Kubernetes clients and operators using Go and the Kubernetes API. It includes details on various chapters covering Kubernetes API introduction, operations, working with API resources in Go, and utilizing common types. The book is available for download, and additional resources related to Kubernetes and programming are also suggested.

Uploaded by

xgdfitsonha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Kubernetes Programming with Go: Programming Kubernetes Clients and Operators Using Go and the Kubernetes API 1st Edition Philippe Martin download

The document is about the book 'Kubernetes Programming with Go' by Philippe Martin, which focuses on programming Kubernetes clients and operators using Go and the Kubernetes API. It includes details on various chapters covering Kubernetes API introduction, operations, working with API resources in Go, and utilizing common types. The book is available for download, and additional resources related to Kubernetes and programming are also suggested.

Uploaded by

xgdfitsonha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

Kubernetes Programming with Go: Programming

Kubernetes Clients and Operators Using Go and


the Kubernetes API 1st Edition Philippe Martin
pdf download
https://ebookmeta.com/product/kubernetes-programming-with-go-
programming-kubernetes-clients-and-operators-using-go-and-the-
kubernetes-api-1st-edition-philippe-martin/

Download more ebook from https://ebookmeta.com


We believe these products will be a great fit for you. Click
the link to download now, or visit ebookmeta.com
to discover even more!

Kubernetes Programming with Go: Programming Kubernetes


Clients and Operators Using Go and the Kubernetes API
1st Edition Philippe Martin

https://ebookmeta.com/product/kubernetes-programming-with-go-
programming-kubernetes-clients-and-operators-using-go-and-the-
kubernetes-api-1st-edition-philippe-martin/

Kubernetes: Preparing for the CKA and CKAD


Certifications Martin

https://ebookmeta.com/product/kubernetes-preparing-for-the-cka-
and-ckad-certifications-martin/

Nonsequential and Distributed Programming with Go.


Christian Maurer

https://ebookmeta.com/product/nonsequential-and-distributed-
programming-with-go-christian-maurer/

Design School Type A Practical Guide for Students and


Designers 1st Edition Richard Poulin

https://ebookmeta.com/product/design-school-type-a-practical-
guide-for-students-and-designers-1st-edition-richard-poulin/
Blockchain Basics 1st Edition Daniel Drescher

https://ebookmeta.com/product/blockchain-basics-1st-edition-
daniel-drescher/

Junie B. Kim and the Imbecilic Malodorous Bus 1st


Edition H.P. Vingerhans

https://ebookmeta.com/product/junie-b-kim-and-the-imbecilic-
malodorous-bus-1st-edition-h-p-vingerhans/

The Power of Individual and Community in Ancient Athens


and Beyond: Essays in Honour of John K. Davies Jan
Haywood (Editor)

https://ebookmeta.com/product/the-power-of-individual-and-
community-in-ancient-athens-and-beyond-essays-in-honour-of-john-
k-davies-jan-haywood-editor/

Immortal Family A Mage s Cultivation Book 6 1st Edition


Bruce Sentar

https://ebookmeta.com/product/immortal-family-a-mage-s-
cultivation-book-6-1st-edition-bruce-sentar/

The Reliability of the Cognitive Mechanism: A Mechanist


Account of Empirical Justification 1st Edition William
J. Talbott

https://ebookmeta.com/product/the-reliability-of-the-cognitive-
mechanism-a-mechanist-account-of-empirical-justification-1st-
edition-william-j-talbott/
Natural History 2nd Edition Dk

https://ebookmeta.com/product/natural-history-2nd-edition-dk/
Kubernetes Programming
with Go
Programming Kubernetes Clients
and Operators Using
Go and the Kubernetes API

Philippe Martin
Kubernetes Programming with Go: Programming Kubernetes Clients and Operators
Using Go and the Kubernetes API

Philippe Martin
Blanquefort, France

ISBN-13 (pbk): 978-1-4842-9025-5 ISBN-13 (electronic): 978-1-4842-9026-2


https://doi.org/10.1007/978-1-4842-9026-2

Copyright © 2023 by Philippe Martin


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the
material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilms or in any other physical way, and transmission or information
storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now
known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with
every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the
trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not
identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to
proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication,
neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or
omissions that may be made. The publisher makes no warranty, express or implied, with respect to the
material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Divya Modi
Development Editor: James Markham
Coordinating Editor: Divya Modi
Copy Editor: Kim Burton Wiseman
Cover designed by eStudioCalamar
Cover image designed by Freepik (www.freepik.com)
Distributed to the book trade worldwide by Springer Science+Business Media New York, 1 New York Plaza,
New York, NY 10004. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail [email protected], or
visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is
Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware
corporation.
For information on translations, please e-mail [email protected]; for reprint,
paperback, or audio rights, please e-mail [email protected].
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and
licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales
web page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available to readers
on GitHub via the book's product page, located at https://github.com/Apress/Kubernetes-Programming-
with-Go-by-Philippe-Martin. For more detailed information, please visit http://www.apress.com/
source-code.
Printed on acid-free paper
To Mélina and Elsa, my constant source of truth
Table of Contents
About the Author��������������������������������������������������������������������������������������������������� xiii

About the Technical Reviewers�������������������������������������������������������������������������������xv


Acknowledgments�������������������������������������������������������������������������������������������������xvii

Introduction������������������������������������������������������������������������������������������������������������xix

Chapter 1: Kubernetes API Introduction������������������������������������������������������������������� 1


Kubernetes Platform at a Glance�������������������������������������������������������������������������������������������������� 1
OpenAPI Specification������������������������������������������������������������������������������������������������������������������� 3
Verbs and Kinds���������������������������������������������������������������������������������������������������������������������������� 5
Group-Version-Resource��������������������������������������������������������������������������������������������������������������� 6
Sub-resources������������������������������������������������������������������������������������������������������������������������������ 8
Official API Reference Documentation������������������������������������������������������������������������������������������ 9
The Deployment Documentation������������������������������������������������������������������������������������������� 10
Operations Documentation���������������������������������������������������������������������������������������������������� 12
The Pod Documentation�������������������������������������������������������������������������������������������������������� 14
One-Page Version of the Documentation������������������������������������������������������������������������������� 15
Conclusion���������������������������������������������������������������������������������������������������������������������������������� 16

Chapter 2: Kubernetes API Operations������������������������������������������������������������������� 17


Examining Requests������������������������������������������������������������������������������������������������������������������� 17
Making Requests������������������������������������������������������������������������������������������������������������������������ 18
Using kubectl as a Proxy������������������������������������������������������������������������������������������������������� 18
Creating a Resource�������������������������������������������������������������������������������������������������������������� 19
Getting Information About a Resource����������������������������������������������������������������������������������� 20
Getting the List of Resources������������������������������������������������������������������������������������������������ 20

v
Table of Contents

Filtering the Result of a List�������������������������������������������������������������������������������������������������� 21


Deleting a Resource�������������������������������������������������������������������������������������������������������������� 26
Deleting a Collection of Resources���������������������������������������������������������������������������������������� 26
Updating a Resource������������������������������������������������������������������������������������������������������������� 27
Managing Conflicts When Updating a Resource�������������������������������������������������������������������� 28
Using a Strategic Merge Patch to Update a Resource����������������������������������������������������������� 32
Applying Resources Server-side�������������������������������������������������������������������������������������������� 38
Watching Resources�������������������������������������������������������������������������������������������������������������� 44
Filtering During a Watch Session������������������������������������������������������������������������������������������� 45
Watching After Listing Resources������������������������������������������������������������������������������������������ 45
Restarting a watch Request�������������������������������������������������������������������������������������������������� 46
Allowing Bookmarks to Efficiently Restart a watch Request������������������������������������������������� 47
Paginating Results����������������������������������������������������������������������������������������������������������������� 50
Getting Results in Various Formats��������������������������������������������������������������������������������������������� 52
Getting Results as a Table����������������������������������������������������������������������������������������������������� 52
Using the YAML Format��������������������������������������������������������������������������������������������������������� 54
Using the Protobuf Format���������������������������������������������������������������������������������������������������� 54
Conclusion���������������������������������������������������������������������������������������������������������������������������������� 55

Chapter 3: Working with API Resources in Go�������������������������������������������������������� 57


API Library Sources and Import�������������������������������������������������������������������������������������������������� 57
Content of a Package������������������������������������������������������������������������������������������������������������������ 58
types.go��������������������������������������������������������������������������������������������������������������������������������� 58
register.go������������������������������������������������������������������������������������������������������������������������������ 59
doc.go������������������������������������������������������������������������������������������������������������������������������������ 60
generated.pb.go and generated.proto����������������������������������������������������������������������������������� 60
types_swagger_doc_generated.go��������������������������������������������������������������������������������������� 60
zz_generated.deepcopy.go���������������������������������������������������������������������������������������������������� 61
Specific Content in core/v1��������������������������������������������������������������������������������������������������������� 61
ObjectReference�������������������������������������������������������������������������������������������������������������������� 61
ResourceList�������������������������������������������������������������������������������������������������������������������������� 62
Taint��������������������������������������������������������������������������������������������������������������������������������������� 64

vi
Table of Contents

Toleration������������������������������������������������������������������������������������������������������������������������������� 65
Well-Known Labels���������������������������������������������������������������������������������������������������������������� 66
Writing Kubernetes Resources in Go������������������������������������������������������������������������������������������ 67
Importing the Package���������������������������������������������������������������������������������������������������������� 67
The TypeMeta Fields�������������������������������������������������������������������������������������������������������������� 68
The ObjectMeta Fields����������������������������������������������������������������������������������������������������������� 69
Spec and Status�������������������������������������������������������������������������������������������������������������������� 76
Comparison with Writing YAML Manifests����������������������������������������������������������������������������� 76
A Complete Example������������������������������������������������������������������������������������������������������������������� 78
Conclusion���������������������������������������������������������������������������������������������������������������������������������� 83

Chapter 4: Using Common Types���������������������������������������������������������������������������� 85


Pointers��������������������������������������������������������������������������������������������������������������������������������������� 85
Getting the Reference of a Value������������������������������������������������������������������������������������������� 85
Dereferencing a Pointer��������������������������������������������������������������������������������������������������������� 86
Comparing Two Referenced Values��������������������������������������������������������������������������������������� 86
Quantities������������������������������������������������������������������������������������������������������������������������������������ 87
Parsing a String as Quantity�������������������������������������������������������������������������������������������������� 87
Using an inf.Dec as a Quantity����������������������������������������������������������������������������������������������� 88
Using a Scaled Integer as a Quantity������������������������������������������������������������������������������������� 89
Operations on Quantities������������������������������������������������������������������������������������������������������� 90
IntOrString����������������������������������������������������������������������������������������������������������������������������������� 90
Time�������������������������������������������������������������������������������������������������������������������������������������������� 92
Factory Methods�������������������������������������������������������������������������������������������������������������������� 92
Operations on Time���������������������������������������������������������������������������������������������������������������� 92
Conclusion���������������������������������������������������������������������������������������������������������������������������������� 93

Chapter 5: The API Machinery�������������������������������������������������������������������������������� 95


The Schema Package����������������������������������������������������������������������������������������������������������������� 96
Scheme��������������������������������������������������������������������������������������������������������������������������������������� 97
Initialization��������������������������������������������������������������������������������������������������������������������������� 98
Mapping������������������������������������������������������������������������������������������������������������������������������� 100

vii
Table of Contents

Conversion��������������������������������������������������������������������������������������������������������������������������� 101
Serialization������������������������������������������������������������������������������������������������������������������������� 103
RESTMapper����������������������������������������������������������������������������������������������������������������������������� 105
Kind to Resource����������������������������������������������������������������������������������������������������������������� 106
Resource to Kind����������������������������������������������������������������������������������������������������������������� 107
Finding Resources��������������������������������������������������������������������������������������������������������������� 107
The DefaultRESTMapper Implementation���������������������������������������������������������������������������� 107
Conclusion�������������������������������������������������������������������������������������������������������������������������������� 108

Chapter 6: The Client-go Library��������������������������������������������������������������������������� 109


Connecting to the Cluster��������������������������������������������������������������������������������������������������������� 110
In-cluster Configuration������������������������������������������������������������������������������������������������������� 110
Out-of-Cluster Configuration����������������������������������������������������������������������������������������������� 110
Getting a Clientset��������������������������������������������������������������������������������������������������������������������� 115
Using the Clientset�������������������������������������������������������������������������������������������������������������������� 116
Examining the Requests����������������������������������������������������������������������������������������������������������� 119
Creating a Resource������������������������������������������������������������������������������������������������������������������ 120
Getting Information About a Resource�������������������������������������������������������������������������������������� 122
Getting List of Resources���������������������������������������������������������������������������������������������������������� 123
Filtering the Result of a List������������������������������������������������������������������������������������������������������ 125
Setting LabelSelector Using the Labels Package���������������������������������������������������������������� 125
Setting Fieldselector Using the Fields Package������������������������������������������������������������������ 128
Deleting a Resource������������������������������������������������������������������������������������������������������������������ 130
Deleting a Collection of Resources������������������������������������������������������������������������������������������� 133
Updating a Resource����������������������������������������������������������������������������������������������������������������� 134
Using a Strategic Merge Patch to Update a Resource�������������������������������������������������������������� 135
Applying Resources Server-side with Patch����������������������������������������������������������������������������� 138
Server-side Apply Using Apply Configurations�������������������������������������������������������������������������� 140
Building an ApplyConfiguration from Scratch���������������������������������������������������������������������� 142
Building an ApplyConfiguration from an Existing Resource������������������������������������������������ 143

viii
Table of Contents

Watching Resources����������������������������������������������������������������������������������������������������������������� 145


Errors and Statuses������������������������������������������������������������������������������������������������������������������ 149
Definition of the metav1.Status Structure��������������������������������������������������������������������������� 149
Error Returned by Clientset Operations������������������������������������������������������������������������������� 153
RESTClient�������������������������������������������������������������������������������������������������������������������������������� 154
Building the Request����������������������������������������������������������������������������������������������������������� 154
Executing the Request��������������������������������������������������������������������������������������������������������� 161
Exploiting the Result������������������������������������������������������������������������������������������������������������ 161
Getting Result as a Table����������������������������������������������������������������������������������������������������������� 162
Discovery Client������������������������������������������������������������������������������������������������������������������������ 164
RESTMapper����������������������������������������������������������������������������������������������������������������������������� 165
PriorityRESTMapper������������������������������������������������������������������������������������������������������������ 165
DeferredDiscoveryRESTMapper������������������������������������������������������������������������������������������ 167
Conclusion�������������������������������������������������������������������������������������������������������������������������������� 167

Chapter 7: Testing Applications Using Client-go�������������������������������������������������� 169


Fake Clientset��������������������������������������������������������������������������������������������������������������������������� 170
Checking the Result of the Function������������������������������������������������������������������������������������ 171
Reacting to Actions�������������������������������������������������������������������������������������������������������������� 173
Checking the Actions����������������������������������������������������������������������������������������������������������� 177
Fake REST Client����������������������������������������������������������������������������������������������������������������������� 185
FakeDiscovery Client���������������������������������������������������������������������������������������������������������������� 188
Stubbing the ServerVersion������������������������������������������������������������������������������������������������� 189
Actions��������������������������������������������������������������������������������������������������������������������������������� 190
Mocking Resources������������������������������������������������������������������������������������������������������������� 190
Conclusion�������������������������������������������������������������������������������������������������������������������������������� 191

Chapter 8: Extending Kubernetes API with Custom Resources Definitions���������� 193


Performing Operations in Go����������������������������������������������������������������������������������������������������� 194
The CustomResourceDefinition in Detail����������������������������������������������������������������������������������� 195
Naming the Resource���������������������������������������������������������������������������������������������������������� 196
Definition of the Resource Versions������������������������������������������������������������������������������������� 197
Converting Between Versions���������������������������������������������������������������������������������������������� 198
ix
Table of Contents

Schema of the Resource����������������������������������������������������������������������������������������������������������� 199


Deploying a Custom Resource Definition���������������������������������������������������������������������������������� 201
Additional Printer Columns������������������������������������������������������������������������������������������������������� 204
Conclusion�������������������������������������������������������������������������������������������������������������������������������� 207

Chapter 9: Working with Custom Resources�������������������������������������������������������� 209


Generating a Clientset��������������������������������������������������������������������������������������������������������������� 209
Using deepcopy-gen������������������������������������������������������������������������������������������������������������ 211
Using client-gen������������������������������������������������������������������������������������������������������������������ 213
Using the Generated Clientset��������������������������������������������������������������������������������������������� 216
Using the Generated fake Clientset������������������������������������������������������������������������������������� 217
Using the Unstructured Package and Dynamic Client��������������������������������������������������������������� 217
The Unstructured Type��������������������������������������������������������������������������������������������������������� 217
The UnstructuredList Type��������������������������������������������������������������������������������������������������� 221
Converting Between Typed and Unstructured Objects�������������������������������������������������������� 223
The Dynamic Client�������������������������������������������������������������������������������������������������������������� 223
Conclusion�������������������������������������������������������������������������������������������������������������������������������� 229

Chapter 10: Writing Operators withthe Controller-­Runtime Library��������������������� 231


The Manager����������������������������������������������������������������������������������������������������������������������������� 232
The Controller��������������������������������������������������������������������������������������������������������������������������� 235
Creating a Controller����������������������������������������������������������������������������������������������������������� 236
Watching Resources������������������������������������������������������������������������������������������������������������ 237
A First Example������������������������������������������������������������������������������������������������������������������� 241
Using the Controller Builder������������������������������������������������������������������������������������������������ 244
A Second Example Using the ControllerBuilder������������������������������������������������������������������� 245
Injecting Manager Resources into the Reconciler��������������������������������������������������������������� 247
Using the Client������������������������������������������������������������������������������������������������������������������������� 250
Getting Information About a Resource��������������������������������������������������������������������������������� 250
Listing Resources���������������������������������������������������������������������������������������������������������������� 251
Creating a Resource������������������������������������������������������������������������������������������������������������ 254
Deleting a Resource������������������������������������������������������������������������������������������������������������ 254

x
Table of Contents

Deleting a Collection of Resources�������������������������������������������������������������������������������������� 255


Updating a Resource����������������������������������������������������������������������������������������������������������� 256
Patching a Resource������������������������������������������������������������������������������������������������������������ 256
Updating the Status of a Resource�������������������������������������������������������������������������������������� 259
Patching the Status of a Resource�������������������������������������������������������������������������������������� 260
Logging������������������������������������������������������������������������������������������������������������������������������������� 261
Verbosity������������������������������������������������������������������������������������������������������������������������������ 262
Predefined Values���������������������������������������������������������������������������������������������������������������� 262
Logger Name����������������������������������������������������������������������������������������������������������������������� 262
Getting the Logger from Context����������������������������������������������������������������������������������������� 263
Events��������������������������������������������������������������������������������������������������������������������������������������� 263
Conclusion�������������������������������������������������������������������������������������������������������������������������������� 265

Chapter 11: Writing the Reconcile Loop��������������������������������������������������������������� 267


Writing the Reconcile Function������������������������������������������������������������������������������������������������� 268
Checking Whether the Resource Exists������������������������������������������������������������������������������� 268
Implementing the Reconciled Resource������������������������������������������������������������������������������ 268
Simple Implementation Example����������������������������������������������������������������������������������������� 270
Conclusion�������������������������������������������������������������������������������������������������������������������������������� 275

Chapter 12: Testing the Reconcile Loop��������������������������������������������������������������� 277


The envtest Package����������������������������������������������������������������������������������������������������������������� 277
Installing envtest Binaries��������������������������������������������������������������������������������������������������� 277
Using envtest����������������������������������������������������������������������������������������������������������������������� 278
Defining a ginkgo Suite������������������������������������������������������������������������������������������������������������� 279
Writing the Tests����������������������������������������������������������������������������������������������������������������������� 283
Test 1����������������������������������������������������������������������������������������������������������������������������������� 284
Test 2����������������������������������������������������������������������������������������������������������������������������������� 285
Test 3����������������������������������������������������������������������������������������������������������������������������������� 285
Test 4����������������������������������������������������������������������������������������������������������������������������������� 285
Conclusion�������������������������������������������������������������������������������������������������������������������������������� 290

xi
Table of Contents

Chapter 13: Creating an Operator with Kubebuilder�������������������������������������������� 291


Installing Kubebuilder��������������������������������������������������������������������������������������������������������������� 291
Creating a Project��������������������������������������������������������������������������������������������������������������������� 291
Adding a Custom Resource to the Project�������������������������������������������������������������������������������� 293
Building and Deploying Manifests�������������������������������������������������������������������������������������������� 295
Running the Manager Locally��������������������������������������������������������������������������������������������������� 295
Personalizing the Custom Resource����������������������������������������������������������������������������������������� 296
Editing the Go Structures���������������������������������������������������������������������������������������������������� 297
Enabling the Status Subresource���������������������������������������������������������������������������������������� 297
Defining Printer Columns����������������������������������������������������������������������������������������������������� 297
Regenerating the Files�������������������������������������������������������������������������������������������������������� 298
Implementing the Reconcile Function�������������������������������������������������������������������������������������� 299
Adding RBAC Annotations��������������������������������������������������������������������������������������������������������� 299
Deploying the Operator on the Cluster�������������������������������������������������������������������������������������� 300
Creating a New Version of the Resource����������������������������������������������������������������������������������� 301
Defining a New Version������������������������������������������������������������������������������������������������������� 302
Implementing Hub and Convertible������������������������������������������������������������������������������������� 303
Setting Up the webhook������������������������������������������������������������������������������������������������������ 305
Updating kustomization Files���������������������������������������������������������������������������������������������� 306
Using Various Versions�������������������������������������������������������������������������������������������������������� 306
Conclusion�������������������������������������������������������������������������������������������������������������������������������� 308

Index��������������������������������������������������������������������������������������������������������������������� 309

xii
About the Author
Philippe Martin has been working with Kubernetes for
five years, first by creating an Operator to deploy video
CDNs into the cloud, later helping companies deploy their
applications into Kubernetes, then writing a Client to help
developers work in a Kubernetes environment. Philippe
has passed the CKAD, CKA, and CKS certifications. He has
extensive experience with distributed systems and open-
source software: he started his career 20 years ago creating
thin clients based on the Linux kernel and open-­source
components. He is currently working at Red Hat on the
Development Tools team.
Philippe has been active in the development of Kubernetes, especially its
documentation, and participates in the translation of the official documentation into
French, has edited two reference books about the Kubernetes API and kubectl, and is
responsible for the French translation of the Kubernetes Dashboard. He participated in
Google Season of Docs to create the new Kubernetes API Reference section of the official
documentation and is maintaining it.

xiii
About the Technical Reviewers
Bartosz Majsak writes code for fun and profit while proudly
wearing a red fedora (also known as the Red Hat). He has
been long-time open-source contributor and Java developer
turned into Golang aficionado. Bartosz is overly enthusiastic
about coffee, open source, and speaking at conferences,
not necessarily in that order. One thing that perhaps proves
he is not a total geek is his addiction to alpine skiing (and
running).

Prasanth is a Blockchain Certified Professional, Professional


Scrum Master, and Microsoft Certified Trainer who is
passionate about helping others learn how to use and gain
benefits from the latest technologies. He is a thought leader
and practitioner in Blockchain, Cloud, and Scrum. He also
handles the Agile Methodology, Cloud, and Blockchain
technology community initiatives within TransUnion
through coaching, mentoring, and grooming techniques.
Prasanth is an adjunct professor and a technical speaker.
He was selected as a speaker at the China International
Industry Big Data Expo 2018 by the Chinese government and also was invited to the
International Blockchain Council by the Government of Telangana and Goa. In addition,
he received accolades from the Chinese government for his presentation at China
International Industry Big Data Expo 2018. Prasanth has published his Patent, entitled
“Digital Educational Certificate Management System Using IPFS-Based Blockchain.”
To date, he has interacted extensively, reaching more than 50,000 students,
mostly within the technical domain. Prasanth is a working group member of the
CryptoCurrency Certification Consortium, the Scrum Alliance, the Scrum Organization,
and the International Institute of Business Analysis.

xv
Acknowledgments
I would like to thank the whole Anevia “CDN” team who started working with me on
Kubernetes back in 2018: David, Ansou, Hossam, Yassine, Étienne, Jason, and Michaël.
Special thanks to Damien Lucas for initiating this project and for having trusted us with
this challenge.
My discovery of Kubernetes has been much easier and pleasant thanks to the TGIK
channel and its numerous episodes, hosted by Joe Beda, Kris Nova, and many others.
Plus, thanks to all the Kubernetes community for such a great ecosystem!

xvii
Another Random Scribd Document
with Unrelated Content
Grant Made:[275]
(a) Not Dependent (probably):
Domestic servant; age 68. Granted $150. No information could be obtained in
1909.
Domestic servant; age 35. Granted $75 for an operation. Self-supporting.
Cook; age 66. Granted $50. No information could be obtained in 1909.
Housewife; age 50. Granted $75 for washing machine. Ejected from Ingleside.
Small amount for current expenses.
Cannery clerk; age 61. Granted $20, and later $75, to go to hospital and then
to the country. Now with friends.
Plasterer; age 56. Granted $50. Later arrested and in jail three months.
Peddler; age 54. Granted $60 and a free license. No information obtained in
1909.
Carpenter; age 32. Tuberculous. Granted $300 to go a warmer climate. Now
recovering.

(b) Dependent:
Cook; age 61. Living on savings before fire. Granted $100. Later assisted by A.
C. In Relief Home.
Seamstress; age 59. Granted $100. Assisted by private charity.
Bookkeeper; age 65. Granted $100. In Home for the Aged.
Janitress; age 50. Granted $50. Sent to hospital.
Domestic servant; age 38. Granted $75. Partially self-supporting; in and out of
Relief Home.
Nurse; age 78. Granted $200. Went to niece. Assisted by several charities.
Housewife; age 95. Granted $25 and later $125. In Home for the Aged.
Rooming-house keeper; age 72. Granted $75. Went to hospital. Assisted by
private charity.
Nurse; age 65. Granted $100. In Relief Home.
Cloak maker; age 65. Granted $100. Assisted by charity. In Relief Home.
Housewife; age 81. Granted $140 in instalments. In Relief Home.
Dressmaker; age 57. Granted $100 and sewing machines. In Relief Home.
House worker; age 60. Granted $100 and truss. In Relief Home.
Seamstress; age 65. Granted $125 and sewing machine. In Relief Home.
Peddler; age 60. Granted $20. In Relief Home.

(c) Dead:
Seamstress; age 75. Granted $150 in instalments. Died September, 1907.
Nurse; age 79. Granted $100 “till well enough to work.” Died April, 1908.
Janitor; age 58. Granted $50 for stove and bedding. Died February, 1907.
Lecturer on psychology; age 70. Granted $75 and transportation to San Diego.
In Relief Home. Died 1908.
Housewife; age 67. Granted $150. Went to relatives. Died 1907.
Grant Refused:
Seamstress; age 36. Because earning $12 per week.
Nurse; age 64. In need of permanent care. Died in Relief Home June, 1909.
Chambermaid; age 70. In need of permanent care.
Children’s nurse; age 73. In need of permanent care. In Relief Home.
Domestic servant; age 70. Asked for money to pursue invalid claim to property.

No Action—Check Canceled:
Housewife; age 55. Could not be found by visitor.
Dressmaker; age 73. Granted $100 and sewing machine. Could not be found.
Cannery worker; age 40. Granted $75. Could not be found by visitor. Assisted
later by Associated Charities to go to the country.
Maker of knitted articles; age 68. Granted $100 and sewing machine. Drank to
excess. In Relief Home.

[275] No information is available as to occupation, age, or present status of


one of the 29 persons to whom grants were made.

Hospital Care. The small group of 11 persons who applied for


hospital care, were of the same general character. Illnesses of a
serious nature required special treatment either at Ingleside or other
institution. Two of the 11 were sent to an insane asylum, two died at
Ingleside, and five were in homes for the infirm. Two became self-
supporting.
General Relief. There remains a heterogeneous group of
applicants for general relief, most of whom asked for money for living
expenses, or for such inexpensive things as false teeth, trusses, and
spectacles. Of the 50 persons who applied for general relief, 20 were
refused. The total amount paid out in grants to the remaining 30 was
$1,735.70.
Three years after the grants were made 10 of these persons, five
of whom received less than $25 each, were believed to be
independent, 15 were in the Relief Home, one was dependent on
other charity, and four were dead.

2. Between April, 1907, and April, 1909, 68 persons who had


been at Ingleside Model Camp at some time, in addition to the 14
persons in the seven families already considered in Table 119 and on
page 342, applied to the Associated Charities.[276] Since these 68
persons did not apply to the Corporation during the first year after the
fire they must either have gone from Ingleside to friends or must
have expected to be self-supporting. More than half of them were
over fifty years of age and nearly all were more or less incapacitated;
in short, they do not seem to have differed from those who before the
fire found their way to the almshouse. On April 18, 1909, 39 of these
were in the Relief Home, four were in asylums or hospitals, four had
left the city, and three were self-supporting. With regard to 18
persons of this group no information could be obtained.
[276] See Table 119, p. 336.

3. The most conspicuous thing about those who did not apply for
rehabilitation, both men and women, is their high proportion of
disabilities, a proportion even higher than that of the applicants. Of
the 585 non-applicants among the single or widowed men and
women,[277] no less than 330, 56 per cent, were infirm or crippled, or
needed special care for some reason. Table 121 shows the nature of
their disabilities.
[277] See Table 119, p. 336.

TABLE 121.—DISABLED SINGLE AND WIDOWED INMATES OF


INGLESIDE MODEL CAMP WHO DID NOT APPLY FOR
REHABILITATION, BY SEX AND NATURE OF DISABILITY

NON-APPLICANTS
WITH EACH
Nature of SPECIFIED
disability DISABILITY
Wo-
Men Total
men
Infirm or crippled persons:
Too infirm to work 33 .. 33
Lame or crippled 19 11 30
Feeble .. 21 21
Without one leg or one arm 19 .. 19
Blind or very deaf 9 6 15
Paralyzed 11 1 12
Bed-ridden .. 3 3
Total 91 42 133
Persons needing special care:
Sick 44 23 67
Normally convalescent 31 17 48
Injured in accidents 33 2 35
Senile or demented 16 .. 16
Severely rheumatic 15 4 19
Tubercular 4 8 12
Total 143 54 197
Grand total 234 96 330

Four-fifths of the 585 non-applicants were over fifty years of age.


Nevertheless, they applied for no relief other than shelter for a longer
or shorter time at Ingleside. Their neglect to make application for
rehabilitation may be set down in a great measure to the want of
initiative due to infirmity (more than one-seventh of the number have
since died), and to the apathy that comes to the inevitable institution
inmate. In 1909 one-third of this group were in the Relief Home or in
some other charitable refuge. But the margin of over one-third of the
remainder whose condition was known, who went to work or to
friends and were not as yet dependent on charity, is surprisingly large.
Table 122 shows what became of the non-applicants as far as the
facts are known.

TABLE 122.—SUBSEQUENT HISTORY OF SINGLE AND WIDOWED


INMATES OF INGLESIDE MODEL CAMP, WHO DID NOT APPLY FOR
REHABILITATION BY SEX

INMATES WHOSE
HISTORY WAS
Subsequent AS SPECIFIED
history
Wo-
Men Total
men
Died within one year of admission to Ingleside 31 16 47
Died within three years of admission to Ingleside 33 11 44
Went to work or to friends or relatives 83 25 108
Now in charitable institutions 124 70 194
No information available 154 38 192
Total 425 160 585

It is highly suggestive that a very large proportion of those who


went to work or to friends or relatives left in January, 1908, when
Ingleside was about to be closed and all the inmates removed to the
Relief Home. When the final alternative was presented to go
permanently to an institution or to find some other home, they were
able to make the latter choice. Most of them belonged to the
wandering labor classes which find no hardship so great as the
monotonous, comfortable life of an orderly institution where thorough
discipline is maintained. The Relief Home was, fortunately, located
beyond the city a mile from any car line. It was far removed from the
bustle and the sensational diversions which were so pleasantly
accessible to the lazy and the semi-vicious at Ingleside. The mere
limitation of the right to go in and out freely was so irksome that
many chose to take their chance in the world again rather than go
where they must ask for a pass.

(c) Applicants Who Had Never Been at Ingleside


Mention has already been made, page 325, of the fact that
between 100 and 200 persons left the almshouse shortly after the
fire, most of them presumably going to the camps and posing as
refugees. Besides these there were 27 applicants for relief who,
although not in the almshouse at the time of the fire, had been there
one or more times, one of them 16 times, in the eight years previous.
In most instances the Rehabilitation Committee had no means of
knowing that these people were former almshouse inmates, and the
grants were made merely on the ground of old age. The more
important details concerning this group of 27, none of whom were at
Ingleside, are as follows:
To 13 persons relief was granted in sums ranging from $15 to
$125, and six of these were believed to be non-dependent in 1909,
while seven were in the Relief Home. Grants were refused to nine
applicants; eight of these required such care and supervision as that
provided in the Relief Home, and the ninth, who was an opium taker,
was aided by a sister. Checks were canceled in three cases: one,
because other relief was given; another, because the applicant was
found to be a drunkard; and the third, because the money had been
paid to the wrong person. In the two remaining cases of the 27 no
action was taken.
It is surprising to find that the 13 cases in which relief was
granted average ten years younger than the Ingleside cases. They
were either persons who had gone in former years to the almshouse
to convalesce after illness, as was customary with those discharged
from the City and County hospital, or persons who had some physical
or mental disability that made it difficult to keep employment. Most of
the others who were not in the Relief Home in April, 1909, if they live
will probably come back there. Of the 14 applicants who did not
receive aid, nine were in the Relief Home three years after the
disaster or had died there.
One last group of the aged and handicapped remains to be
mentioned,—35 applicants who had been neither in the almshouse
nor at Ingleside, but who arrived at the Relief Home between April,
1908, and April, 1909. These had been able to hold out until then
against the ravages of age, disease, incapacity, and misfortune. A few,
a very few, were again independent of relief three years after the
grant was made, but of the remainder, 21 were still in the Relief Home
or other charitable institutions, and nine had either left the city or had
died.

III
RESULTS

T
he final important question to be considered in this study of relief
of the aged and infirm is: What proportion of the aged and
infirm persons in the Relief Home in April, 1909, were there
solely because of the earthquake and fire of April 18, 1906? To
answer this question one must know the proportion between the total
population of San Francisco and the aged and infirm in the almshouse
for some time previous to 1906.

TABLE 123.—PROPORTION OF ALMSHOUSE INMATES AND OF


ALMSHOUSE ADMISSIONS TO TOTAL POPULATION, SAN
FRANCISCO, 1890, 1900, 1905, AND 1909

Admissions
Almshouse Admission
Population Average to
inmates to
of city and number of almshouse
Year per almshouse
county of almshouse per
1,000 of during
San Francisco inmates 1,000 of
population year
population
1890 298,997 736 2.5 560 1.9
1900 342,782 947 2.8 670 2.0
1905 379,847[278] 890 2.3 773 2.0
1909 409,499[278] 1,295 3.2 816 2.0

[278] Estimated.

It seems fair to assume that the disaster was responsible, at least


in part, for the increase of the proportion of almshouse inmates in the
population from 2.3 per 1,000 in 1905 to 3.2 per 1,000 in 1909. The
fact that in 1909 the number of admissions was not higher indicates
that already as regards this class the abnormal conditions resulting
from the fire were passing away. The high death rate would shortly
reduce the Relief Home population almost to its normal proportion.
[279]

[279] Between 1900 and 1905 the inmates of the almshouse went in and
out much more freely than they do now at the Relief Home, but the effect
on the average number present is impossible to calculate.

The increase, from 1904-05 to 1909, in the relative number of


almshouse inmates in the population must not be attributed wholly to
the disaster. The condemnation of the unsanitary City and County
Hospital threw a part of the burden of its chronic cases on the Relief
Home. The shock of the disaster to highly nervous and ill-balanced
persons doubtless produced insanity in a number of cases. As the
state insane hospitals were already overcrowded, the least
troublesome found refuge in the Relief Home. But perhaps the most
important factor in producing this charitable burden was the general
disorganization of industry in the years 1907-08, due to a street-car
strike in San Francisco and to the financial panic. The slow recovery of
certain industries caused by the exorbitant cost of building was
perceptibly checked. The result was that only young and able-bodied
men could get work. Old and semi-able men who would in normal
times have continued for several years to make a bare living, could
find no work after the brick cleaning was done. This economic
stagnation accounts for the failure of some who were given tools, or
small grants to set up little shops or buy stock to peddle. The buying
capacity of the laboring class, their prospective patrons, was greatly
diminished.
Finally, the number of the aged and the infirm in the Relief Home
was increased by those sent from a number of the private charities
whose buildings were burned or whose funds were lessened. The
private charitable agencies were the more inclined to disburden
themselves as the new institution was so attractive. As one of the
employes put it: “If the city furnishes clean steam-heated rooms,
three hot meals a day, electric lights, and every convenience, the
place will always be full. Lots of people in the Relief Home never had
so much before.” The new institution at its dedication was advertised
to set a high standard of care. The maintenance of this standard by
the superintendent drew to it, undoubtedly, some who formerly would
not have applied for admission.
Since the variations in the numbers of the old almshouse inmates
registered the increase due to the industrial stagnation following the
labor agitation and the panic of 1893, it is reasonable to conclude that
the several circumstances described above had increased the number
of the inmates in the Relief Home as much as had the disaster of April
18, 1906.
An interesting question, growing out of the coalescence in the
Relief Home of the Ingleside refugee group with the old almshouse
population, is the comparative social standing of the two groups.
Were the Ingleside inmates potential almshouse inmates or were they
such as would not have arrived there but for a great and wholly
impersonal misfortune? The “refugees” maintained in the Relief Home
a class identity and were particular to insist that they were not like
“the old almshouse people.” It has been pointed out[280] that there
was a group at Ingleside whose occupations and general history
marked them as belonging to a somewhat more skilful and resourceful
class than the rest. Such of these as went to the Relief Home
continued to be superior and exceptional, but far the larger number
were precisely of the same human stuff as the interminable
procession that had for forty years been entering the almshouse. On
this point the testimony of employes who were in charge at Ingleside
and later at the Relief Home was nearly unanimous and quite
conclusive. They agreed that three-fourths of these refugees were
“almshouse types” and would have reached an almshouse in a few
years; and that some of the others, of rather better education and
character, would have been cared for in private charitable institutions,
or by children and relatives who because of the fire were too poor to
take them. It is pointed out that these last if they shared the poverty
of their kindred would have been far less comfortable than in the
Home.
[280] See Part VI, p. 333.

One clear distinction between the almshouse people and the


refugees is a difference of temper. During the relief period the
refugees got the idea that there were “millions for relief,” in which
they had a “just and equal share,” and that as the Relief Home was
built for them they had exceptional rights in it as victims of
misfortune. They were, therefore,—the women especially,—more
exacting, lazy, and termagant than the old-time inmates. Ingleside
has been described as “one long vacation picnic” where they had
varied and abundant food, very little work and, to satisfy their
gregarious instincts, continuous gossip. Those who had become
accustomed to the freedom of the camps were consequently more
incorrigible as well as more able-bodied than the almshouse inmates,
and were never bound by such necessary rules of labor and discipline
as existed there.
It has already been demonstrated[281] that so far as age,
proportion of the sexes, marital condition, and nativity are concerned,
at least four-fifths of the refugees at Ingleside did not differ
essentially from the inmates of the San Francisco almshouse.
Collateral information corroborates this conclusion. The rents they had
paid and the wages they had received before the fire were rarely
above those common to the unskilled laboring classes, while the
streets they had lived in were in the districts familiar to charity visitor
and settlement worker. It may be concluded upon these facts that not
more than one-sixth of the Ingleside refugees, at most 200 persons,
were of the more fortunate and resourceful sort who but for some
extraordinary disaster would never have become dependent.
[281] See Tables 114-116, pp. 329-331.

Before undertaking to estimate the work of the Rehabilitation


Committee in relation to the aged and infirm it is imperative to make
clear the characteristics of the different classes with which they had to
deal. The problems of the helpless, the very old, and the very young,
stand apart. But the destiny of old people cannot, like that of children,
be determined solely by the will of others, for self-will increases rather
than diminishes with the approach of senility. So long as the old are
on their feet in the world, whatever plans are made, whatever relief is
proposed, may be set at naught. They cannot be imprisoned unless
positively vicious, nor be refused relief, because the humane standard
requires that age, however unlovely, shall be kindly treated.
There were at Ingleside 70[282] unruly, immoral, drunken people,
who had to be ejected but who returned again and again by way of
the jail and the hospital to ask assistance. To such as these only food
and shelter could safely be given. In the Relief Home they were
relegated to “The Last Chance,” the name given by the residents to
the building for senile incorrigibles. Some were in their second infancy
and behaved like filthy animals, others had senile dementia and
“imagined violence like children,” accusing the nurses of stealing from
them and of starving them, yet it would have been impossible to get
them committed for insanity. Still others who came and went from
Ingleside and who went in and out of the Relief Home as often as
permitted, became insane with rage whenever they were crossed.
Angry at some trifle, they would rave by the hour; but if locked up or
deprived of some privilege they would gradually recover self-control
and be quiet for weeks until crossed again. It would have been
impossible for them to live in a family even of their own relatives. It
was all but impossible to care for them in the institution until their
vigor was depleted enough to make them stationary.
[282] See Part VI, p. 325.

Another class is the wanderers, in all stages of senile dementia.


Some were intelligent enough to apply for relief but wandered from
Ingleside, could not be found by the visitors, and turned up later in
the Relief Home. A few were promised grants but never claimed the
checks. Those in the Relief Home got lost, could not remember where
their rooms were, or now and then climbed the barbed-wire fence and
ran away. Although for their proper care the same precautions were
needed as at a prison, neither Ingleside Model Camp nor the Relief
Home could be so organized. Every person had the legal right to
come and go from the Relief Home at will. Some of the relatively able-
bodied would go out to visit acquaintances or relatives, to beg a little,
to work a little, or even to pawn their clothes, and after drinking up
the money obtained, return exhausted or filthy to recuperate in the
Home. The same may be said of the one-third of the inmates who
were entered in the records as drinking or drunkards. Many of them
combined with intemperance some other infirmity. For our purpose,
however, it is immaterial whether they began to drink as a result of
physical debility or whether they were sick because of drunkenness.
In either case, it was very nearly hopeless to give them money for
rehabilitation. A number are known to have wasted their grants in
drink.
See Frontispiece

“Portals of the Past”

This beautiful arch was found practically uninjured in the midst of the ruins at
the summit of Nob Hill. Mr. James D. Phelan had it removed to the banks of a
little lake in Golden Gate Park, where it stands as a memorial to the devastated
city.

The Ingleside population affords a painful study in isolation.


Among a thousand refugees over fifty years of age, a majority would
be expected to have children or relatives and the hasty inference
would be that family care should be given to a number that were in
the Relief Home. Filial obligation is, indeed, too little emphasized; but
frequent migration weakens the family tie. An examination of these
cases does not show many in which the refugees were dependent
because of wilful neglect by relatives. The superintendent of the Relief
Home in the year 1909 carefully investigated all cases about which
there was rumor of property concealed or relatives able to give
support. The result was that only a very few of either were
discovered. In the case of those who had hidden savings, or an
inheritance, the city compelled the payment of $15 a month for board
and lodging or the leaving of the institution. In the case of most
children who had been well-to-do, a payment was agreed on rather
than the return to relatives.
A cursory glance at the Ingleside records would give the
impression that all the mutilated, semi-blind, deaf, rheumatic, and
disabled old people in the countryside; the one-legged and one-armed
men and the men with no legs at all; the partly paralyzed and
otherwise crippled, had been gathered there,—a forlorn company
more than half of whom added to other defects the slowness of old
age. The problem was not merely the relief of the aged, but the relief
of the handicapped. The crippled had been for the most part self-
supporting before the fire; some were elevator men, some were
watchmen, many had sold notions or papers on the streets or peddled
goods in the country roundabout. The peddlers on the whole did very
well with their grants, perhaps because a physical mutilation is an
asset to a peddler, or because no definite patronage had to be
regained. A person with a physical defect but accustomed to unusual
or skilled occupation, as for instance, the printing and distributing of
bill-heads or the repairing of musical instruments, is not debarred
from self-support as is the man who belongs in the ranks of common
labor.
The restoration to self-support of even the able-bodied elderly
women was quite as difficult as the rehabilitation of the handicapped.
There was after the fire, as always, a considerable demand for cheap
general houseworkers. To the casual observer, these sturdy old
women at Ingleside ought to have been able at least to earn their
lodging and food. But if the observer had attempted to employ one in
her own household she would have found it all but impossible to
endure her personal peculiarities. More than half were born and had
lived in foreign countries, and although to a degree Americanized,
were relapsing into the peasant habits of childhood. In cleanliness and
decorum a rising standard had left them far behind. To uncleanly and
vulgar habits and lack of skill were added a tendency to misrepresent,
even when truth-telling would be advantageous, and to be voluble on
the subject of chronic grievances or ailments. Women of another type
who were both cleanly and competent could not keep in work
because they lacked initiative. Someone had to do their thinking for
them. In the Relief Home where they had kindly supervision they
became excellent helpers capable of earning small wages.
The chief elements in the failure of these old people, men and
women, to recover their independence, were lack of adaptability, lack
of speed, and poor judgment in business matters. Those who had
maintained themselves for years, could not get back into their narrow
familiar groove nor find another into which to fit themselves. An old
man who was probably as good a cabinet maker as any other in the
city, could do barely half the work in a day expected by employers,
because of over-conscientiousness and slowness. In a thousand ways
the inefficiency due to ignorance, lack of skill, and poor judgment,
predestined the refugees of Ingleside to failure, whether they
received grants or not, and whether the aid given was great or small.
In some cases the grants seem pitifully inadequate and it may be
questioned whether the individuals had a fair chance to re-establish
themselves. Remembering the high rents, the cost of materials, the
cost of transportation, the dearth of employment, and the lessened
consumption, larger sums than those given would seem to have been
necessary to afford a prospect of permanent rehabilitation. But the
Corporation could not anticipate panic nor exceptional lack of
employment. A large proportion of these cases, moreover, had to be
decided in August, 1906,[283] when the grants were discontinued or
made in small amounts. In the cases of those who received $150 or
more, there was no higher proportion of success than where smaller
amounts were given. It is impossible to determine from the
information we have whether the later dependence of one-third to
one-half of the Ingleside refugees was due to the industrial situation
or to the deficiencies of the individuals themselves or to inadequate
relief. One conclusion we may safely set down: no case of failure was
due to any one of these causes alone.
[283] See Part I, p. 99 ff.
Turning from the discussion of these qualifying circumstances to
estimate the results of the relief of the aged, the infirm, and the
handicapped at Ingleside and in the Relief Home, certain things
emerge very definitely. For convenience and clearness they may be
set down categorically.
1. The speculative character of relief after disaster, especially in
the case of persons over fifty years of age, should be recognized and
too much must not be expected from the issue. The recuperative
power of aged persons is relatively small under ordinary conditions of
life, but when they are thrown out of the groove of years, subjected
to shock and hardship, and made to begin over again, it is infinitely
smaller. For this reason the element of uncertainty should be reduced
to a minimum by the use of records, by the employment of trained
investigators, and by the consultation with camp commanders or
others who have observed the applicants for some time. During the
earlier part of the relief work in San Francisco grants were made after
investigation, in lump sums which in a considerable number of cases
were squandered or used unwisely. After the Model Camp at Ingleside
had been in operation for some months and the camp commander
had had time to observe the inmates, the recommendations of visitors
were often modified at his suggestion; in some cases the money was
placed in the hands of a visitor to be expended for the applicant, and
in many others it was given in care of the Associated Charities. These
later grants lasted longer and were of more avail in relieving the
recipient than those made on less information and with fewer
precautions.
2. The value of charity records as a basis for determining the kind
and amount of relief that should be given in an emergency cannot be
over-emphasized. The case records of the Associated Charities, of the
several benevolent societies of the different nationalities, and of the
Catholics and the Hebrews, and the records of the almshouse, all
should have afforded a quick means of learning the former dependent
or independent position of many applicants. Unfortunately in San
Francisco, before the fire, most of these agencies did not sufficiently
understand the value of permanent detailed records. The result was
that a number of people who previously had been more or less
dependent were assisted on the assumption that they were as likely
to become self-supporting as those who had never applied for aid.
Elderly indigents rarely resort to an alias and they might have been
easily identified if the records had been reasonably complete and had
been available in one central bureau. Since the disaster, the exchange
of case information among the principal charitable agencies is proving
invaluable in preventing duplication of relief and in developing unity of
plans for constructive charity.
3. The value of trained investigators is distinctly apparent in a
comparison of their recommendations with those of amateurs in the
Ingleside cases. The inexperienced visitor, “taken in” by some
plausible old person, would recommend a grant of several hundred
dollars; the committee, mindful of many applicants yet to come and
suspicious of the excessive enthusiasm of the visitor, would give half
as much carefully guarded. The trained visitor, on the other hand,
seized upon the hopeful points as well as the limitations of capacity
and formed a balanced judgment which the committee usually
accepted in substance and which was generally justified by the
subsequent history of the applicant. The business of an investigator is
not to harden his sympathies and expose imposture, but to become a
trained and sympathetic expert in human nature. Especially in
emergency relief, therefore, his judgment should be of the highest
value.
4. The pension and the direct grant were both used in providing
for two quite different classes of the aged and infirm. A number of
feeble persons who had been decent and hardworking before the fire
but who, very evidently, could never again be self-supporting, were
given grants outright “till they should be able to work again”—as the
committee kindly phrased it—or because they were “too nice to go to
the almshouse.” A larger number of cases, where it was impossible to
determine whether the applicants were still capable of self-support or
in need of institutional care, were given the benefit of the doubt. This
was, indeed, almost compulsory because institutional facilities were so
meager. The intention of these grants must be wholly commended,
but the history of the cases treated by the two methods indicates
clearly that the money given in instalments in care of a visitor or of
the Associated Charities had been much more effectively spent than
that given to the applicant in a lump sum. If it be assumed—as it
should be—that no decent person of this borderland class should be
prematurely relegated to an institution, the results in San Francisco
prove that a limited pension in the care of a friendly visitor is both
wise and humane. It is, moreover, economical.
5. The age of possible rehabilitation is approximately defined by
the results of these cases. The natural period of self-support is
between sixteen and sixty; but the capacity of the unskilled laboring
classes to keep the pace of modern industry often begins to decline at
middle age. As regards health and ability to be self-supporting the
decade between fifty and sixty is critical; and the number of those
between sixty and seventy who, after such a disruption of their lives
as that produced by the earthquake and fire, are able to re-establish
themselves even with assistance, will be very small. To conserve the
common self-respect and society’s humane instincts, as many as
possible should be encouraged to try.
6. The lack of provision for certain classes in San Francisco was
well known to charity workers before the fire, but it became a far
more serious matter owing to the sudden increase and shifting of
these classes of dependents. There were many people set down as
“convalescents” at Ingleside who remained permanently in need of
institutional care. The hospitals continued to discharge, at the earliest
possible moment because of overcrowding, numbers of half-well
people who had no homes and little or no resources. Even those who
went back to poor homes frequently did not recover fully for want of
proper care during the convalescent period. Those without homes
must go to the Relief Home, and the increase of this class of inmates
became a serious tax on the institution. The medical attention that
must be given to the inmates of the Relief Home is greater than had
to be given in the old almshouse. The increase in the number of the
incurables, due in some measure to the shock and hardships of 1906,
makes great demands upon the nursing staff. Although the number of
admissions per thousand of the population is now no greater than
before the disaster, the permanent burden of refugees will remain
proportionately great for some years to come. Certain special classes
—the convalescent, the incurable, the advanced tubercular, the
chronic alcoholic, have never been adequately provided for in San
Francisco. The transition from emergency to permanent provision
affords the opportunity for developing the best methods and
differentiating the kinds of charitable care.
SOME LESSONS
OF THE RELIEF SURVEY

SOME LESSONS OF THE SURVEY


PAGE
Part I. Organization and The Emergency Period 369
Part II. Rehabilitation 370
Part III. Business Rehabilitation 371
Part IV. Housing Rehabilitation 371
Part V. After-Care 372
Part VI. The Aged and Infirm 372

SOME LESSONS OF THE RELIEF SURVEY

What then are some of the lessons to be learned from this review
of the San Francisco relief work that may be applied in other great
disasters?

Part I. Organization and the Emergency Period


We see among other things:
1. The importance of postponing the appointment of sub-
committees until a strong central committee has been able to
determine general policies and methods of procedure.
2. The wisdom of reducing the bread line and the camp
population as quickly as possible after the disaster so that the relief
resources may be conserved to meet the primary need of
rehabilitation.
3. The value of utilizing for emergency administration a body so
highly organized and so efficient as the United States Army, to take
charge of camps, and to bring to points of distribution the supplies
required for those in need of food and clothing.
4. The necessity of utilizing the centers of emergency distribution
for the later rehabilitation work of district committees and corps of
visitors.
5. The need of establishing a central bureau of information to
serve from the beginning of the relief work as a clearing house, to
prevent confusion and waste through duplication of effort.
6. The importance of legal incorporation for any relief
organization that has to deal with so large a disaster.
7. The importance of a strict audit of all relief in cash sent to a
relief organization. The impossibility of an equally strict accounting for
relief in kind, because of the many leaks and the difficulties attendant
upon hurried distribution.
8. The desirability that contributions, especially those in kind,
shall be sent without restrictions, as only the local organization is able
to measure relative needs at different periods of the work.
9. The recognition of the American National Red Cross, with its
permanent organization, its governmental status, and its direct
accountability to Congress for all expenditures, as the proper national
agency through which relief funds for great disasters should be
collected and administered; thus securing unity of effort, certainty of
policy, and a center about which all local relief agencies may rally.

Part II. Rehabilitation


We have to recognize:
1. The need, in at least the early stages of rehabilitation, of the
district system, in order to facilitate application and investigation and
to insure prompt committee action upon calls for assistance.
2. The need of a bureau of special relief from beginning to end of
the rehabilitation work in order to meet the emergent and minor
requirements of families and individuals without having to use the
necessarily complicated slow-moving machinery of the rehabilitation
organization itself.
3. The fact that even in a community where the residences of
over half of the population have changed and the business section
has been completely destroyed, it is possible to make individual
investigations of family wants such as will generally mean the adding
of the judgment of one outsider at least to that of the family.
We have to recognize further:
4. That the period of time elapsing between applications and
grants will not be greatly altered if, after the early stages of
rehabilitation, a centralized system is substituted for a district system.
5. That a flexible scheme of rehabilitation is furthered when no
rigid limit is fixed for an individual grant and deliberation is required in
each case where a grant of large amount is made.
6. That though rehabilitation may proceed generally along the
line of fortifying each family in one particular direction, as for
instance, in its business relations or housing accommodations, it will
always be necessary to provide a considerable proportion of the
families with subsidiary grants for other purposes.
7. That any centralized system which attempts to fix arbitrarily
the different types of cases with which different committees shall deal
will create a certain amount of confusion. If a centralized system
seem desirable, the question is whether the committees in the central
office should not have authority to consider cases according to
geographical divisions rather than according to typical classes of
applicants.

Part III. Business Rehabilitation


We learn, and the fact deserves to stand apart:
That when grants are made for the re-establishment in business
of persons of little ability or experience, close supervision of plans and
expenditures by agents of the relief committee is necessary to secure
the best results.
Part IV. Housing Rehabilitation
We have to recognize:
1. That to provide but one form of housing rehabilitation is far
from satisfactory.
2. That in a general way the three forms provided in San
Francisco met the needs of the three general classes to be reached.
(a) With reference to the camp cottages it is too soon to say how
successful the experiment will ultimately be of giving cottages for
removal to other sites to those who may be classed as comparatively
weak in resourcefulness and character. It is certain, however, that the
permanent close grouping of the cottages in great numbers on open
lots is a danger to be guarded against.
(b) With reference to the grant and loan houses, though it seems
that in general the houses built by applicants were better than those
built by the housing committee for the applicants, it by no means
follows that direct grants of money if commonly adopted would
always bring good results. Individual capabilities must be one
determining factor. As to grants and loans, it may be said that a
double standard is not practicable. A grant on one house and a loan
on its neighbor lead to dissatisfaction and often failure on the part of
the borrower to meet his debt.
3. That because of the highly specialized business ability
required, a separate department of the relief organization should have
charge of all building and details of building.
4. That decisions upon housing applications and dealings with
housing applicants should be centered in a rehabilitation department.

Part V. After-Care
We are brought to see that:
1. The applications made to an emergency relief organization will
not include all who, as a result of the disaster, will eventually be
obliged to seek succor. It is demonstrated that some permanent
agency must be prepared to help those who, fighting heroically to the
very end of their resources, give up after the temporary relief
organization has discontinued active work.
2. The number of sufferers who need after-care may be
increased by families who have been attracted to the city by illusive
expectations of work.
3. The problems of family relief after a great disaster are
essentially those requiring the personal care and attention which are
characteristic of the work of an associated charities under normal
conditions. The number of families that have come to the San
Francisco Associated Charities in the years since the Corporation
turned over the relief work to it, has been far larger than before the
fire. It follows that for some years after so tremendous a disaster
there should be an increase in the force of trained workers
proportionate to the increase in the applications for rehabilitation. The
community must be prepared to pay the additional cost.
4. Grants of relief, when they must be given regularly and for a
considerable period (in the form that is often described as pensions),
should be sufficiently large to assure reasonable standards of living.

Part VI. The Aged and Infirm


We see finally that:
1. A great disaster increases especially the number of the aged
and infirm who become public charges.
2. One of the tasks of delicate readjustment is to remove from
the almshouse the aged men and women who, merely through the
rough chance of a great catastrophe, are thrown with those whose
lifelong habits and disabilities lead to the almshouse.
3. A critical test of the quality of a community is how far the
responsibility for the aged, infirm, and handicapped who, save for the
disaster, would never have become dependent upon public relief, is
resumed by relatives, friends, or others who in the ordinary course of
events would have cared for them; how completely the standard of
private and family care for them shall be as though the disaster had
never occurred.
APPENDIX I
DOCUMENTS AND ORDERS

APPENDIX I
DOCUMENTS AND ORDERS

PAGE
1. List of Members Finance Committee of Relief and Red Cross
Funds and Its Permanent Committees 377
2. General Orders No. 18 379
3. Extracts from The Army in the San Francisco Disaster. By
Brigadier General C. A. Devol 383
4. Letter from General Greely to James D. Phelan 387
5. Plan of the Executive Commission 391
6. Original Housing Plan 394
7. The Incorporation of the Funds 398
8. Appointment of Board of Trustees Relief and Red Cross
Funds, February, 1909 401
9. List of Official Camps 404
10. Grants to Charitable Organizations 405
A. By Denominations and Nature of Work 405
B. By Denominations 405
11. Rehabilitation Committee: Details of Administration 406
I. Directions given by the Associated Charities 406
II. Monthly budgets 408
III. Method of work beginning July 7, 1906, in
connection with the district [section]
organization 408
IV. The centralized system 412
V. Consideration of cases out of turn 412
VI. A lesson learned regarding records 413
VII. Loose ends 415
VIII. Bookkeeping and registration notes 415
12. General Plan of Housing Committee 417
13. Statistics from Associated Charities 419
A. Receipts of San Francisco Associated Charities from all
sources, by months, from June, 1907, to September,
1912, inclusive 419
B. Disbursements of San Francisco Associated Charities for
relief and for administration, by months, from June,
1907, to September, 1912, inclusive 419

APPENDIX I

1
LIST OF MEMBERS FINANCE COMMITTEE OF RELIEF AND RED
CROSS FUNDS AND ITS PERMANENT COMMITTEES

FINANCE COMMITTEE

James D. Phelan, Chairman


J. Downey Harvey, Secretary
Rufus P. Jennings (elected Secretary in the beginning but resigned)
James L. Flood (resigned July 16)
Thomas Magee
M. H. de Young
W. F. Herrin
Herbert E. Law
William Babcock (resigned June 29)
I. W. Hellman, Jr. (appointed in place of I. W. Hellman)
Rudolph Spreckels (appointed in place of Claus Spreckels)
Charles Sutro, Jr.
Allan Pollok (appointed April 21)
Garret W. McEnerney, elected to membership April 24th
Frank G. Drum, elected to membership April 24th
Joseph S. Tobin, elected to membership April 24th in place of R. J. Tobin

Elected April 24 to represent the California Branch of the Red


Cross:

W. W. Morrow
John F. Merrill
Horace Davis

Appointed later:

F. S. Stratton, appointed April 30


F. W. Dohrmann, appointed June 29 on nomination of California Red
Cross to succeed John F. Merrill, resigned.
Charles S. Wheeler, appointed July 13 to succeed William Babcock, resigned.

NOTE: At the meeting of April 30 Dr. E. E. Baker of Oakland was appointed to


Finance Committee to represent Governor Pardee, at the latter’s request. Later in
the same meeting it was arranged that, since Dr. Baker’s duties prevented him from
attending meetings, he should be represented on the Finance Committee by F. S.
Stratton. Mr. Stratton was from that date on a member of the Finance Committee,
representing both the Governor and the Oakland Relief Committee.

SUB-COMMITTEES OF FINANCE COMMITTEE

Committee of Supervision (appointed April 22)


Allan Pollok, Chairman
F. W. Van Sicklen
A. Haas
Wm. Cluff
J. Solomon
Nathan Bibo
R. B. Hale
L. P. Lowe
W. L. Harvey
D. Samuels
R. D. McElroy
Edward Heller
W. F. Williamson

Purchasing Committee (also called Purchasing Agents, appointed


April 26)
Allan Pollok
Edward T. Devine

Auditing Committee (appointed May 7)


M. H. de Young, Chairman
Joseph S. Tobin
Frank G. Drum

Committee on Hospitals (appointed May 9)


Edward T. Devine, Chairman
J. Downey Harvey
Allan Pollok

Rehabilitation Committee (authorized May 5, appointed June 29)


Edward T. Devine, Chairman (succeeded Aug. 6 by Mr. Dohrmann).
Rev. D. O. Crowley, representing Archbishop Riordan
Rev. J. A. Emery, representing Bishop Nichols
Rabbi Jacob Voorsanger
O. K. Cushing (Treasurer)
F. W. Dohrmann (Chairman from Aug. 6 on)
Dr. John Gallwey

Later appointments made by the Executive Committee were


Ernest P. Bicknell, appointed July 31 to succeed Dr. Devine
C. F. Leege, appointed July 31 alternate for Mr. Dohrmann and on Nov. 2,
member, to succeed Mr. Bicknell
Abraham Haas, appointed Nov. 2 to succeed Rabbi Voorsanger
Frank Miller, appointed Nov. 9 to serve during Mr. Dohrmann’s absence.
On Nov. 2 Mr. Dohrmann was granted leave of absence for 90 days and
Mr. Cushing was appointed Acting Chairman in his place
EXECUTIVE COMMISSION (OFFICIAL TERM OF OFFICE JULY 1 TO AUGUST 1, 1906)
Edward T. Devine, Chairman (appointed by the American National Red
Cross)
Edward F. Moran (appointed by the mayor)
George H. Pippy (appointed by the Finance Committee)

2
GENERAL ORDERS, NO. 18

HEADQUARTERS PACIFIC DIVISION,


San Francisco, Cal., April 29, 1906.

I. In order to economically and efficiently perform the non-military duties of


distributing relief supplies, the City of San Francisco is hereby divided into seven civil
sections, as described in Paragraph XIV.
II. The following named officers are charged, generally, with administrative
duties, as follows:
1. Major Lea Febiger, Inspector General; in general charge of the organization
of relief stations, of their personnel, methods of administration and requisitions.
Headquarters: Hamilton School Building, on Geary Street near Scott Street.
2. Major C. A. Devol, Depot Quartermaster; with all questions of transportation,
storage, and allied duties. Headquarters: Presidio Wharf.
3. Major C. R. Krauthoff, Depot Commissary, with the commissary duties in
connection with providing food supplies and the filling of requisitions approved by
Major Febiger, Dr. Edward T. Devine, Special Representative of the National Red
Cross, or other duly authorized agents or officials. Headquarters: Folsom Street
Wharf.
4. An officer of the Army, not yet selected; with supplies other than food, and
the filling of requisitions for such supplies after approval by Major Febiger, Dr.
Devine, or other duly authorized official. Pending his selection these duties will be
performed by Major Devol. Headquarters: Presidio Wharf.
5. Lieutenant Colonel G. H. Torney, M. D., U. S. A., has been placed in charge of
all sanitary work. He is charged with the proper organization of sanitation, the
formulation of regulations to carry out the proper measures of safety against any
danger from unsanitary conditions, co-operating with the Health Commission of San
Francisco.
6. Colonel W. H. Heuer, Corps of Engineers, is charged with all duties relating to
engineering problems connected with the work in hand and in this connection will
consult freely with the civil authorities in regard to the water supply, sanitation and
all other matters in which engineering skill is required.
III. As far as practicable, all applications for relief, (whether for food, clothing,
tentage or bedding) will be made direct to, and the administrative business
connected therewith transacted directly with, the officers above named. This will
facilitate relief and centralize data and action relative thereto. The officers named
will, as far as possible, transact their business with each other and with outside
applicants direct, that is, without reference to Division Headquarters, the object
being to insure an economical, efficient and prompt service for the distressed and
destitute.
IV. 1. As soon as practicable an officer of the Army, with assistants, will be
assigned to each of the seven sections enumerated, with the view of co-ordinating
the work, and introducing at the earliest moment such methods as will prevent
dishonesty or wastage, eliminate the unworthy and impostors, and insure
economical administration.
2. Wherever an officer of the Army is not available a responsible civilian of the
locality, designated by Dr. Devine, will be placed in immediate charge of each relief
station, and assisted in organizing a proper personnel to carry on the work.
3. As soon as possible, rigid daily inspections will be made of every relief
station, and local regulations introduced with the view of correcting abuses, neglects
or mistakes. Relief stations will be reduced in number and personnel limited to the
smallest possible number consistent with pressing demands.
4. The officer or person placed in immediate charge of each relief station will be
carefully instructed by the officer in charge of the civil section to make his requests
in duplicate, and those for food supplies must be separate and distinct from those
for clothing, bedding, tentage, etc., because they must be filled from different
supply departments. All requests must be in duplicate, and submitted through the
officer in charge of the civil section to Major Febiger, at the Hamilton School
Building, on Geary Street near Scott. In case of immediate need the requisition may
be taken direct to Major Febiger.
V. It is expected and desired that commanders of military districts in San
Francisco, charged with guarding of public buildings and other military duties, shall
extend advice and, as far as practicable, needful assistance in the interests of the
non-military duties of relief.
VI. Charges of wastage, deception, theft and improper appropriation of relief
supplies have been freely made, and it is claimed that the food supply in some
cases is too lavish in quantity, and is being issued without suitable discrimination.
The period of extreme distress for food has passed, and at the earliest possible
moment the issue of rations must be confined to helpless women and children, and
refused to adult males, unless they are sick or in feeble condition.
VII. For the information of Division Headquarters, a system of inspection will be
established through the Inspector General’s Department, in order that the inspectors
may be facilitated as much as possible in gaining information giving a clear idea as
to how the work is going on. All officers connected with the distribution of supplies
will keep such memorandum records, aside from their regular records, as will enable
them to give to the inspectors a summary of the work being done, the method
pursued, and in general such information and recommendation as they may have
for improvements and economy.
VIII. The following permanent relief ration is fixed, the amount being stated in
allowance per ration or per 100 rations:

Meat Components.
10 oz. canned meat or salt meat
or canned fish, or
14 oz. fresh meat to the ration.
Bread Components.
14 oz. fresh bread or 10 oz. hard
bread, or crackers or
12 oz. flour to the ration.
Coffee and Tea.
1 lb. coffee to 15 rations or
11⁄2 lbs. tea to 100 rations.
Vegetable Components.
1
1 ⁄2 oz. beans, peas, rice or
hominy, to the ration.
3⁄4 lb. fresh vegetables (80 per

cent. potatoes, 20 per cent.


onions) to the ration.
Dried Fruit Component.
1 oz. dried fruit to the ration.
Miscellaneous.
15 lbs. sugar to 100 rations.
3 quarts vinegar (or pickles) to
100 rations.
2 lbs. salt to 100 rations.
4 oz. pepper to 100 rations.
4 lbs. soap to 100 rations.
11⁄2 lbs. candles to 100 rations.

It is recognized that exact conformity to articles herein mentioned is at present


impracticable. However, the ration, commencing at noon, Tuesday, May 1, 1906, will
be confined to the articles herein named, or proper substitutes equivalent thereto.
IX. After May 1, 1906, no rations beyond the articles above named, or their
substitutes, will be issued from any relief station or district under military control,
except on the prescription or order of a reputable physician or other competent
authority. Issues of luxuries, or articles of special diet must be confined to infants or
invalids. Any other course will speedily exhaust the very limited means of

You might also like