Skip to Content
Kubernetes Cookbook - Second Edition
book

Kubernetes Cookbook - Second Edition

by Hideto Saito, Hui-Chuan Chloe Lee, Ke-Jou Carol Hsu
May 2018
Intermediate to advanced
554 pages
13h 51m
English
Packt Publishing
Content preview from Kubernetes Cookbook - Second Edition

Setting up Kubernetes service account and ClusterRole

Imagine that after using Jenkins successfully to build your application container, you then use kubectl to update deployment to roll out a new binary. To do that, invoke a kubectl command from the inside of a Jenkins pod. In this scenario, we need a credential to communicate to the Kubernetes master.

Fortunately, Kubernetes supports this kind of scenario, which uses a service account. It is described in detail in Chapter 8, Advanced Cluster Administration. So, this recipe will use the simplest way, which uses the default namespace and cluster-admin ClusterRole.

To check whether RBAC is enabled and also if the cluster-admin ClusterRole exists or not, type the kubectl get clusterrole command: ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Kubernetes Cookbook

Kubernetes Cookbook

Sébastien Goasguen, Michael Hausenblas
DevOps with Kubernetes - Second Edition

DevOps with Kubernetes - Second Edition

Hideto Saito, Hui-Chuan Chloe Lee, Cheng-Yang Wu

Publisher Resources

ISBN: 9781788837606Supplemental Content