Skip to content
Opstree

DEVOPS DONE RIGHT

A blog site on our Real life experiences with various phases of DevOps starting from VCS, Build & Release, CI/CD, Cloud, Monitoring, Containerization.

  • Home
  • Services
  • Careers
  • Life at Opstree
  • Case Study
  • Contact
  • Write for Us
  • Sign Up

Tag: blogd

Know the Role of K8S Service Account in Granting Access

Have you ever wondered that when you access the API Server through kubectl you are authenticated through the API controller, but how will you do the same from the pod side? Here the Service Account role comes into play. As k8s definition itself says “Processes in containers inside pods can also contact the apiserver. When they do, they are authenticated as a particular Service Account (for example, default).”

Things we should know about service Account,

  • Created in a namespace.
  • Used to allow processes inside pods, access to the API Server.
  • Default service account = default (no access to the API server).
  • Create your own service account.
    • Use it in a RoleBinding or ClusterRoleBinding.
    • Use the service account secret to obtain the authentication token & CA certificate.

What we will be covering today,

  • Creating a pod (that gets automatically created in default Service Account)
  • Will create a Service Account
  • Creating a deployment that will be using appsa Service Account.
  • RBAC
Continue reading “Know the Role of K8S Service Account in Granting Access”
Author iamvikasbishtPosted on April 12, 2022Categories DevOpsTags blogd, blogs, k8s, Kubernetes, kubernetes service, service account, technical blogsLeave a comment on Know the Role of K8S Service Account in Granting Access

