Skip to content

Latest commit

 

History

History
44 lines (35 loc) · 801 Bytes

README.md

File metadata and controls

44 lines (35 loc) · 801 Bytes

kubr

Ruby client for Kubernetes REST API

Installation

gem install kubr

Usage

require 'kubr'

Kubr.configure do |config|
  config.url = 'https://130.211.56.93/api/v1beta1'
  config.username = 'admin'
  config.password = 'hv9tgLhKdej3HAHE'
end

cl = Kubr::Client.new
pods = cl.list_pods

pod = {
    :desiredState => {
        :manifest => {
            :version => 'v1beta1',
            :containers => [
                {
                    :name => 'aytest2',
                    :image => 'dockerfile/nginx',
                }
            ]
        }
    }
}

cl.create_pod pod