Coder Social home page Coder Social logo

ansible-role-kubernetes's Introduction

  • 👋 Hi, my name is André Möller (@anmoel).
  • I'm a cloud and devops consultant.
  • 👀 I’m interested in cloud technologies.
  • I have experiences in Azure and Google Cloud Platform.

ansible-role-kubernetes's People

Contributors

anmoel avatar oswalya avatar xadhoom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ansible-role-kubernetes's Issues

add update process

With this role, an existing cluster should be able to be updated.
This function must be implemented.

About "has no attribute" error

Hello,

I am up to 3 instance on gce using terraform. I'm trying to create a kubernetes cluster on these 3 nodes. Until ansible, everything works fine. Servers open, firewall rules, network is complete.

I used the example of allinone. I always get the following error. Where am I making a mistake?

cat inventory

#xxx=public ip adresses

[kubernetes:children]
etcd
k8s_masters
k8s_nodes

[kubernetes:vars]
docker_version="18.06.0-ce"

[etcd]
x.x.x.x ansible_ssh_user=testuser
x.x.x.x ansible_ssh_user=testuser
x.x.x.x ansible_ssh_user=testuser

[k8s_masters]
x.x.x.x ansible_ssh_user=testuser

[k8s_nodes]
x.x.x.x ansible_ssh_user=testuser
x.x.x.x ansible_ssh_user=testuser

cat playbook.yml

- hosts: kubernetes
#  sudo: yes
  become: true
  become_user: root
  gather_facts: false
  tasks:
  - name: install python 2
    raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
    changed_when: false

- hosts: kubernetes
#  sudo: yes
  become: true
  become_user: root
  roles:
#    - geerlingguy.docker
    - anmoel.kubernetes

my command;
export ANSIBLE_HOST_KEY_CHECKING=False && time ansible-playbook -i inventory playbook.yml -v

error message;

TASK [anmoel.kubernetes : /etc/kubernetes/kubeadm/clusterconfig.yaml] **********************************************************************************************************************************************************************************************************
fatal: [x.x.x.x]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_host'"}
fatal: [x.x.x.x]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_host'"}
fatal: [x.x.x.x]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_host'"}
	to retry, use: --limit @.../playbook.retry


PLAY RECAP *********************************************************************************************************************************************************************************************************************************************************************
x.x.x.x             : ok=30   changed=14    unreachable=0    failed=1
x.x.x.x             : ok=30   changed=14    unreachable=0    failed=1
x.x.x.x             : ok=30   changed=14    unreachable=0    failed=1

Ensure swap is disable on all nodes

Swap should be disabled when running kubernetes.
The play should check if swap is enabled and disable it if necessary.

Otherwise using your role might result in:

F1129 19:04:46.741210 8662 server.go:262] failed to run Kubelet: Running with swap on is not supported, please disable swap! or set --fail-swap-on flag to false.

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.