By helpameout - Own work, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=20337780



Docker Engine (daemon) + CLI
FROM ubuntu:18.04WORKDIR /appCOPY hello.sh /appRUN chmod +x hello.shRUN apt-get updateRUN apt-get install curl -yCMD ["./hello.sh"]Dockerfile (one layer per command)
mycompany/hello-world:1.0.1

![]()
Definitions
Portable, extensible, open-source platform for managing containerized workloads and services
Container-orchestration system for automating application deployment, scaling, and management



Multiple resources defined in the Kubernetes API
Custom resources as well!

apiVersion: v1kind: Podmetadata: name: myapp-pod labels: app: myappspec: containers: - name: myapp-container image: busybox command: ['sh', '-c', 'echo Hello Minsk! && sleep 3600']apiVersion: apps/v1kind: ReplicaSetmetadata: name: myapp labels: app: myappspec: replicas: 5 selector: matchLabels: app: myapp template: metadata: labels: app: myapp spec: containers: - name: myapp-container image: busybox command: ['sh', '-c', 'echo Hello Minsk! && sleep 3600']apiVersion: apps/v1kind: Deploymentmetadata: name: myapp labels: app: myappspec: replicas: 5 selector: matchLabels: app: myapp template: metadata: labels: app: myapp spec: containers: - name: myapp-container image: busybox command: ['sh', '-c', 'echo Hello Minsk! && sleep 3600']




hello-web.defaultkind: ServiceapiVersion: v1metadata: name: myapp labels: app: myappspec: selector: app: myapp ports: - port: 80 name: http targetPort: 3000ClusterIP
NodePort
LoadBalancer
ExternalName
apiVersion: networking.k8s.io/v1beta1kind: Ingressmetadata: name: ingress-example annotations: nginx.ingress.kubernetes.io/rewrite-target: /spec: rules: - host: blog.example.com http: paths: - path: / backend: serviceName: blog-service servicePort: 3000 - path: /api backend: serviceName: blog-api servicePort: 8080apiVersion: v1 kind: ConfigMapmetadata: name: hello-kube-config namespace: default data: count: 1 hello: worldmy-namespace.my-serviceanother-namespace.my-service
Data plane (proxies)
iptables)Control plane
Connect
Manage
Secure




Traffic Management Resources
apiVersion: networking.istio.io/v1alpha3kind: VirtualServicemetadata: name: service-bspec: hosts: - service-b.default.svc.cluster.local http: - route: - destination: host: service-b subset: v1 weight: 98 - destination: host: service-b subset: v2 weight: 2apiVersion: networking.istio.io/v1alpha3kind: DestinationRulemetadata: name: service-bspec: host: service-b.default.svc.cluster.local subsets: - name: v1 labels: version: v1 - name: v2 labels: version: v2 trafficPolicy: tls: mode: ISTIO_MUTUAL

apiVersion: networking.istio.io/v1alpha3kind: DestinationRulemetadata: name: service-bspec: host: service-b.default.svc.cluster.local subsets: - name: v1 labels: version: v1 - name: v2 labels: version: v2 ... http: - route: - destination: host: service-b subset: v1 weight: 30


apiVersion: networking.istio.io/v1alpha3kind: ServiceEntrymetadata: name: movie-dbspec: hosts: - api.themoviedb.org ports: - number: 443 name: https protocol: HTTPS resolution: DNS location: MESH_EXTERNALapiVersion: networking.istio.io/v1alpha3kind: Gatewaymetadata: name: gatewayspec: selector: istio: ingressgateway servers: - port: number: 80 name: http protocol: HTTP hosts: - "hello.example.com"



apiVersion: networking.istio.io/v1alpha3kind: Sidecarmetadata: name: default namespace: prod-us-west-1spec: egress: - hosts: - 'prod-us-west-1/*' - 'prod-apis/*' - 'istio-system/*'High availability
Disaster recovery
apiVersion: networking.istio.io/v1alpha3kind: VirtualServicemetadata: name: service-bspec: hosts: - service-b.default.svc.cluster.local http: - route: - destination: host: service-b subset: v1 timeout: 5sapiVersion: networking.istio.io/v1alpha3kind: VirtualServicemetadata: name: service-bspec: hosts: - service-b.default.svc.cluster.local http: - route: - destination: host: service-b subset: v1 retries: attempts: 3 perTryTimeout: 3s retryOn: gateway-error,connect-failureapiVersion: networking.istio.io/v1alpha3kind: DestinationRulemetadata: name: service-bspec: host: service-b.default.svc.cluster.local trafficPolicy: tcp: maxConnections: 1 http: http1MaxPendingRequests: 1 maxRequestsPerConnection: 1 outlierDetection: consecutiveErrors: 1 interval: 1s baseEjectionTime: 3m maxEjectionPercent: 100apiVersion: networking.istio.io/v1alpha3kind: VirtualServicemetadata: name: service-bspec: hosts: - service-b.default.svc.cluster.local http: - route: - destination: host: service-b subset: v1 fault: delay: percentage: 50 fixedDelay: 2sapiVersion: networking.istio.io/v1alpha3kind: VirtualServicemetadata: name: service-bspec: hosts: - service-b.default.svc.cluster.local http: - route: - destination: host: service-b subset: v1 fault: abort: percentage: 50 httpStatus: 404spiffe://cluster.local/ns/default/sa/default)Concepts:
spiffe://cluster.local/ns/default/sa/defaultFlow
Traffic from client gets routed to the client side proxy
Client side proxy starts mTLS handshake
Client and server side proxies establish mTLS connection
Server side proxy forwards traffic to the server service
Authn policy:
Authz policy:
authentication.istio.io/v1alpha1.Policy)Scope:
Also supports JWT
Who can talk to whom
Service role
Service role binding
rbac.istio.io/v1alpha1)https://github.com/linkerd/linkerd2/issues/2846
Slides: https://slides.peterj.dev/jfuture-2019
Exercises: https://github.com/peterj/jfuture
Contact
Keyboard shortcuts
| ↑, ←, Pg Up, k | Go to previous slide |
| ↓, →, Pg Dn, Space, j | Go to next slide |
| Home | Go to first slide |
| End | Go to last slide |
| Number + Return | Go to specific slide |
| b / m / f | Toggle blackout / mirrored / fullscreen mode |
| c | Clone slideshow |
| p | Toggle presenter mode |
| t | Restart the presentation timer |
| ?, h | Toggle this help |
| Esc | Back to slideshow |