Play with Kubernetes - service for practical acquaintance with K8s

    About a year we wrote about an interesting online service for self-education in the world of containers - Play with Docker . Its authors, supported by Docker Inc., did not stand still and followed the trends that we observe not only in the “narrow circle” of Docker, but also in the industry as a whole: they launched a new similar service, already dedicated to Kubernetes. So, meet Play with Kubernetes (PWK)!


    Playground PWK


    PWK completely repeats the idea (and even the interface) of its “progenitor” Play with Docker: its main site is the so-called “playground” (playground), which provides access to the Linux virtual machine in a web browser to enable experiments with Kubernetes clusters . In fact, this is the Minikube SaaS equivalent available for free with its own facilities (working directly in the browser) and restrictions (see below).

    Technically, for this purpose, the capabilities of the Docker-in-Docker (DIND) technology are used , which allows launching Docker containers inside other Docker containers. (This approach to working with Docker is not generally recommended, but it has the right to live in special applications, such as the development of Docker itself and related technologies.) Used software versions in the service:

    • "Host" operating system (host) - CoreOS 7.4.1708,
    • Kubernetes server - 1.8.11,
    • Kubernetes client - 1.8.14,
    • Docker - 03/18/1-ce.

    For terminal emulation, a JavaScript implementation of xterm.js is still offered in the web browser , for which a small number of settings are available (font size selection, the ability to use keyboard shortcuts from macOS). The former ones act on the site, i.e. familiar with Play with Docker, restrictions: no more than 4 hours of continuous work within one session and no more than 5 cluster nodes (4 GB RAM for each).



    If the entrance to the Play with Docker platform is currently available only via Docker ID, then in the case of Kubernetes there is a second option - via an account on GitHub.

    The actual launch of the Play with Kubernetes main site, the playground, was “quiet and inconspicuous” last summer, but in itself it is not as interesting as laboratory work. And only a month agoa public announcement of the first such work available on the Play with Kubernetes Classroom resource took place .

    Kubernetes Lab


    It was based on the works of Jérôme Petazzoni , who devoted 7 years of his life to Docker Inc., where he went from SRE-engineer to evangelist and conducted many workshops on working with containers and Kubernetes.



    Interesting offtopic: Why did Jérôme leave Docker?
    Jérôme, которого вы можете знать ещё и по репозиторию уже упомянутого DIND, начинал свой путь в Docker с небольшого стартапа dotCloud, конкурирующего с Heroku (~2011 год). В 2013 году компания присоединилась к Docker Inc и автор, будучи SRE, впервые выступил с докладом на тему контейнеров. Активным же докладчиком он стал уже с 2014 года, в среднем делая по 2 выступления в неделю.

    К 2016 году к этим регулярным выступлениям добавились семинары по оркестровке контейнеров… и в это же время Jérôme осознал, что исчерпал свои ресурсы. В октябре его ощущения подтвердились получением диагноза «депрессия». Последовали антидепрессанты и терапия, что привело к видимому улучшению состояния. Однако летом 2017 года Jérôme, принимая участие в исследовании о психическом здоровье, прошёл тест Maslach Burnout Inventory на выгорание и обнаружил, что находится в «красной зоне». Пообщавшись со сведущими в этом вопросе людьми, он пришёл к решению взять перерыв в 2018 году, а перед этим приложил максимум своих усилий к реализации стратегии Docker, направленной на поддержку Kubernetes.

    «В 2018 году я собираюсь посвятить время себе. Я изучаю Rust. Я пишу небольшой клон [музыкального инструмента] Ableton для подключения grid-контроллера (вроде Monome или LaunchPad) к Raspberry Pi для воспроизведения живой музыки. Собираюсь пройти ретрит по медитации випассана. Надеюсь быть наставником для тех, кто не получил такое счастье и привилегии, как я сам, и стать лучшим союзником для них. Уход из Docker — первый шаг и самый сложный, но предстоящий путь выглядит замечательно».

    Но вернёмся к собственно Play with Kubernetes…

    The laboratory work offered in the online service is aimed at beginners and is devoted to the main concepts and capabilities of Kubernetes:

    • what this system allows to do in general: launching containers, load balancing, rolling out new versions of images, autoscaling ...;
    • Kubernetes architecture;
    • Kubernetes resources: nodes, scams, services, namespaces, secrets;
    • declarative approach;
    • network model Kubernetes;
    • etc.

    The main thing is that this theory is supported by practice, for which everything was started. As part of the practical part, it is proposed to launch your first containers and learn how to forward ports for them, create a deployment and scale it, work with resources in YAML, get acquainted with labels and selectors ... I will not enumerate in detail all the steps - it's better to see (and try) them yourself page Kubernetes Hands-on Workshop .

    It looks like going through the laboratory work in the same way as in Play with Docker: you have a document on the left (including commands for input), and on the right is a terminal (more precisely, there are two for two Kubernetes nodes), which allows “Play” in the K8s cluster administrator and see what really happens and how. The latter, of course, contributes to the ability to perform arbitrary clarifying commands at any stages of the work.



    Instead of conclusion


    Now only one introductory laboratory work is available in Play with Kubernetes, but the authors promise to create new ones. Their development in Play with Docker allows us to hope that this will really happen. Those who wish to share their experience can do this in a special project repository .

    PS


    Read also in our blog:


    Also popular now: