SlideShare a Scribd company logo
1 of 22
Download to read offline
From Containerized Applications to
secure and scaling with Kubernetes
Shikha Srivastava
@shikhasthoughts
IBM
Erica Brown
@ericabrEngineer
IBM
Ready for production application
•  Secure
•  Installation and access
•  Resilient, Highly Available and scale
•  Repeated deployment
•  with safe upgrades and configuration changes
•  Performance
•  Obervability
•  more …..
•  And AGILE too
Production Setup with failover
Load balancer!
!
Replication,!
Scaling!
Health Checker!
Manage multi zone!
Load balancer!
(failover)!
Production!
Production
Failover!
Ahh… think of:
•  Code maintenance
•  multiple language
across multiple
different machine
•  Reliable code
updates and rollback
•  Scaling
•  Transaction and Data
replication
•  And more
Internet
User!
Developer’s dream
•  I can have one codebase for my application tracked in
revision that runs anywhere
•  build, ship and run anywhere
AND
•  I can offload deployment, HA, scaling, upgrade strategy
and not worry about it
Containers + Kubernetes + Cloud Scale !
Design
Develop
Test and
automation
Release AGILE
( developers dream)
What does this mean for the application
•  Application: collection of independent microservies
•  Microservice: packaged as containers, developed and delivered
following continuous delivery and continuous integration model
•  Containers: managed and orchestrated by some one else (like
Kubernetes)
AND
•  Applying security best practices through out
Microservice and Containers are foundation for Cloud Native architecture !
Building Containers
•  Small Trusted Images
•  private trusted repo for organization ensuring authenticity of the
base image
•  Remove any vulnerabilities
•  scanning tools integrated into ongoing process.
•  Sensitive Data (eg password ) not on docker file.
•  It should be passed at runtime
•  Self Contained
•  Immutable
•  Single process recommended per container Infrastructure!
!
OS !
!
Docker Engine!
!
App + Bins/
library!
!
App + Bins/
library!
!
Inside Container
•  Use a non root user inside the container
•  Explicitly call out and isolate dependencies
•  No ownership of supporting subsystems like storage
•  Configurations in config maps
•  Use secrets for sensitive info
•  Long lasting data should be stored in a database or shared PV
•  Run with minimal privileges
•  Disposable: Let container orchestrator handle the failure
•  Log to stdout and stderr
What's next – The hosting part
Production application is composed of multiple containers and needs to be
deployed across multiple host.
Need orchestration in place to manage containers for
•  Resiliency, HA, Scale out and in
•  Security- install and access
•  Upgrade and rollback strategy
•  Monitoring, Logging and metering
•  Storage management
•  And more
-
Kubernetes
Kubernetes provides deployment automation, scaling and management of
containerized application
•  Controls and automates application deployments and updates.
•  Provides HA and Scales containerized applications and their resources on
the fly.
•  Provides health-check and self-heal for the applications
•  Mounts and adds storage to run stateful apps.
•  And more
Kubernetes basic concepts
Pod : group of related containers with storage option and a unique IP
Service: group of related Pods and policy defining how to access them
Volume: data in container dies with container,
Nodes: where pods and services run. Nodes can be across VMs
Master coordinates all the Nodes in the cluster and manages replicas
Labels: simple key value pairs that can be applied to pods, services etc.
Service
Scaling
For: Reliability, High availability, Scaling and
rolling updates
Deployments:
Instructs cluster how to create and scale apps
Replica set:
ensures specified number of pods are
always running specified in deployment
Auto-scaling: HPA
Dynamically scaling the pods based on resource
usage
Also see CA and VPA
Replica set
containercontainer
Deployment
HPA
(policy)
Resource
metric
(usage)
kind: Deployment
metadata:
name: nginx
spec:
replicas: 2
template:
metadata:
labels:
service: http-server
spec:
containers:
- name: nginx
image: nginx:1.10.2
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
Update strategy: Rolling updates
Deployments allows for rolling out updates for cases
where backward compatible updates ( security or
feature updates )needs to be made
minReadySeconds: time it takes for app to boot
maxSurge: number of pods in addition to desired ones
maxUnavailable: number of pods that can be
unavailable
minReadySeconds: 5
strategy:
# indicate which strategy we
want for rolling update
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
Application stability
Default behavior : Kubernetes sends traffic to pods
The default behavior can be changed with
- Liveliness Probe: indicator that application is
running
- Readiness Probe : indicator that application is
ready to serve traffic
Types of probes and configuration
- HTTP
- Command
- TCP
livenessProbe:
httpGet:
path: /healthcheck
port: 8080
httpHeaders:
- name: X-Custom-Header
value: Awesome
initialDelaySeconds: 5
periodSeconds: 3
Any code greater than or 200
and less than 400=suuess
Request & limits And Resource quota
Specify Compute resources for containers
- specify how much CPU and memory (RAM) each Container needs.
- Set requests and limits
Set resource quota
•  A resource quota provides constraints towards aggregate resource
consumption per namespace
•  Once quota in a namespace for compute resources like cpu and
memory is set, the users are forced to set requests or limits for those
values
•  If not set, the quota system may reject pod creation
requests.<compute resource> is the maximum combined CPU
requests in millicores for all the containers in the Namespace.
Limits.<<compute resource> is the maximum combined CPU limits for
all the containers in the Namespace.
Resources:
requests:
memory: “ 64Mi”
cpu: “200m”
limits:
memory : “64Mi”
cpu : “200m”
kind: ResourceQuota
metadata:
name: demo
spec:
hard:
requets.memory: 300Mib
requests.cpu: 500m
limit.memory: 500Mib
limit.cpu: 700m
Security
Provided by K8s provider
•  All components should use certificates
•  TLS enablement
•  Disable any and all anonymous logins
•  Audit trail for any CRUD operations
•  Disable any and all insecure ports
•  Authentication, Authorization and Admission Controller
•  Image admission controller
•  Pod Security policy: Cluster level resource controlling actions that pods
can perform
•  Vulnerability and mutation monitoring
Organizing in K8s
•  Use Namespaces to segregate the cluster for use by departments or dev
teams
•  Provides isolated env to set policies and naming resources
•  Resources created in one namespace is hidden from other namespaces
•  Admins can control resources allocated to namespaces
•  RBAC policy scoped for appropriate authority
Summary – CI + CD + CS
!
Build!
!
!
Ship!
!
!
Deploy!
!
!
Run!
!
•  Small base images
•  Secure
•  Immutable
•  Signed images
•  Deny unknown
images
•  Separate automation
from user actions
•  No elevation of
privileges
•  Permissions on
volume
•  Audit trail
•  PSP
•  Resource
management
•  Fine grained RBAC
•  Handle sensitive data
•  Scaling
•  HA
•  Upgrade strategy
Production thinking needs to be through entire pipeline
IBM Cloud Private (ICP) Overview
18
Choose your
infrastructure:
IBM Z
Content Catalog
Open Source and IBM Middleware, Data, Analytics,
and AI Software
Core Operational Services
Log Management, Monitoring, Metering, Security, Alerting,
Deployment
Kubernetes Container
Orchestration Platform
Strategic Value:
•  Self-service catalog
•  Agility, scalability, and
elasticity
•  Self-healing
•  Enterprise security
•  No vendor lock-in
ICP-Built with open standards, preventing
vendor lock-in
Automate
deployment, scaling,
and management of
containerized
applications
Define, install, and
upgrade Kubernetes
applications
Executable package
of software that
includes everything
needed to run it
Text or image Text or image Text or image
Containers Orchestration Management
Infrastructure as
code to provision
public cloud and on-
premises
environments
Text or image
Provisioning
Digital Assets
http://ibm.biz/ICP-Garage http://ibm.biz/ICP-DTE
Garage Method Digital Technical
Engagement
•  Reference architectures
•  Best practices
•  Guided demos
•  Proof of Technology
http://ibm.biz/ICP-Home
Home Page
•  Private cloud overview
•  Intro videos
•  IBM Cloud Private for
Dummies book
ICP - Security
•  OpenID Connect provider in Liberty profile
is used to authenticate users
•  Integrates with client’s enterprise LDAP
•  Users and groups are imported into the
ICP platform for authorization purposes
Identity
•  Role-based access control based on teams
•  A ‘team’ is a logical grouping of resources, users, and
user groups
•  Users and user groups are assigned roles within a team
that gives them permissions associated with each
assigned role on resources within this team
•  Access control gateway enforces role based access
control for all registered services
Access Control
•  Calico based
•  Isolate traffic based on Namespaces (logical
scope) & or Nodes (physical scope) or both
•  Fine grained control over the sharing of
objects within a single namespace.
Network Security
•  Any ICP state is encrypted
•  All ICP secrets are encrypted at rest and
isolated through Role Based Access
Control
Data at Rest Protection
•  Vulnerability/Mutation Advisor
•  Private Image Repository
•  Image Admission Controller Polices for
Namespace gating
Image Security
Audit Logging, Compliance, Inter-Node
Communication, Cert Management …

