GithubHelp home page GithubHelp logo

mbode / kubernetes-tool-comparison Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 9 KB

Demonstration showing how to deploy the K8s guestbook example using a variety of deployment tools.

License: MIT License

Shell 100.00%
kubernetes kubectl guestbook

kubernetes-tool-comparison's Introduction

K8s Tool Comparison

Build Status

This repository shows how to deploy the K8s guestbook example using a variety of deployment tools. For more details on the example check out the tutorial in the K8s docs.

Table of Contents

Use Case

guestbook.yaml contains the vanilla guestbook Kubernetes manifest, defining the following resources:

  • redis-master (Service, Deployment)
  • redis-slave (Service, Deployment)
  • frontend (Service, Deployment)

They can be deployed using:

kubectl apply -f guestbook.yaml

Now let us pretend we want do deploy all of these resources several times. In our example we need two completely separate installations of the whole stack, one for cats and one for dogs. Furthermore, as it is well known that cats are better conversationalists, we expect a higher load there and would like to give the respective redis-slave twice the resource requests.

Another natural reason for this duplication could be a deployment pipeline with promotion across stages like dev, staging and prod, where one also might prefer e.g. different resource requests or replica counts to save on resources for the earlier stages.

Tools

kubectl

kubectl is the included CLI of all Kubernetes clusters, supporting declarative deployments using YAML-based Kubernetes manifests.

There is not much more to do than manually duplicate everything when using plain kubectl:

kubectl apply -f kubectl/cats-guestbook.yaml
kubectl apply -f kubectl/dogs-guestbook.yaml

Note that the two files are very similar but not exactly the same. It is quite easy to see how a setup like this is not very maintainable.

Helm

Helm is a package manager for Kubernetes. Reusable pieces are packaged in Charts that can be customized during installation with values that are templated into the Kubernetes manifests.

helm install -f helm/cats.yaml helm/guestbook
helm install -f helm/dogs.yaml helm/guestbook

kubernetes-tool-comparison's People

Contributors

mbode avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

kubernetes-tool-comparison's Issues

getting error while run ansible playbook to create key

I am new to ansible. I wrote a playbook to create new EC2 key pair but got error.
[root@ose3-master aws]# ansible-playbook key_pair.yml --syntax-check
playbook: key_pair.yml

TASK [create a new ec2 key] *************************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: 'AWSAccessKeyId=AKIAINBC6HWRRTH5EXIQ\n'
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File "/tmp/ansible_PraIMV/ansible_module_ec2_key.py", line 133, in \n from ansible.module_utils.aws.core import AnsibleAWSModule\n File "/tmp/ansible_PraIMV/ansible_modlib.zip/ansible/module_utils/aws/core.py", line 51, in \n File "/tmp/ansible_PraIMV/ansible_modlib.zip/ansible/module_utils/ec2.py", line 37, in \n File "/usr/lib/python2.7/site-packages/boto/init.py", line 53, in \n config = Config()\n File "/usr/lib/python2.7/site-packages/boto/pyami/config.py", line 63, in init\n self.read(BotoConfigLocations)\n File "/usr/lib64/python2.7/ConfigParser.py", line 305, in read\n self._read(fp, filename)\n File "/usr/lib64/python2.7/ConfigParser.py", line 512, in _read\n raise MissingSectionHeaderError(fpname, lineno, line)\nConfigParser.MissingSectionHeaderError: File contains no section headers.\nfile: /root/.boto, line: 1\n'AWSAccessKeyId=AKIAINBC6HWRRTH5EXIQ\n'\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1}
to retry, use: --limit @/aws/key_pair.retry

PLAY RECAP ******************************************************************************************************************************************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.