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

Kubernetes and Weave.net on bare metal

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.

Kubernetes and Weave.net on bare metal

Talk about managing containers on bare metal hosts.
Video: https://youtu.be/8v7vW_Eybkg?t=4314

Avatar for Maxim Filatov

Maxim Filatov

April 14, 2018

More Decks by Maxim Filatov

Other Decks in Technology

Transcript

  1. SSL: two bundles SSL: two bundles Kubernetes CA apiserver keypair

    kubelets keypair Etcd CA peers keypair clients keypair
  2. SSL: full paranoia SSL: full paranoia apiserver CA keypairs kubelets

    CA keypairs etcd peers CA keypairs etcd clients CA keypairs
  3. Etcd: initial args Etcd: initial args --initial-advertise-peer-urls=https://etcd0:2380 \ --initial-cluster-state=new \

    --initial-cluster-token=RfDz6BPYvQWSshe8J0cEhUoAGbnm1LfgS0A77EsjCa \ --initial-cluster=etcd0=https://etcd0:2380,etcd1=https://etcd1:2380,etcd2=https://etcd2
  4. Etcd: add node Etcd: add node on any old member:

    on a new member start etcd changing following opts: $ etcdctl member add name peerURL --initial-cluster-state=existing --initial-cluster=all-old-members,https://new-member:2380
  5. Etcd: remove node Etcd: remove node on any live member:

    $ etcdctl member list $ etcdctl member remove ID
  6. Master node: addon manager Master node: addon manager /etc/kubernetes/addons labels

    simple shell script metadata: labels: addonmanager.kubernetes.io/mode: Recon kubernetes.io/cluster-service: "true"
  7. CNI: portmap CNI: portmap forward tra c from one or

    more ports on the host to the container chained
  8. CNI: con guration CNI: con guration /etc/cni/net.d/10-weave.conflist { "cniVersion": "0.3.1",

    "name": "weave", "plugins": [ { "name": "weave", "type": "weave-net", "hairpinMode": true }, { "type": "portmap", "capabilities": { "portMappings": true }, "snat": true } ] }
  9. Networks Networks Host network Pod network (CNI) Service network (Net

    lter) Don’t forget ip route add service_network dev internal_interface
  10. Encryption con g Encryption con g kind: EncryptionConfig apiVersion: v1

    resources: - resources: - secrets - configmaps providers: - aescbc: keys: - name: key1 secret: RnVjayB0aGlzIHNoaXQhCg== - identity: {}
  11. Actually encrypting the data Actually encrypting the data $ kubectl

    get secrets --all-namespaces -o json | kubectl replace -f -
  12. Authentication: strategies Authentication: strategies X509 Client Certs Static Token File

    Static Password File OpenID Connect Tokens Webhook Token Authentication DEX