January 2019
Intermediate to advanced
484 pages
11h 48m
English
When we create a service account, a signed bearer token will be automatically created by the Kubernetes service account admission controller plugin. We can use that service account token to authenticate a user.
Let's try creating a service account named myaccount in the chapter5 namespace:
// the configuration file of service account object# cat service-account.yamlapiVersion: v1kind: ServiceAccountmetadata: name: myaccount namespace: chapter5// create myaccount# kubectl create -f service-account.yamlserviceaccount/myaccount created
In Chapter 9, Continuous Delivery, in the example in which we demonstrated how to deploy my-app, we created a namespace named cd, and used get-sa-token.sh script (https://github.com/PacktPublishing/DevOps-with-Kubernetes-Second-Edition/blob/master/chapter9/9-2_service-account-for-ci-tool/utils/push-cd/get-sa-token.sh ...
Read now
Unlock full access