Building Small Containers

Поделиться
HTML-код
  • Опубликовано: 30 сен 2024
  • In this episode of Kubernetes Best Practices, Sandeep Dinesh shows how you can build small containers to make your Kubernetes deployments faster and more secure.
    See the associated article here → goo.gl/zjejFj
    Google Container Registry → goo.gl/ilwubv
    Google Container Builder → goo.gl/l1Obc1
    Container Registry Vulnerability Scanning → goo.gl/5EiyLe
    Google Kubernetes Engine → goo.gl/2V8yah
    Docker Multistage Builds → goo.gl/nQmwW4
    Subscribe to the Cloud channel → goo.gl/S0AS51
    #KubernetesBestPractices
  • НаукаНаука

Комментарии • 82

  • @AnonozChong
    @AnonozChong 6 лет назад +223

    Everytime he snaps, the container image size is reduced by 50%.

    • @MichaelRicksAherne
      @MichaelRicksAherne 6 лет назад +3

      I ran to the comments to make this exact joke, and you beat me to it.

    • @alizhang3827
      @alizhang3827 4 года назад +1

      Good to see school mate

  • @mathportillo
    @mathportillo 6 лет назад +98

    this guy is amazing. let him know that!
    its very hard for this type of hosts not to be boring neither annoying. and when it happens, it often go unnoticed.

    • @zampogna
      @zampogna 4 года назад

      He works in Google, only the best are able to reach that goal.

  •  6 лет назад +7

    When using alpine you can use apk --no-cache to avoid using update and then removing the cached apk files.

  • @maaya9438
    @maaya9438 5 лет назад +11

    I never used kubernetes before but I still finish the video 😂 looks awesome

  • @peteallennh
    @peteallennh 5 лет назад +6

    This is a great video. What is it, how does it work, why do I care? Perfectly addressed, perfect level of detail, and outstanding technical embellishments in the side panel. Well done!

  • @konstantintsepelev7857
    @konstantintsepelev7857 6 лет назад +14

    For Go binaries you can use scratch, without alpine

    • @Oswee
      @Oswee 5 лет назад

      But you need to include some additional Go required binaries in first stage. And go mod download dependencies. Only Go 1.11

  • @froop2393
    @froop2393 6 лет назад +4

    what i hate about my job is that i always have to discuss about normal things like performance or memory usage to get time for it.

  • @DerekUniqueBennett
    @DerekUniqueBennett 6 лет назад +3

    This was clear, concise, and useful. Your 8:44 minutes made my teams' job much easier.

  • @ifconfigurator
    @ifconfigurator 5 лет назад +1

    I've actually found one benefit of larger images. If I build a single image that contains all of my services, that is the only image my nodes will ever need; instead of having dozens of different 50-100MB images, I have a single copy of one 500MB image running my entire cluster.
    Note that that's exactly how kubernetes itself is usually deployed, as a best-practice - hyperkube contains all of kubernetes' different parts, and runs the correct one given its command line parameters.

  • @pid_zero9375
    @pid_zero9375 5 лет назад +3

    Hundreds of megabytes!

  • @kimchen1110
    @kimchen1110 6 лет назад +3

    Just curious about the builder best practices. In the multi stages way, do you guys normally rm the dangling image that generated by builder container?

    • @nonzzo
      @nonzzo 3 года назад

      Nope, though they are still part of the cache layer image like the base image. Just that they won't be part of the image that you use for your container.

  • @SiddharthKulkarniN
    @SiddharthKulkarniN 6 лет назад +12

    Super useful. Thanks for posting.

  • @slideshowp2
    @slideshowp2 5 лет назад +6

    You, the GCP team should make your documentations clearly and make GCP stable. Then, everything will work fine.

  • @noviaindrawati890
    @noviaindrawati890 6 лет назад +1

    could you please make some tutorials of kubernetes using rancher? its gonna be awesome!!

  • @thezanke
    @thezanke Год назад

    You actually dont want to use Node Alpine images; the C library is different on those and they are considered experimental builds of Node because of it. Instead you want to use the "slim" variant; ideally the newest debian version of it. For Node 18 right now this would be node:18-bullseye-slim.

  • @nkans
    @nkans 5 лет назад +1

    I like the vulnerability scanning on images. Think always ahead. This will simplify a lot of process with current development models.

    • @Bhuvandgrt
      @Bhuvandgrt 5 лет назад

      You can use twistlock scanner too ..

  • @Raj-sz9pg
    @Raj-sz9pg 3 года назад

    can someone tell me what is "image" here?

  • @PrinceESL
    @PrinceESL 4 года назад

    It's worth mentioning that many of the Linux distros on docker hub now have smaller images (it may have not been the case when this video was made).
    hub.docker.com/_/ubuntu?tab=tags is 25.9mb and Debian is less than 1mb bigger. The point is that it's no longer an order of 1-2 magnitudes different.
    If you were to run Python on Alpine you may find that it doesn't use glibc by default and this will change how it performs on tasks that use an alternate library (or you can a custom Alpine that installs GlibC). Dependency management can be a little easier with Ubuntu or Debian.
    It's best to research your actual use case.

  • @nissankula1
    @nissankula1 4 года назад

    Good Video. With docker, I can launch a container with UID 0. How do I disable this launch? Basically, I want to disable -it option and also launching as UID 0. Can you please recommend best practices in this area?

  • @robertj.3884
    @robertj.3884 4 года назад

    74 People liked this so much they turned their device upside down to click thumbs up again.

  • @alexeypalyonii9574
    @alexeypalyonii9574 5 лет назад

    Great video
    On the 7:24 you say's that pulling time of the huge container like "go:onbuild" on the large machine is two times faster than on the small machine. But as I know, the pulling operation needs only the fast connection and fast hard drive and nothing else. So my questions is: 1. What is the large machine and small machine? 2. Why are the numbers so far? 3. Am I wrong about the resources needed for the pulling process?

  • @jorgega2782
    @jorgega2782 5 лет назад +1

    Wow so simple and so well explain!

  • @jaredpmoser
    @jaredpmoser 4 года назад

    So can this only be done with compiled languages? Or could this be done with Interpreted languages as well using the builder pattern?

  • @EditioCastigata
    @EditioCastigata 5 лет назад

    The "increased surface area for attacks" is related to what we've been called TCB: total computing base. And, if the unused parts of the image trigger an alarm - how practical is that scanning anyway?

  • @EditioCastigata
    @EditioCastigata 5 лет назад

    It's good he started building those containers months ago, because I can confirm that vulnerability scanning takes days, if not weeks, to get from state 'queued' to actually displaying something. And then, it seems to me, it's no real scanning but going through the package manager's database. You can easily spot that by patching the binary yourself, retaining its version number, or removing a binary that's usually part of the package.

  • @ps49556n
    @ps49556n 6 лет назад +1

    this video was AMAZING! thank you

  • @tonytins
    @tonytins 4 года назад

    huh, so that's what all that extra code in .NET Core's dockerfiles is.

  • @prodestrian
    @prodestrian 6 лет назад

    Really cool, enjoying this series so far! I just hope that Gitlab support is added to Container Builder, at the moment I have to build on Gitlab CI and push to Google Container Registry because only Github and BitBucket are supported. There are workarounds but it introduces possible bottlenecks

  • @donnieashok8799
    @donnieashok8799 4 года назад

    You can just use "scratch" image if you are using a compiled binary

  • @FernandoMagnoAlves
    @FernandoMagnoAlves 4 года назад

    Are the times correct on 7:30 ?

  • @onur.senturk
    @onur.senturk 6 лет назад

    Do I get this wrong or the "Large Machine" and "Small Machine" comparisons are mixed up
    05:20 building the "Small Machine" seems to take a longer time than the "Large Machine", but the guy says; "The smaller container has a huge advantage over the large containers"
    this goes on and on through the comparison

    • @guibirow
      @guibirow 5 лет назад

      Building the image on a Large/Small machine. The container image sure are the rows with the go base image

  • @oughtington1628
    @oughtington1628 3 года назад

    Is another advantage with smaller containers saving on memory on the node? Or it doesn’t matter?

  • @patrickjusic1120
    @patrickjusic1120 6 лет назад +3

    where can I buy that tshirt?

  • @webplethora
    @webplethora 6 лет назад

    Very informative and useful material. Also thanks for making the content simple it is easy even for beginners to follow. Just one correction.I think the tabular data to compare performance between Large and Small machines have the wrong headings.

  • @twph.5890
    @twph.5890 3 года назад

    Thx for the vid

  • @rodamira
    @rodamira 5 лет назад

    You can tell what a person does for a living by the words they use:
    + "to reason about" = React.js
    + "attack surface" = Docker

  • @javimaci4615
    @javimaci4615 3 года назад

    Outstanding presentation. Sandeep you are as good as it gets!

  • @kwangee
    @kwangee 6 лет назад

    Any production example of builder pattern for node/laravel/Python?

  • @张朝阳-z2i
    @张朝阳-z2i Год назад

    great!

  • @freeNode5
    @freeNode5 5 лет назад

    if goapp is in /app, how is it run using ./goapp?

  • @ShyamHazari
    @ShyamHazari 6 лет назад

    Excellent Tutorial. Looking forward to new ones. Thanks Sandeep

  • @indigoskywalker
    @indigoskywalker 6 лет назад +1

    Use intel clear linux 😉

  • @MrKpinga
    @MrKpinga 6 лет назад

    Had no idea about the Builder pattern. Thanks!

  • @Textras
    @Textras 6 лет назад +1

    Great tips, thanks you

  • @jcvicelli
    @jcvicelli 6 лет назад

    wow for the amount of vulnerabilities, nice tool no GKE

  • @frannelk
    @frannelk 6 лет назад

    Saved on my favourites

  • @royendgel
    @royendgel 6 лет назад

    is it me ? or is the table metrics wrong ?? large | small ...

    • @stevemew6955
      @stevemew6955 4 года назад

      Yes, I think the columns may be the wrong way round ( reversed ) OR they are correct and it reflects the slower CPU ( smaller machine ) ?

  • @FinlayDaG33k
    @FinlayDaG33k 6 лет назад +2

    the build pattern was really useful to me :)
    thanks!

  • @Маки-ш6о
    @Маки-ш6о 6 лет назад

    This is great video, keep it up with the good work ;)

  • @ThiagoPereiraRosa
    @ThiagoPereiraRosa 5 лет назад

    Wonderful! Thank you

  • @lozone183
    @lozone183 5 лет назад

    very greate video

  • @marceloprado2035
    @marceloprado2035 5 лет назад

    Awesome video!

  • @demisx
    @demisx 5 лет назад +2

    “ADD . /app” line should be “COPY . /app”

  • @JM-md4ux
    @JM-md4ux 6 лет назад

    really practical perspective

  • @borisnguimmo2835
    @borisnguimmo2835 6 лет назад

    this was excellent loved it

  • @lozone183
    @lozone183 5 лет назад

    greate video

  • @calebb831
    @calebb831 6 лет назад

    shameless plug

  • @tomhollins9266
    @tomhollins9266 6 лет назад

    Well done

  • @carlitosdroid
    @carlitosdroid 6 лет назад +1

    Woww!!, I'm beginner and this is very useful! Thanks

  • @Shabasky1
    @Shabasky1 6 лет назад +5

    I like the snap effect

  • @victornoagbodji
    @victornoagbodji 6 лет назад

    great tip!

  • @kalleidoskop2
    @kalleidoskop2 6 лет назад

    great stuff

  • @danicuki
    @danicuki 6 лет назад

    Excellent video! What version of small container do you recommend for Ruby language?

  • @sfrias
    @sfrias 6 лет назад

    Useful for series. Congrats for @Sandeep Dinesh.

  • @aperture147
    @aperture147 6 лет назад +3

    nice accent

  • @milossimicsimo
    @milossimicsimo 6 лет назад

    This is great,thanks :)!

  • @und3rgr0undfr34k
    @und3rgr0undfr34k 6 лет назад

    awesome! Thnx

  • @AshishPatel-cw8jg
    @AshishPatel-cw8jg 6 лет назад +3

    Bhai hindi me banate to achcha hota bro
    Sandip
    we proud of indian

  • @sagarmunjal
    @sagarmunjal 6 лет назад

    dude, i just hope you have not peed in your pants..
    .
    .
    .
    PS - Google please dont take this personally ( if your team is behind demotivating this kid, I am really gonna kick your teams ass very soon ) be it any technology you are working on. Keep the motivation going.