8000 GitHub - jaganthoutam/k8s-cookbooks: Collection of chef cookbooks for managing kubernetes clusters
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

jaganthoutam/k8s-cookbooks

 
 

Repository files navigation

Kubernetes cookbooks

Use Chef and kubeadm to manage a Kubernetes cluster.

Getting started

  1. Spin up some instances where you want to run kubernetes

  2. Add ssh aliases to ~/.ssh/config for each of those nodes, e.g.

    Host k8s-master
      HostName 1.2.3.4
      User root
      IdentityFile ~/.ssh/digitalocean
    
    Host k8s-node
      HostName 1.2.3.5
      User root
      IdentityFile ~/.ssh/digitalocean
    
  3. Install Knife Solo so you can use Chef without having to setup a Chef server

    apt-get install gnupg2
    gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
    \curl -L https://get.rvm.io | bash -s stable --ruby
    source /usr/local/rvm/scripts/rvm
    rvm install "ruby-2.3.1"
    gem install chef
    gem install knife-solo
    gem install librarian-chef
    gem install berkshelf
    knife solo init .
  4. Open "k8s cookbooks data bag secret" from 1password and copy the password to your clipboard.

  5. Write the data bag secret key to disk so you can access encrypted secrets

    $ pbpaste > .chef/data_bag_secret_file
  6. Bootstrap your master node:

    $ knife solo prepare k8s-master
    $ knife solo cook k8s-master --override-runlist "k8s::setup-master"
  7. Bootstrap your minion node(s) (run this for each node)

    $ knife solo prepare k8s-node
    $ knife solo cook k8s-node --override-runlist "k8s::setup-node"
  8. Verify that your nodes are registered with the master

    $ ssh k8s-master
    $ su ubuntu
    $ kubectl get nodes

About

Collection of chef cookbooks for managing kubernetes clusters

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 56.1%
  • Shell 33.2%
  • HTML 10.7%
0