More Related Content

What's hot

Openstack_administration
Openstack_administrationOpenstack_administration
Openstack_administration
Ashish Sharma
 
Barbican 1.0 - Open Source Key Management for OpenStack
Barbican 1.0 - Open Source Key Management for OpenStackBarbican 1.0 - Open Source Key Management for OpenStack
Barbican 1.0 - Open Source Key Management for OpenStack
jarito030506
 
Intel open stack-summit-session-nov13-final
Intel open stack-summit-session-nov13-finalIntel open stack-summit-session-nov13-final
Intel open stack-summit-session-nov13-final
Deepak Mane
 
Introduction to OpenStack (Juno)
Introduction to OpenStack (Juno)Introduction to OpenStack (Juno)
Introduction to OpenStack (Juno)
Krunal Jain
 

What's hot (20)

Locking the Doors, Securing the Appliances
Locking the Doors, Securing the AppliancesLocking the Doors, Securing the Appliances
Locking the Doors, Securing the Appliances
 
Openstack_administration
Openstack_administrationOpenstack_administration
Openstack_administration
 
Introduction to the DevNet Sandbox and IVT
Introduction to the DevNet Sandbox and IVTIntroduction to the DevNet Sandbox and IVT
Introduction to the DevNet Sandbox and IVT
 
컨테이너 기술 소개 - Warden, Garden, Docker
컨테이너 기술 소개 - Warden, Garden, Docker컨테이너 기술 소개 - Warden, Garden, Docker
컨테이너 기술 소개 - Warden, Garden, Docker
 
Cloud and OpenStack
Cloud and OpenStackCloud and OpenStack
Cloud and OpenStack
 
OpenStack- A ringside view of Services and Architecture
OpenStack- A ringside view of Services and ArchitectureOpenStack- A ringside view of Services and Architecture
OpenStack- A ringside view of Services and Architecture
 
Build Robust Blockchain Services with Hyperledger and Containers
Build Robust Blockchain Services with Hyperledger and ContainersBuild Robust Blockchain Services with Hyperledger and Containers
Build Robust Blockchain Services with Hyperledger and Containers
 
AWS network services
AWS network servicesAWS network services
AWS network services
 
[DevDay 2016] OpenStack and approaches for new users - Speaker: Chi Le – Head...
[DevDay 2016] OpenStack and approaches for new users - Speaker: Chi Le – Head...[DevDay 2016] OpenStack and approaches for new users - Speaker: Chi Le – Head...
[DevDay 2016] OpenStack and approaches for new users - Speaker: Chi Le – Head...
 
Barbican 1.0 - Open Source Key Management for OpenStack
Barbican 1.0 - Open Source Key Management for OpenStackBarbican 1.0 - Open Source Key Management for OpenStack
Barbican 1.0 - Open Source Key Management for OpenStack
 
Containers and microservices for realists
Containers and microservices for realistsContainers and microservices for realists
Containers and microservices for realists
 
Apache Kafka Security
Apache Kafka Security Apache Kafka Security
Apache Kafka Security
 
Kafka Security
Kafka SecurityKafka Security
Kafka Security
 
Protecting Your IP with Perforce Helix and Interset
Protecting Your IP with Perforce Helix and IntersetProtecting Your IP with Perforce Helix and Interset
Protecting Your IP with Perforce Helix and Interset
 
Edge 2016 Session 1886 Building your own docker container cloud on ibm power...
Edge 2016 Session 1886  Building your own docker container cloud on ibm power...Edge 2016 Session 1886  Building your own docker container cloud on ibm power...
Edge 2016 Session 1886 Building your own docker container cloud on ibm power...
 
