#kubernetes - July 2019

davidvasandani
davidvasandaniover 7 years ago
davidvasandani
davidvasandaniover 7 years ago

Sanic is an omni-tool which lets you build, deploy, and manage Kubernetes clusters.
btai
btaiover 7 years ago
reminds me of #geodesic
PePe Amengual
PePe Amengualover 7 years ago
anyone running a container with 200GB+ memory ?
PePe Amengual
PePe Amengualover 7 years ago
somebody mentioned a tool for setting ENV variables for docker with support for different environments ?
PePe Amengual
PePe Amengualover 7 years ago
with some template support
PePe Amengual
PePe Amengualover 7 years ago
for the life of me I can’t recall the name….
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
Anyone know if it's possible to pass settings in the config to run commands on startup (like with kops)?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
...in eksctl
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
(@mumoshu)
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
e.g. in kops, we can do:


  hooks:
  # Mitigate CVE-2019-5736
  - before:
    - docker.service
    manifest: |
      Type=oneshot
      ExecStart=/usr/bin/chattr +i /usr/bin/docker-runc
i5okie
i5okieover 7 years ago
Hi, has anyone tried the bitnami kubeprod.io stack? (https://github.com/bitnami/kube-prod-runtime)
Alex Co
Alex Coover 7 years ago
hi, anyone here knows about use boolean value with k8s ?
Alex Co
Alex Coover 7 years ago
i’m trying to read the value from Environment variable, and i realize that when setting the env var inside a pod, it’s always format it as a string
Alex Co
Alex Coover 7 years ago(edited)
for example MY_VAR=abc will be MY_VAR=‘abc’ inside a pod
Alex Co
Alex Coover 7 years ago
if any program is expecting the boolean type, it will throw error
Alex Co
Alex Coover 7 years ago
is there a way to solve this ?
Alex Co
Alex Coover 7 years ago
thanks
MiLk
MiLkover 7 years ago
environment variables are always strings
MiLk
MiLkover 7 years ago
it needs to be handled by your program or whatever library you are using
Alex Co
Alex Coover 7 years ago
thanks @MiLk
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
Higher container density is coming
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
PePe Amengual
PePe Amengualover 7 years ago(edited)
Hi, I have an idea about how I’m going to implement config templating for our containers and I will like some feedback :
- Secrets and non secrets will be stored in aws Parameter Store+KMS
- Chamber will be used to update/create secrets
- Path IAM roles will be created for every environment /dev/secrets /prod/secrets etc
- ECS Task per environment will have access to the /env path that have secrets and not secrets ( no shared configs)
- Dev will use chamber to set ENV variable to run their local containers
- confd might be use to create the config templates on Docker build
PePe Amengual
PePe Amengualover 7 years ago
most Jenkins will be doing the initial push and CodeDeploy will do the rest for Blue Green
PePe Amengual
PePe Amengualover 7 years ago
any comments ?
timduhenchanter
timduhenchanterover 7 years ago(edited)
Anyone familiar enough with Kubernetes API to maybe know a way to get the resourceVersion of the parent for a given pod? Trying to ignore events in the watch if the change was initiated by its parent (I am not the controller). This is related to a ReplicaSet
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
btai
btaiover 7 years ago
saw this at kubecon
btai
btaiover 7 years ago
my gripes wit this is the feedback loop for rebuilding an image is slow
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
what were your thoughts?
btai
btaiover 7 years ago
so during development esp. if you save alot assuming youre doing some web dev you’d typically want to refresh your browser right after you save
btai
btaiover 7 years ago
and see the changes right away
btai
btaiover 7 years ago
even during their demo at kubecon there was a bit of waiting
btai
btaiover 7 years ago
for the demo image (prob really small) to rebuild
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
I think developers mostly want live reloading
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
e.g. what you get with telepresence
btai
btaiover 7 years ago
yep
btai
btaiover 7 years ago
most prob use docker compose to spin up dependencies
btai
btaiover 7 years ago
and run their app locally
btai
btaiover 7 years ago
i think itd be awesome if you could have that type of live reloading but your app is hosted on a k8s cluster in the cloud
btai
btaiover 7 years ago
each developer would have their own namespace
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
yep - that's what we're working on
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
but haven't yet tackled telepresence
btai
btaiover 7 years ago
are you able to do live reloading comparable to running it locally
btai
btaiover 7 years ago
cause thats a gamebreaker i think for most devs
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
so with telepresence you run "the" service locally
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
but all your backing services run in k8s (e.g. in a developer namespace)
btai
btaiover 7 years ago
ah
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
telepresence is like a reverse proxy. it sits in k8s and any requests it gets it sends back to the service on your laptop
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
so it's like teleporting your local service into the cluster
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
plus your local service can access everything running in k8s (e.g. database or other backing services)
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
since it runs on your local laptop, you get all the benefits
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
easier debugging, attaching debuggers, live reloads, etc
btai
btaiover 7 years ago
ah yeah
btai
btaiover 7 years ago
but i guess other than the fact that dependent services hosted in cloud
btai
btaiover 7 years ago
is there any other benefit than running those in a docker compose
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
you're testing your services in an environment that's closer to staging/prod
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
if you have 30-40 microservices as part of your stack, good luck doing that on your laptop
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
if you need large datasets for development, can't do that easily locally
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
maybe it's nicer to have all the data stay in AWS from a security perspective
btai
btaiover 7 years ago
truee
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
multiple developers can be working on pieces of the project at the same time
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
and using a shared environment
btai
btaiover 7 years ago
so you host the db remotely as well
btai
btaiover 7 years ago
assume youre working on an API
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
its easier for others to QA changes in a public environment (e.g. if your laptop is offline, no one can review)
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
yea, usually run db as a container for these env
btai
btaiover 7 years ago
nice
btai
btaiover 7 years ago
yeah the large dataset hosted remotely one is actually really useful
btai
btaiover 7 years ago
allowing multiple devs on same project
cabrinha
cabrinhaover 7 years ago(edited)
Has anyone here been able to get Istio installed to EKS? I'm trying to get it installed with my worker nodes all residing in private subnets and I'm running into weird issues.
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
@Vidhi Virmani I think did
cabrinha
cabrinhaover 7 years ago
Most of the examples I come across online assume you're in public subnets with ELBs and security groups open to the world 😅
cabrinha
cabrinhaover 7 years ago
@Vidhi Virmani if you've installed Istio on EKS in private subnets, ping me! 😄
Dan
Danover 7 years ago
Is there a way to have helm chart create external resources?(RDS/Elasticache)
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
Then use the Helm raw chart to provision
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
The CRDs for RDS
Dan
Danover 7 years ago
Thank you!
Dan
Danover 7 years ago
What are people using as an oauth2 provider to login to their apps like k8 dashboard?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
keycloak
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago(edited)
+ gatekeeper proxies
PePe Amengual
PePe Amengualover 7 years ago
keycloak too but not for k8 but for pretty much anything
cabrinha
cabrinhaover 7 years ago
I'm interested to hear how people are using CD in Kubernetes. Is anyone doing Canary deployments on their EKS cluster? How?
i5okie
i5okieover 7 years ago
last year spent a few months troubleshooting and improving apps running in ElasticBeanstalk. with help from guys here 🙂 (thank you).
This year I’m deleting those ElasticBeanstalk stacks one by one after moving the apps to K8s. #lifeofadevopsengineer
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
haha too true. Thanks @i5okie for the update.
jober
joberover 7 years ago(edited)
I am looking at starting to use Kubernetes for the first time for a small system that I would eventually grow. Would you suggest using Kubernetes directly or using AWS EKS?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
I would give eksctl a shot
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
Probably the most turn key way to get up and running with EKS for a small project.
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
(we still use kops)
jober
joberover 7 years ago
i was playing around with kops over the weekend
jober
joberover 7 years ago
worked really well, just unsure at this point how to manage everything
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
kops is easy to get up and running.
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
the challenge with kubernetes is updates between major releases can be tricky
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
e.g. 1.11 -> 1.12 upgraded to etcd3 and there was no automated way to easily upgrade
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
while on EKS, those kinds of upgrade challenges are handled by the platform
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
also, i believe the upgrade from 1.14 to 1.15 is also that way
erik
erikover 7 years ago
jober
joberover 7 years ago
Thanks that is really good to know. I’ll give EKS a go. Much appreciated
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)over 7 years ago
we also have TF modules for EKS
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)over 7 years ago
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)over 7 years ago
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)over 7 years ago
jober
joberover 7 years ago
Awesome 🙏
jober
joberover 7 years ago
Thanks so much!
jober
joberover 7 years ago
Just found this as well, seems like a good beginner resource https://eksworkshop.com/introduction/
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 7 years ago
yes, I saw that - looks amazing
sohel2020
sohel2020over 7 years ago(edited)
is it possible to create a EKS cluster in my Existing VPC?
Steven
Stevenover 7 years ago
yes
jober
joberover 7 years ago(edited)

module "eks_cluster" {
  source                  = "git::<https://github.com/cloudposse/terraform-aws-eks-cluster.git?ref=master>"
  namespace               = "eg"
  stage                   = "testing"
  name                    = "cluster"
  tags                    = "${var.tags}"
  vpc_id                  = "<YOUR VPC ID>"
  subnet_ids              = ["<YOUR PUBLIC SUBNET ID'S>"]

  # `workers_security_group_count` is needed to prevent `count can't be computed` errors
  workers_security_group_ids   = ["${module.eks_workers.security_group_id}"]
  workers_security_group_count = 1
}
jafow
jafowover 7 years ago
I’m looking for a minimally-hacky way to restart running pods in order pickup a change in config data