Microservice Project
  • 🤓11 Microservice CICD Pipeline using Jenkins, EKS and CloudFormation
  • Installing Tools
  • 🤖Jenkins setup
    • Installing Plugins in jenkins
  • 🐳Docker Setup
  • 🏃‍♂️Continuous Integration with GitHub and Jenkins
  • 🏃‍♂️Continuous Deployment with EKS
    • Create Service Account, Role & Assign that role
  • 👷Project Structure & summary.
Powered by GitBook
On this page
  1. 🏃‍♂️Continuous Deployment with EKS

Create Service Account, Role & Assign that role

Create Service Account, Role & Assign that role, And create a secret for Service Account and geenrate a Token

Creating Service Account

apiVersion: v1
kind: ServiceAccount
metadata:
  name: jenkins
  namespace: webapps

Create Role

apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: app-role
  namespace: webapps
rules:
  - apiGroups:
        - ""
        - apps
        - autoscaling
        - batch
        - extensions
        - policy
        - rbac.authorization.k8s.io
    resources:
      - pods
      - componentstatuses
      - configmaps
      - daemonsets
      - deployments
      - events
      - endpoints
      - horizontalpodautoscalers
      - ingress
      - jobs
      - limitranges
      - namespaces
      - nodes
      - pods
      - persistentvolumes
      - persistentvolumeclaims
      - resourcequotas
      - replicasets
      - replicationcontrollers
      - serviceaccounts
      - services
    verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]

Bind the role to service account

apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: app-rolebinding
  namespace: webapps 
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: app-role 
subjects:
- namespace: webapps 
  kind: ServiceAccount
  name: jenkins 

Generate token using service account in the namespace

Hooray!! We have Completed our project "11 Microservice CICD Pipeline DevOps Project - using GIT, Jenkins, Docker and EKS(elastic Kubernetes service). "

Previous🏃‍♂️Continuous Deployment with EKSNext👷Project Structure & summary.

Last updated 1 year ago

Generate token