Conquering Disaster Recovery Challenges and Out-of-Control Data with the Hybr...
Conquering Disaster Recovery Challenges and Out-of-Control Data with the Hybr...Conquering Disaster Recovery Challenges and Out-of-Control Data with the Hybr...
Conquering Disaster Recovery Challenges and Out-of-Control Data with the Hybr...
 
As a Service: Cloud Foundry on OpenStack - Lessons Learnt
As a Service: Cloud Foundry on OpenStack - Lessons LearntAs a Service: Cloud Foundry on OpenStack - Lessons Learnt
As a Service: Cloud Foundry on OpenStack - Lessons Learnt
 
Intel open stack-summit-session-nov13-final
Intel open stack-summit-session-nov13-finalIntel open stack-summit-session-nov13-final
Intel open stack-summit-session-nov13-final
 
Introduction to OpenStack (Juno)
Introduction to OpenStack (Juno)Introduction to OpenStack (Juno)
Introduction to OpenStack (Juno)
 
Private Cloud with Open Stack, Docker
Private Cloud with Open Stack, DockerPrivate Cloud with Open Stack, Docker
Private Cloud with Open Stack, Docker
 

Similar to From Containerized Application to Secure and Scaling With Kubernetes

How kubernetes operators can rescue dev secops in midst of a pandemic updated
How kubernetes operators can rescue dev secops in midst of a pandemic updatedHow kubernetes operators can rescue dev secops in midst of a pandemic updated
How kubernetes operators can rescue dev secops in midst of a pandemic updated
Shikha Srivastava
 
Kubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CDKubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CD
Stfalcon Meetups
 

Similar to From Containerized Application to Secure and Scaling With Kubernetes (20)

How kubernetes operators can rescue dev secops in midst of a pandemic updated
How kubernetes operators can rescue dev secops in midst of a pandemic updatedHow kubernetes operators can rescue dev secops in midst of a pandemic updated
How kubernetes operators can rescue dev secops in midst of a pandemic updated
 
Centralize and Simplify Secrets Management for Red Hat OpenShift Container En...
Centralize and Simplify Secrets Management for Red Hat OpenShift Container En...Centralize and Simplify Secrets Management for Red Hat OpenShift Container En...
Centralize and Simplify Secrets Management for Red Hat OpenShift Container En...
 
Un-clouding the cloud
Un-clouding the cloudUn-clouding the cloud
Un-clouding the cloud
 
Azure meetup cloud native concepts - may 28th 2018
Azure meetup   cloud native concepts - may 28th 2018Azure meetup   cloud native concepts - may 28th 2018
Azure meetup cloud native concepts - may 28th 2018
 
API Tips & Tricks - Policy Management and Elastic Deployment
API Tips & Tricks - Policy Management and Elastic DeploymentAPI Tips & Tricks - Policy Management and Elastic Deployment
API Tips & Tricks - Policy Management and Elastic Deployment
 
Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015
 
.NET microservices with Azure Service Fabric
.NET microservices with Azure Service Fabric.NET microservices with Azure Service Fabric
.NET microservices with Azure Service Fabric
 
High Performance Computing Pitch Deck
High Performance Computing Pitch DeckHigh Performance Computing Pitch Deck
High Performance Computing Pitch Deck
 
Kubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CDKubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CD
 
Enhancing Data Protection Workflows with Kanister And Argo Workflows
Enhancing Data Protection Workflows with Kanister And Argo WorkflowsEnhancing Data Protection Workflows with Kanister And Argo Workflows
Enhancing Data Protection Workflows with Kanister And Argo Workflows
 
Virtualization Vs. Containers
Virtualization Vs. ContainersVirtualization Vs. Containers
Virtualization Vs. Containers
 
Why kubernetes matters
Why kubernetes mattersWhy kubernetes matters
Why kubernetes matters
 
Simplify Your Way To Expert Kubernetes Management
Simplify Your Way To Expert Kubernetes ManagementSimplify Your Way To Expert Kubernetes Management
Simplify Your Way To Expert Kubernetes Management
 
Docker Roadshow 2016
Docker Roadshow 2016Docker Roadshow 2016
Docker Roadshow 2016
 
Webinar: How and Why to Containerize Your Legacy Applications
Webinar: How and Why to Containerize Your Legacy ApplicationsWebinar: How and Why to Containerize Your Legacy Applications
Webinar: How and Why to Containerize Your Legacy Applications
 
GitOps 101 Presentation.pdf
GitOps 101 Presentation.pdfGitOps 101 Presentation.pdf
GitOps 101 Presentation.pdf
 
[OpenInfra Days Vietnam 2019] Innovation with open sources and app modernizat...
[OpenInfra Days Vietnam 2019] Innovation with open sources and app modernizat...[OpenInfra Days Vietnam 2019] Innovation with open sources and app modernizat...
[OpenInfra Days Vietnam 2019] Innovation with open sources and app modernizat...
 
DCHQ
DCHQDCHQ
DCHQ
 
Containers as Infrastructure for New Gen Apps
Containers as Infrastructure for New Gen AppsContainers as Infrastructure for New Gen Apps
Containers as Infrastructure for New Gen Apps
 
Business and IT agility through DevOps and microservice architecture powered ...
Business and IT agility through DevOps and microservice architecture powered ...Business and IT agility through DevOps and microservice architecture powered ...
Business and IT agility through DevOps and microservice architecture powered ...
 

More from Shikha Srivastava

More from Shikha Srivastava (14)

ADDO_2022_SRE Architectural Patterns_Nov10.pptx
ADDO_2022_SRE Architectural Patterns_Nov10.pptxADDO_2022_SRE Architectural Patterns_Nov10.pptx
ADDO_2022_SRE Architectural Patterns_Nov10.pptx
 
DevOpsEnterpriseSummit_SaaSAnd DisasterRecovery.pptx
DevOpsEnterpriseSummit_SaaSAnd DisasterRecovery.pptxDevOpsEnterpriseSummit_SaaSAnd DisasterRecovery.pptx
DevOpsEnterpriseSummit_SaaSAnd DisasterRecovery.pptx
 
WITS 2022_ModernizationAndInfrastructureAsCode.pptx
WITS 2022_ModernizationAndInfrastructureAsCode.pptxWITS 2022_ModernizationAndInfrastructureAsCode.pptx
WITS 2022_ModernizationAndInfrastructureAsCode.pptx
 
Using Cloud-Native and SRE Principles to Achieve Speed and Resiliency
Using Cloud-Native and SRE Principles to Achieve Speed and ResiliencyUsing Cloud-Native and SRE Principles to Achieve Speed and Resiliency
Using Cloud-Native and SRE Principles to Achieve Speed and Resiliency
 
Managing integration in a multi cluster world
Managing integration in a multi cluster worldManaging integration in a multi cluster world
Managing integration in a multi cluster world
 
Helm summit 2019_handling large number of charts_sept 10
Helm summit 2019_handling large number of charts_sept 10Helm summit 2019_handling large number of charts_sept 10
Helm summit 2019_handling large number of charts_sept 10
 
Why Ibm cloud private
Why Ibm cloud private Why Ibm cloud private
Why Ibm cloud private
 
Bluemix application monitoring
Bluemix application monitoring Bluemix application monitoring
Bluemix application monitoring
 
Modernization: Moving workloads to cloud
Modernization: Moving workloads to cloud Modernization: Moving workloads to cloud
Modernization: Moving workloads to cloud
 
Kibana globalization at the RTP meetup
Kibana globalization at the RTP meetupKibana globalization at the RTP meetup
Kibana globalization at the RTP meetup
 
Localizing kibana for the global language landscape
Localizing kibana for the global language landscapeLocalizing kibana for the global language landscape
Localizing kibana for the global language landscape
 
Developing and Deploying Microservices to IBM Cloud Private
Developing and Deploying Microservices to IBM Cloud PrivateDeveloping and Deploying Microservices to IBM Cloud Private
Developing and Deploying Microservices to IBM Cloud Private
 
4789 creating production-ready, secure and scalable applications in ibm cloud...
4789 creating production-ready, secure and scalable applications in ibm cloud...4789 creating production-ready, secure and scalable applications in ibm cloud...
4789 creating production-ready, secure and scalable applications in ibm cloud...
 
Panelist at women breakfast discussing latest technology trends at Elasticon
Panelist at women breakfast discussing latest technology trends at Elasticon Panelist at women breakfast discussing latest technology trends at Elasticon
Panelist at women breakfast discussing latest technology trends at Elasticon
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

