aespinosa / cookbook-kube Goto Github PK
View Code? Open in Web Editor NEWCustom Chef resources to launch a Kubernetes cluster
Home Page: https://supermarket.chef.io/cookbooks/kube
License: Apache License 2.0
Custom Chef resources to launch a Kubernetes cluster
Home Page: https://supermarket.chef.io/cookbooks/kube
License: Apache License 2.0
This could pretty easily be handled even if all we did was take a yaml file and load it
Use the network plugins or kubenet instead
Hey, Plz add the additional parameter for creating the logs directory and log file for all the services.
property :log_dir
property :log_file
property :logtostderr
This could be handy thing to apply to a node or role to drain out systems.
master components:
node components:
Hi,
I am using the latest Kube cookbook for deploying Kubernetes cluster in my environment Here is my recipe
# Etcd
etcd_service 'default' do
action %w(create start)
end
# Kubernetes cluster
kube_apiserver 'default' do
service_cluster_ip_range '10.0.0.1/24'
etcd_servers 'http://127.0.0.1:2379'
insecure_bind_address '0.0.0.0'
action %w(create start)
end
group 'docker' do
members %w(kubernetes)
end
kube_scheduler 'default' do
master '127.0.0.1:8080'
action %w(create start)
end
kube_controller_manager 'default' do
master '127.0.0.1:8080'
action %w(create start)
end
Here is my metadata.rb
depends 'etcd', '>= 6.0.0'
depends 'kube', '>= 4.0.0'
depends 'docker', '>= 7.0.0'
But after running the recipe I get the following error:
================================================================================
virtualbox-iso: Recipe Compile Error in /var/chef/cache/cookbooks/k8_master/recipes/default.rb
virtualbox-iso: ================================================================================
virtualbox-iso:
virtualbox-iso: NoMethodError
virtualbox-iso: -------------
virtualbox-iso: undefined method `kube_apiserver' for cookbook: k8_master, recipe: default :Chef::Recipe
virtualbox-iso:
virtualbox-iso: Cookbook Trace: (most recent call first)
virtualbox-iso: ----------------------------------------
virtualbox-iso: /var/chef/cache/cookbooks/k8_master/recipes/default.rb:48:in `from_file'
virtualbox-iso:
virtualbox-iso: Relevant File Content:
virtualbox-iso: ----------------------
virtualbox-iso: /var/chef/cache/cookbooks/k8_master/recipes/default.rb:
virtualbox-iso:
virtualbox-iso: 46: # Kubernetes cluster
virtualbox-iso: 47:
virtualbox-iso: 48>> kube_apiserver 'default' do
virtualbox-iso: 49: service_cluster_ip_range '10.0.0.1/24'
virtualbox-iso: 50: etcd_servers 'http://127.0.0.1:2379'
virtualbox-iso: 51: insecure_bind_address '0.0.0.0'
virtualbox-iso: 52: action %w(create start)
virtualbox-iso: 53: end
virtualbox-iso:
virtualbox-iso: System Info:
virtualbox-iso: ------------
virtualbox-iso: chef_version=16.4.41
virtualbox-iso: platform=centos
virtualbox-iso: platform_version=7.8.2003
virtualbox-iso: ruby=ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux]
virtualbox-iso: program_name=/bin/chef-client
virtualbox-iso: executable=/opt/chef/bin/chef-client
virtualbox-iso:
virtualbox-iso:
I followed exactly as specified in Readme
Can someone tell me whats wrong here ?
I tried instantiating a simple master with the example resource declarations from README.md - I get the following, along with a daemon startup failure:
Jan 31 12:37:13 pavlov kube-apiserver[736]: W0131 12:37:13.680583 736 authentication.go:368] AnonymousAuth is not allowed with the AllowAll authorizer. Resetting AnonymousAuth to false. You should use a different authorizer``
Right now if you change the version or download URL to a new version nothing happens. We should provide an option to handle the service upgrade.
Hello!
I was trying to use this cookbook to get started with launching a Kubernetes cluster, but noticed that a basic declaration like:
kubelet_service 'kubelet' do
action [:create, :start]
address '127.0.01'
end
does not render the default properties for the systemd
ExecStart option. As it stands I don't think any of the resources can render out default properties.
Actual behavior:
# in /etc/systemd/system/kubelet.service
ExecStart=/usr/sbin/kubelet
Expected behavior:
# in /etc/systemd/system/kubelet.service
ExecStart=/usr/sbin/kubelet --address=0.0.0.0 --allow-privileged=false ...
Is this intended? If not, I believe the fix could be simple and I'd be happy to implement it.
what setup is required in lieu of running kubeadm init
to generate certificates, etc ?
When using kubelet_service
with v1.9, the kubeconfig (and therefore the api server address) does not get picked up without the --kubeconfig
argument. Explicitly setting this argument as the /var/lib/kubelet/kubeconfig
doesn't help either as the command generator doesn't add flags that are the default. Currently, you have to specify a kubeconfig path that isn't the default in order to get kubelet to work properly.
I usually apiserver, controller-manager, scheduler as containers with the official hyperkube
image, and let kubelet
manage those containers.
I am thinking of porting our recipes which manage such containerized daemons to this cookbook.
Do you accept such changes if I send a pull request?
It would be a set of new providers of the existing kubernetes_*
resources.
The properties and corresponding documentation can be automatically generated similar how markdown documentation is being generated in https://github.com/kubernetes/kubernetes/blob/master/cmd/genkubedocs/gen_kube_docs.go#L51-L70.
Probably need an implementation equivalent to GenMarkdownTree
but for custom Chef resource properties. See https://github.com/spf13/cobra/blob/master/doc/md_docs.md for reference
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.