We'll start the hands-on walk-through by entering the directory where we cloned the vfarcic/k8s-specs repository.
All the commands from this chapter are available in the 02-sa.sh (https://gist.github.com/vfarcic/5fdca8e7f7bb426003abf4ad55745807) Gist.
1 cd k8s-specs
2 3 git pull
Next, we'll need a cluster which we can use to experiment with ServiceAccounts. The requirements are the same as those we used in the previous chapter. We'll need Kubernetes version 1.9 or higher as well as nginx Ingress Controller, RBAC, and a default StorageClass. If you didn't destroy it, please continue using the cluster you created in the previous chapter. Otherwise, it should be reasonably fast to create a new one. For your convenience, the Gists and the specs we used before are available here as well.
- docker4mac.sh: Docker for Mac with 2 CPUs, 2 GB RAM, and with nginx Ingress (https://gist.github.com/vfarcic/06e313db2957e92b1df09fe39c249a14).
- minikube.sh: minikube with 2 CPUs, 2 GB RAM, and with ingress, storage-provisioner, and default-storageclass addons enabled (https://gist.github.com/vfarcic/536e6329e750b795a882900c09feb13b).
- kops.sh: kops in AWS with 3 t2.small masters and 2 t2.medium nodes spread in three availability zones, and with nginx Ingress (assumes that the prerequisites are set through Appendix B) (https://gist.github.com/vfarcic/2a3e4ee9cb86d4a5a65cd3e4397f48fd).
- minishift.sh: minishift with 2 CPUs, 2 GB RAM, and version 1.16+ (https://gist.github.com/vfarcic/c9968f23ecb1f7b2ec40c6bcc0e03e4f).
- gke.sh: Google Kubernetes Engine (GKE) with 3 n1-standard-1 (1 CPU, 3.75 GB RAM) nodes (one in each zone), and with nginx Ingress controller running on top of the "standard" one that comes with GKE. We'll use nginx Ingress for compatibility with other platforms. Feel free to modify the YAML files if you prefer NOT to install nginx Ingress (https://gist.github.com/vfarcic/5c52c165bf9c5002fedb61f8a5d6a6d1).
- eks.sh: Elastic Kubernetes Service (EKS) with 2 t2.medium nodes, with nginx Ingress controller, and with a default StorageClass (https://gist.github.com/vfarcic/5496f79a3886be794cc317c6f8dd7083).
Now that we have a cluster, we can proceed with a few examples.