Authors

  • Abhishek Dubey
    • All Redis Setup Under 7 Minutes!
    • Kubernetes CSI: Container Storage Interface – Part 1
    • AWS Gateway LoadBalancer: A Load Balancer that we deserve
    • MongoDB Setup on Kubernetes using MongoDB Operator
    • Autoscaling in Nomad Cluster
  • Abhishek Vishwakarma
    • Setup Percona Postgresql Through the Awsesome(OSM) Ansible Role
  • Adeel
    • Handling Private Affair: A Guide to Secrets Management System
    • How DHCP and DNS are managed in Amazon VPC
    • HAProxy Hurdles Walkthrough
    • Make Your Own Rules, ElastAlert Style
    • Stash logs better with Logstash
  • adityakaushik1005
    • Introduction to Siege
  • akankshasrivastva
    • ServiceNow – Azure DevOps Integration
    • The Migration of Postgresql using Azure DMS
  • akashparashartalviewcom
    • Praeco Alerting for ElasticSearch (Part -1)
  • AmitKumar
    • Why APM is Extremely Significant!
  • anjalisingh
    • Analyzing Latest WhatsApp Scam Leaking S3 Bucket
    • Out-Of-Band RCE: CTF Walkthrough
    • Linux OS Hardening: CIS Benchmarks
  • ankitot100
    • Lets Get Started With Packer
    • Intro to Packer
  • Ankur Vaish
    • Kafka within EFK Monitoring
  • Ankur Verma
    • Optimize Java 8 with Docker
  • Arpeet Gupta
    • Elasticsearch Cluster Monitoring
    • Elasticsearch Garbage Collector Frequent Execution Issue
    • Cache Using Cloudflare Workers’ Cache API
    • IP Whitelisting Using Istio Policy On Kubernetes Microservices
    • Preserve Source IP In AWS Classic Load-Balancer And Istio’s Envoy Using Proxy Protocol
  • harshvardhan
    • One more reason to use Docker – part II
    • AWS RDS cross account snapshot restoration
  • ashutoshyadav66
    • Group-Based Authorization in GitLab
  • Avinaw Sharma
    • Traefik a Reverse Proxy/Load Balancer
  • balpreetbanga
    • Deploying Prometheus and Grafana on Kubernetes
    • Explore More on StatefulSets in K8s
  • Bhupender rawat
    • Cert-Manager Issuer for Cross-Account Route 53 [ EKS ]
    • Understanding Ansible: Helm diff plugin
    • A Step-by-Step Guide to Integrate Azure Active Directory with Redash SAML [ SSO ]
    • Google Python API: The easy way
    • Kubernetes: DaemonSet
  • bishtgeeta
    • Four Main Metrics of Prometheus
  • Kartik Chopra
    • What, Why and How of CTF Challenges?
    • Recap Amrita InCTF 2019 | Part 1
  • Deepak Gupta
    • Introducing OpsTree Tomcat Image
    • Provisioning Infra and Deployments In AWS : Using Packer, Terraform and Jenkins
    • Introduction to Prometheus Monitoring
    • Docker BuildKit : Faster Builds, Mounts and Features
    • Create Your First Helm Chart (Part 03)
  • Devesh Sharma
    • Fasten Docker build
    • Create Your Own Container Using Linux Namespaces Part-1.
    • Raktbeej Proxy
    • Recap Amrita InCTF 2019 | Part 2
  • Dev Pokhariya
    • Kafka’s Solution : Event Driven Architecture: OTKafkaDiaries
    • Introduction To KAFKA: OTKafkaDiaries
  • Gitesh Satywali
    • Where there is a shell, There is a way.
  • guestwriteropstree
    • What Is the Difference Between CloudOps And DevOps?
  • gveeru
    • VPN Services Comparison- How to find the best VPN for your business?
  • himanshiparnami
    • Self-Hosted GitLab Migration – Part 1
    • Deploying Azure Policy using Terraform Module
    • How to Setup Consul through the OSM Ansible Role
  • himanshumudgal08
    • Deploying Terraform IAC Using Azure DevOps Runtime Parameters
    • Increasing Code Reusability Using Task Groups in Azure DevOps
    • How To Setup An Agent On Azure Devops
    • Terraform CI-CD With Azure DevOps
    • What is a Bare Git Repository?
  • Himanshu Uniyal
    • Taints and Tolerations Usage with Node Selector in Kubernetes Scheduling
  • Rajat Vats
    • How to implement CI/CD using AWS CodeBuild, CodeDeploy and CodePipeline
    • Why We Should Use Transit & Direct Connect Gateways!
  • iamvikasbisht
    • Know the Role of K8S Service Account in Granting Access
    • Debugging in Shell Script
  • Isha sharma
    • Fresh Service – MY Experience with Analytics & Workflow Automator Features
  • Ishaan Ambashta
    • Monitoring and Release tracking with Sentry
  • ishanjiconnect
    • ERROR HANDLING IN ANSIBLE
    • Speeding up Ansible Execution Part 2
    • Speeding up Ansible Execution Part 1
  • Shikha Jaiswal
    • Proc File System in Linux
  • Jaspreet Singh
    • Automatically Backup Alibaba MySQL using Grandfather-Father-Son Strategy
    • Collect Logs with Fluentd in K8s. (Part-2)
    • EFK 7.4.0 Stack on Kubernetes. (Part-1)
  • Kapendra Singh
    • Terraform WorkSpace – Multiple Environment
    • The Concept Of Data At Rest Encryption In MySql
  • Kartikey Gupta
    • What Without Internet
  • kirtinehra
    • Trigger Jenkins Job using AWS Lambda triggered by S3 Event
    • Nginx monitoring using Telegraf/Prometheus/Grafana
    • Autoscaling Azure MySql Server using Azure Automation
  • kritarth29
    • Introduction to Azure Active Directory
    • Introduction to Azure Security
    • BigBulls Game Series- Patching MongoDB using Ansible
    • EC2 STORE OVERVIEW- Difference B/W AWS EBS And Instance Store
    • Your Guide for Patching Elastic Search!
  • lakshayarora1
    • Using TruffleHog Utility in Your Jenkins Pipeline
    • SonarQube Integration with Azure DevOps
    • An Overview of Logic Apps with its Use Cases
  • Likith R K
    • Know How to Get Started with Buildkite
  • Lovedeep Sharma
    • Best Practices of Ansible Role
    • Docker Logging Driver
  • Mahesh Kumar
    • What is SRE (Site Reliability Engineer)
    • A Detailed Guide to Key Metrics of MongoDB Monitoring
    • Prometheus-Alertmanager integration with MS-teams
  • mohitkanojia
    • ServiceNow Integration with Azure Alerts – Step By Step Setup
  • Moksh Bhardwaj
    • AWS Elastic Network Interface
  • mukeshtuteja
    • Ansible directory structure (Default vs Vars)
    • Resolving Segmentation Fault (“Core dumped”) in Ubuntu
  • naveenverma023
    • Jenkins vs Azure DevOps
    • Ease your Azure Infrastructure with Azure Blueprints
    • Master Pipelines with Azure Pipeline Templates
  • Navneet Singh
    • Learn everything about Amazon Cloudfront
  • nikki derai
    • Wazuh : The SIEM Platform
  • opstreeblog
    • The closer you think you are, the less you’ll actually see
    • Migrate your data between various Databases
    • Git Inside Out
    • Log Parsing of Windows Servers on Instance Termination
    • Prometheus Overview and Setup
  • Pankaj Kumar
    • Stop Wasting Money, Start Cost Optimization for AWS!
  • piyushshailly
    • AWS Transit Gateway – A Saviour for your Connections
    • Patching – BigBulls Game
  • Prashant Kumar
    • Event Monitoring Using AWS CloudTrail
    • Postgres – CIS Benchmark
    • Elastic SIEM – An Event Tracking Feature
  • Prakash Jha
    • Terraform Version Upgrade
    • ECS rollback with Jenkins Active Choice Parameter
    • Codeherent: Automatic Cloud Diagrams Powered by Terraform
  • Priyanshi Chauhan
    • Protected EFK Stack Setup for Kubernetes
  • rachitshrivastava93
    • Hidden Secrets of Dockerfile
  • Rahul Dubey
    • My stint with Runc vulnerability
  • rahulmeena1509
    • AWS LAMBDA – Here’s Everything You Need to Know!
  • rahulsachdeva2
    • OpenGrok Setup and Features
  • raiaastha
    • Resolution of Apt-Key Error
  • Rajat Chauhan
    • AWS SECRET MANAGER
  • Rajat Ravi
    • Postfix Email Server integration with SES
  • rakeshkumarkhetwal
    • HOST-BASED INTRUSION DETECTION USING OSSEC
    • Basics of Amazon Route 53 [Part -1]
  • reenanain
    • Cross Region Internal Load Balancing  in AWS with VPC Peering
  • Rishabh Sharma
    • On-Premise Setup of Kubernetes Cluster Components (Offline Mode) – PART 2
    • On-Premise Setup of Kubernetes Cluster using KubeSpray (Offline Mode) – PART 1
    • How to fix the dpkg lock file error in Packer?
  • Roshan Chandekar
    • Learn the Importance of Namespace, Quota & Limits
  • Ruchita Varma
    • 3 Best Tools to Manage Your Kubernetes Cluster!
    • When not to think of Canary Deployment?
    • Canary vs Blue-Green Deployment- Which one should you choose?
    • An Introduction to ISTIO Service Mesh & its Architecture!
    • The Benefits of Deploying a Service Mesh ISTIO!
  • Ruchita Varma
    • Unleashing the Potential of Agile and DevOps in Business Growth
    • The Top Git Branching Strategies for Efficient Code Management
    • Cloud Migration: The Key to Scaling Your Organization
    • The Power of Docker Images: A Comprehensive Guide to Building from Scratch
    • From Code to Container: Understanding the Importance of Container Images
  • Sajal Jain
    • Redis Cluster: Setup, Sharding and Failover Testing
    • Redis Cluster: Architecture, Replication, Sharding and Failover
    • Stay Away Replication Lag !
  • Sandeep Rawat
    • Gitolite
    • Stunnel a Proxy to ship the log on SSL
    • Setup of Nginx Vhost
    • jgit-flow maven plugin to Release Java Application
    • Kernel-based Virtualization Machine
  • Sanket Gupta
    • Elasticsearch Backup and Restore in Production
  • sanyamkalra1709
    • How to Fix a Corrupted GUI after Downgrading Python on Ubuntu?
    • Checkov a Must Tool for Infra CI
  • saurabhvajpayee
    • Kitchen Chef’s diagnosis center
    • Chef-Kitchen Do it simply..
    • Chef-Cookbooks Walls of chef-house..
    • Chef-Cookbooks Roast it perfectly..
    • Chef-Recipes Bake it calmly..
  • Shankar Jha
    • 2022 – A year of Incredible Firsts!
    • OpsTree, OpsTree Labs & BuildPiper: Our Short Story…
  • shatrujeetsah
    • Perfect Spot Instance’s Imperfections | part-II
    • Perfect Spot Instance’s Imperfections | part-I
  • shitunjay
    • Split Tunneling Using OpenVPN
    • Active-Active Infrastructure using Terraform and Jenkins on Microsoft Azure
  • Shubh Joshi
    • Tuning Of ElasticSearch Cluster
  • shwetatyagiot
    • Know How to Use Velero to Backup and Migrate Kubernetes Resources and Persistent Volumes
    • Features of AWX
  • Sohan Dogra
    • Pod Priority, Priority Class, and Preemption
    • Securing Kubernetes Traffic with Cert-Manager & Lets Encrypt 
  • Srishti Aggarwal
    • How to Setup Jenkins in a few minutes!
  • Subhabrata Sarkar
    • Know How to Access S3 Bucket without IAM Roles and Use Cases
    • Learn the Hacks for Running Custom Scripts at Spot Termination
  • Sudipt Sharma
    • Terraforming The Better Way: Part-I
    • Unix File Tree Part-2
    • Unix File Tree Part-1
    • Git-Submodule
    • Gitlab-CI with Nexus
  • sumitksuman
    • How to test Ansible playbook/role using Molecules with Docker
  • sunilyadav23
    • ANSIBLE DYNAMIC INVENTORY IS IT SO HARD?
  • surajknite
    • A Savior – Imperative in K8s
  • tejas1203
    • MySQL Monitoring
  • V!kash Gautam
    • Kubernetes CRI — Container Runtime Interface
    • How to fix error “[SSL: CERTIFICATE_ VERIFY_FAILED] certificate verify failed” (_ssl.c:727)
    • Enable Support to Provision GP3 Volumes in Storage Class
    • A Closer Look at coreDNS
    • Docker Inside Out – A Journey to the Running Container
  • vineetyadav97
    • Alerting Through Azure Logic Apps
    • The Step-By-Step Guide to Connect Aws with Azure
  • Vishal Raj
    • DevSecOps Diary | HIPAA Compliance
    • Kubernetes Diary – Software LoadBalancer
  • Vishal Singh Saini
    • Records Creation in Azure DNS from AKS ExternalDNS
  • Vishant Sharma
    • Azure HA Kubernetes Monitoring using Prometheus and Thanos
    • SonarQube Custom Quality Profiles
    • Jenkins Pipeline Global Shared Libraries
    • Kafka Manager On Kubernetes
  • waliarohit
    • Its not you Everytime, sometimes issue might be at AWS End
  • yamankg
    • TICK | Alert Flooding Issue and Optimization
  • Home
  • Services
  • Careers
  • Life at Opstree
  • Case Study
  • Contact
  • Write for Us
  • Sign Up
DEVOPS DONE RIGHT Blog at WordPress.com.
  • Follow Following
    • DEVOPS DONE RIGHT
    • Join 129 other followers
    • Already have a WordPress.com account? Log in now.
    • DEVOPS DONE RIGHT
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar