Upgrade to Pro — share decks privately, control downloads, hide ads and more …

DockerCon 2018 - Kubernetes secops with Docker

DockerCon 2018 - Kubernetes secops with Docker

In this talk, Scott Coulton will walk through how to build a container as a service platform with Docker EE. Starting from scratch he will help you figure out what orchestrator to choose by deep diving into the technical differences between swarm and kubernetes on the EE platform as well as cover some of the practical considerations that could influence your decision. He will also share various automation solutions to deploy your cluster into production. Once the cluster is up and running, Scott will delve into sec ops and discuss security best practices – including signing images in DTR (Docker Trusted Registry) and CVE scanning to provide a secure supply chain into production. You’ll leave this talk with the knowledge needed to build your own container platform in production. And did I mention it will all be done live, step-by-step?

Scott Coulton

June 15, 2018
Tweet

More Decks by Scott Coulton

Other Decks in Technology

Transcript

  1. v Let’s build a CaaS What's the difference (Swarm vs

    Kubernetes) Now for the fun stuff secops with Kubernetes Agenda
  2. Operating Systems Platform Architecture Config Mgt Monitoring Logging CI/CD ..more..

    Images Networking Volumes Physical Virtualization Public Cloud Platform Security Developer Services Registry Services Access Policies App Lifecycle Management Automation & Extensibility Networking Orchestration Storage Container Engine ENTERPRISE EDITION PLATFORM
  3. Docker EE Architecture Docker EE Cluster Node Node Node DOCKER

    ENTERPRISE EDITION Node Manager Worker Node Worker Worker Worker Node Manager Node Manager Management Plane
  4. • kubectl as the cli tool • More deployment definitions

    ie pods, svc, deployments • Plug and play networking with CNI Kubernetes
  5. Secure Supply Chain TEST STAGING • Signature verification • Native

    encryption Scanning Signing Automated Policies Docker for Mac or Docker for Windows PRODUCTION
  6. Production Environments Docker Trusted Registry Docker UCP Production Environments Version

    Control Docker UCP Non-Production Environments Developer Machine Development CI/CD Operations Datacenter 1 Datacenter 2 Docker Trusted Registry Docker for Secure Supply Chain
  7. CI Workflow Docker Trusted Registry Build container $ git clone

    $ mvn deploy Repository Manager binaries Version Control src Dockerfiles docker-compose.yml files pull push CI Agent $ docker run -it --rm builder build runs build start CI Agent $ git clone $ docker build -t myapp $ docker push myapp push pull CI Agent $ eval $(<env.sh) $ docker run $ docker service $ docker-compose up Docker UCP Test Environment CI Agent $ eval $(<env.sh) $ docker run -it --rm test uat $ docker pull myapp $ docker push myapp test pull 1 2 3 4 runs app runs tests
  8. Notary client config for your registry ~/.notary/config.json { "trust_dir" :

    "~/.docker/trust", "remote_server": { "url": "dtr_url", "root-ca": "dtr_ca.pem" } }
  9. Push and sign your application $ export DOCKER_CONTENT_TRUST=1 $ docker

    push {dtr_url/registry_url}/{account}/{repository}:{tag}
  10. The one take away from this talk “Sign your images”

    Scott Coulton Principal software engineer Puppet
  11. Run as non root apiVersion: v1 kind: Pod metadata: name:

    my-dockercon-app spec: securityContext: runAsUser: 1000
  12. Read only file system apiVersion: v1 kind: Pod metadata: name:

    my-dockercon-app spec: securityContext: readOnlyRootFilesystem: true
  13. You don't have to chose one apiVersion: v1 kind: Pod

    metadata: name: my-dockercon-app spec: securityContext: runAsUser: 1000 readOnlyRootFilesystem: true allowPrivilegeEscalation: false
  14. Selinux apiVersion: v1 kind: Pod metadata: name: my-dockercon-app spec: securityContext:

    seLinuxOptions: level: "s0:c123,c456" containers: - name: dockercon