From Containerized Application to Secure and Scaling With Kubernetes

  • 1. From Containerized Applications to secure and scaling with Kubernetes Shikha Srivastava @shikhasthoughts IBM Erica Brown @ericabrEngineer IBM
  • 2. Ready for production application •  Secure •  Installation and access •  Resilient, Highly Available and scale •  Repeated deployment •  with safe upgrades and configuration changes •  Performance •  Obervability •  more ….. •  And AGILE too
  • 3. Production Setup with failover Load balancer! ! Replication,! Scaling! Health Checker! Manage multi zone! Load balancer! (failover)! Production! Production Failover! Ahh… think of: •  Code maintenance •  multiple language across multiple different machine •  Reliable code updates and rollback •  Scaling •  Transaction and Data replication •  And more Internet User!
  • 4. Developer’s dream •  I can have one codebase for my application tracked in revision that runs anywhere •  build, ship and run anywhere AND •  I can offload deployment, HA, scaling, upgrade strategy and not worry about it Containers + Kubernetes + Cloud Scale ! Design Develop Test and automation Release AGILE ( developers dream)
  • 5. What does this mean for the application •  Application: collection of independent microservies •  Microservice: packaged as containers, developed and delivered following continuous delivery and continuous integration model •  Containers: managed and orchestrated by some one else (like Kubernetes) AND •  Applying security best practices through out Microservice and Containers are foundation for Cloud Native architecture !
  • 6. Building Containers •  Small Trusted Images •  private trusted repo for organization ensuring authenticity of the base image •  Remove any vulnerabilities •  scanning tools integrated into ongoing process. •  Sensitive Data (eg password ) not on docker file. •  It should be passed at runtime •  Self Contained •  Immutable •  Single process recommended per container Infrastructure! ! OS ! ! Docker Engine! ! App + Bins/ library! ! App + Bins/ library! !
  • 7. Inside Container •  Use a non root user inside the container •  Explicitly call out and isolate dependencies •  No ownership of supporting subsystems like storage •  Configurations in config maps •  Use secrets for sensitive info •  Long lasting data should be stored in a database or shared PV •  Run with minimal privileges •  Disposable: Let container orchestrator handle the failure •  Log to stdout and stderr
  • 8. What's next – The hosting part Production application is composed of multiple containers and needs to be deployed across multiple host. Need orchestration in place to manage containers for •  Resiliency, HA, Scale out and in •  Security- install and access •  Upgrade and rollback strategy •  Monitoring, Logging and metering •  Storage management •  And more -
  • 9. Kubernetes Kubernetes provides deployment automation, scaling and management of containerized application •  Controls and automates application deployments and updates. •  Provides HA and Scales containerized applications and their resources on the fly. •  Provides health-check and self-heal for the applications •  Mounts and adds storage to run stateful apps. •  And more
  • 10. Kubernetes basic concepts Pod : group of related containers with storage option and a unique IP Service: group of related Pods and policy defining how to access them Volume: data in container dies with container, Nodes: where pods and services run. Nodes can be across VMs Master coordinates all the Nodes in the cluster and manages replicas Labels: simple key value pairs that can be applied to pods, services etc.
  • 11. Service Scaling For: Reliability, High availability, Scaling and rolling updates Deployments: Instructs cluster how to create and scale apps Replica set: ensures specified number of pods are always running specified in deployment Auto-scaling: HPA Dynamically scaling the pods based on resource usage Also see CA and VPA Replica set containercontainer Deployment HPA (policy) Resource metric (usage) kind: Deployment metadata: name: nginx spec: replicas: 2 template: metadata: labels: service: http-server spec: containers: - name: nginx image: nginx:1.10.2 imagePullPolicy: IfNotPresent ports: - containerPort: 80
  • 12. Update strategy: Rolling updates Deployments allows for rolling out updates for cases where backward compatible updates ( security or feature updates )needs to be made minReadySeconds: time it takes for app to boot maxSurge: number of pods in addition to desired ones maxUnavailable: number of pods that can be unavailable minReadySeconds: 5 strategy: # indicate which strategy we want for rolling update type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 0
  • 13. Application stability Default behavior : Kubernetes sends traffic to pods The default behavior can be changed with - Liveliness Probe: indicator that application is running - Readiness Probe : indicator that application is ready to serve traffic Types of probes and configuration - HTTP - Command - TCP livenessProbe: httpGet: path: /healthcheck port: 8080 httpHeaders: - name: X-Custom-Header value: Awesome initialDelaySeconds: 5 periodSeconds: 3 Any code greater than or 200 and less than 400=suuess
  • 14. Request & limits And Resource quota Specify Compute resources for containers - specify how much CPU and memory (RAM) each Container needs. - Set requests and limits Set resource quota •  A resource quota provides constraints towards aggregate resource consumption per namespace •  Once quota in a namespace for compute resources like cpu and memory is set, the users are forced to set requests or limits for those values •  If not set, the quota system may reject pod creation requests.<compute resource> is the maximum combined CPU requests in millicores for all the containers in the Namespace. Limits.<<compute resource> is the maximum combined CPU limits for all the containers in the Namespace. Resources: requests: memory: “ 64Mi” cpu: “200m” limits: memory : “64Mi” cpu : “200m” kind: ResourceQuota metadata: name: demo spec: hard: requets.memory: 300Mib requests.cpu: 500m limit.memory: 500Mib limit.cpu: 700m
  • 15. Security Provided by K8s provider •  All components should use certificates •  TLS enablement •  Disable any and all anonymous logins •  Audit trail for any CRUD operations •  Disable any and all insecure ports •  Authentication, Authorization and Admission Controller •  Image admission controller •  Pod Security policy: Cluster level resource controlling actions that pods can perform •  Vulnerability and mutation monitoring
  • 16. Organizing in K8s •  Use Namespaces to segregate the cluster for use by departments or dev teams •  Provides isolated env to set policies and naming resources •  Resources created in one namespace is hidden from other namespaces •  Admins can control resources allocated to namespaces •  RBAC policy scoped for appropriate authority
  • 17. Summary – CI + CD + CS ! Build! ! ! Ship! ! ! Deploy! ! ! Run! ! •  Small base images •  Secure •  Immutable •  Signed images •  Deny unknown images •  Separate automation from user actions •  No elevation of privileges •  Permissions on volume •  Audit trail •  PSP •  Resource management •  Fine grained RBAC •  Handle sensitive data •  Scaling •  HA •  Upgrade strategy Production thinking needs to be through entire pipeline
  • 18. IBM Cloud Private (ICP) Overview 18 Choose your infrastructure: IBM Z Content Catalog Open Source and IBM Middleware, Data, Analytics, and AI Software Core Operational Services Log Management, Monitoring, Metering, Security, Alerting, Deployment Kubernetes Container Orchestration Platform Strategic Value: •  Self-service catalog •  Agility, scalability, and elasticity •  Self-healing •  Enterprise security •  No vendor lock-in
  • 19. ICP-Built with open standards, preventing vendor lock-in Automate deployment, scaling, and management of containerized applications Define, install, and upgrade Kubernetes applications Executable package of software that includes everything needed to run it Text or image Text or image Text or image Containers Orchestration Management Infrastructure as code to provision public cloud and on- premises environments Text or image Provisioning
  • 20. Digital Assets http://ibm.biz/ICP-Garage http://ibm.biz/ICP-DTE Garage Method Digital Technical Engagement •  Reference architectures •  Best practices •  Guided demos •  Proof of Technology http://ibm.biz/ICP-Home Home Page •  Private cloud overview •  Intro videos •  IBM Cloud Private for Dummies book
  • 21.
  • 22. ICP - Security •  OpenID Connect provider in Liberty profile is used to authenticate users •  Integrates with client’s enterprise LDAP •  Users and groups are imported into the ICP platform for authorization purposes Identity •  Role-based access control based on teams •  A ‘team’ is a logical grouping of resources, users, and user groups •  Users and user groups are assigned roles within a team that gives them permissions associated with each assigned role on resources within this team •  Access control gateway enforces role based access control for all registered services Access Control •  Calico based •  Isolate traffic based on Namespaces (logical scope) & or Nodes (physical scope) or both •  Fine grained control over the sharing of objects within a single namespace. Network Security •  Any ICP state is encrypted •  All ICP secrets are encrypted at rest and isolated through Role Based Access Control Data at Rest Protection •  Vulnerability/Mutation Advisor •  Private Image Repository •  Image Admission Controller Polices for Namespace gating Image Security Audit Logging, Compliance, Inter-Node Communication, Cert Management …