Kubernetes for lazy people ..lessons learned deploying k8s (in aws)

..but it looks really cool and I'm tired of using 10% of my CPU

simple k8s checklist • will there be persistent storage required? • how will you manage upgrading it? • where will you persist logs • Can I reasonably secure it? • where will long term metrics live if you have no state storage?

Kubernetes supports persistent volumes • ... whats the problem?

OK so I'm lazy.. lets do this without state • Good news is now you can really easily orchestrate your apps • bad(ish) news is that now you need to run your datastores alongside your cluster... • Life-cycle of clusters is simplified.. you can now "blue/green" k8s clusters themselves (unless application load is your typical bottleneck)

Enter kubernetes/kops (ascinema) • kops is a go app that functions similarly to kubectl • It deploys and manages a pretty stable and decently pre-rolled cluster for you • it uses similar principals to terraform • got an s3 bucket and a route53 subdomain? • feature lists will probably be missing something that you want (but just ask, they're super friendly, see #sig-aws on k8s slack)

...some considerations for prod • Do you need namespace segregation within your cluster? (if so.. ensure you enable a CNI plugin) • Do you need to put this into private subnets inside an existing VPC? (if your subnet ranges consume the entire VPC subnet you're gonna need a new VPC or some kinda heroics) • The https://api.{{FQDN}} of your cluster will be on a public IP (last I checked.. you might want to put an IP whitelist on this..) • What about granting RW/RO access to the API to specific users/groups/teams (and to defined resources?)

Birthing your new cluster ./kops-linux-amd64 create cluster \ --channel=alpha --vpc=vpc-a12345bc \ --network-cidr=10.0.123.0/19 \ --zones=eu-west-1a,eu-west-1b,eu-west-1c \ --master-zones=eu-west-1a,eu-west-1b,eu-west-1c \ --master-size=t2.medium \ --node-size=t2.medium \ --ssh-public-key=/home/you/.ssh/id_rsa_key.pub \ --topology=private \ --networking=weave \ new-cluster.example.com

Namespace segregation • On default k8s allows containers in all namespaces to talk to each other • Even when pods live in different namespaces pods can discover each others service ports and connect to each other

Sample k8s namespace policy

Granting containers access to IAM resources

see: https://github.com/jtblin/kube2iam

Check that apps pull at least the default policy

Sample terraform for a real-life policy

Prometheus overview • deploy prometheus within the cluster • Then expose it on an ELB (type: LoadBalancer) •

• Scrape that ELB from your primary prometheus

sample build pipeline in Groovy

doDeploy()

Tip: "kubectl rollout status deployment/xyz"

OK job done...

Kubernetes for lazy people.pdf

Kubernetes supports persistent volumes. • ... whats the problem? Page 5 of 19. Kubernetes for lazy people.pdf. Kubernetes for lazy people.pdf. Open. Extract.

1MB Sizes 1 Downloads 120 Views

Recommend Documents

Lazy Learners at work: the Lazy Learning Toolbox ... - ULB CoDE
In Section 2 we will introduce the Lazy Learning method in formal ... O nce obtained the local first-degree polynomial approximation, a prediction ... O n the basis of this information a final prediction .... collaboration of Iridia with the H oneywe

The Lazy Editor.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. The Lazy Editor.

Introducing Heuristics for Lazy-Grounding ASP Solving
If a conflict occurs, it is analyzed in (a) and a new nogood is ..... space requirements, and statistical data like standard deviations will be recorded by means of a ...

SPROUT: Lazy vs. Eager Query Plans for Tuple ...
query Q and a probabilistic database D, compute the distinct possible tuples in the ... the probability of 1OF formulas by mapping AND into product and OR into ...

Lazy Panorama Table
intersections. Since the development of this project in 2006 we have .... in a MySQL database for extendibility, and integrated into the interface through PHP. As.

SPROUT: Lazy vs. Eager Query Plans for Tuple ...
2Department of Computer Science, Cornell University, Ithaca, NY 14853, USA. Abstract—A paramount challenge in probabilistic databases is the scalable ...

Lavender Lazy Daisy Section jpeg.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Lavender Lazy Daisy Section jpeg.pdf. Lavender Lazy Daisy Section jpeg.pdf. Open. Extract. Open with. Sign I

Bruno Mars - The Lazy song.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Bruno Mars ...

Kubernetes 101.pdf
Page 1 of 8. Kubernetes 101. Workshop. Neependra Khare, CloudYuga. Praveen Kumar, Red Hat. PyCon 2017. Page 1 of 8 ...

Kubernetes 101.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Kubernetes 101.

Docker-Kubernetes-Configuration.pdf
Docker for Mac (macOS). Docker for Windows (Microsoft Windows 10). Page 5 of 25. Docker-Kubernetes-Configuration.pdf. Docker-Kubernetes-Configuration.

Lazy Gardener & Friends Houston Garden Newsletter - 20150220.pdf
Next week, Baxter Williams of the Houston Rose Society. will give us some great rose advice. WHITE STUFF ON PLUMERIAS. As long as we're looking at readers' questions, Joyce sent in the picture (insert at center above) of. "...white stuff on my plumer

Lazy Gardener & Friends Houston Garden Newsletter - 20150220.pdf
technical specialists who will chime in and tweak away regularly. ... Garden Newsletter https://mail.google.com/mail/u/0/?ui=2&ik=171077964c&view=pt&.

Strategic Candidacy Games with Lazy Candidates - ePrints Soton
compare them with the Nash equilibria of the stan- dard model. 1 Introduction. In his paper “Independence of clones as a criterion for voting rules” [1987] Nicolaus Tideman tells the following story: When I was 12 years old I was nominated to be

pdf-1826\lazy-tommy-pumpkinhead-by-william-pene ...
pdf-1826\lazy-tommy-pumpkinhead-by-william-pene-du-bois.pdf. pdf-1826\lazy-tommy-pumpkinhead-by-william-pene-du-bois.pdf. Open. Extract. Open with.