GithubHelp home page GithubHelp logo

cka's Introduction

Markdown Live Preview

Vagrant lab for CKA online course

setup on control node

$ vagrant ssh m1-centos
[vagrant@m1-centos ~]$ sudo yum install -y vim git bash-completion [vagrant@m1-centos ~]$ git clone https://github.com/petercharlespcg/cka.git
[vagrant@m1-centos ~]$ cd cka
[vagrant@m1-centos cka]$ sudo ./setup-docker.sh
[vagrant@m1-centos cka]$ cat /etc/fstab
[vagrant@m1-centos cka]$ sudo ./setup-kubetools.sh

[vagrant@m1-centos cka]$ kubectl get nodes
The connection to the server localhost:8080 was refused - did you specify the right host or port? Solution: To start using your cluster, you need to run the following as a regular user:
[vagrant@m1-centos cka]$ mkdir -p $HOME/.kube
[vagrant@m1-centos cka]$ sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
[vagrant@m1-centos cka]$ sudo chown $(id -u):$(id -g) $HOME/.kube/config

[vagrant@m1-centos cka]$ kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"
[vagrant@m1-centos cka]$ kubectl get pods --all-namespaces
kube-system weave-net-tn7pr 2/2 Running 0 91s

[vagrant@m1-centos cka]$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
m1-centos Ready master 9h v1.18.3

[vagrant@c1-centos cka]$ cat kube-join.sh kubeadm join 192.168.20.10:6443 --token qaz523.5rfzhjnbm0q5jca2 \
--discovery-token-ca-cert-hash sha256:df24a4377ea43b18bfcab79559c94afc472bd3eb89e007e60a5cef83d4b55981
[vagrant@c1-centos cka]$ sudo ./kube-join.sh

[vagrant@m1-centos cka]$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
c1-centos Ready 2m18s v1.18.3
m1-centos Ready master 9h v1.18.3

[vagrant@m1-centos cka]$ kubectl config -h
[vagrant@m1-centos cka]$ kubectl config view

setup on work node

$ vagrant.exe ssh c1-centos
[vagrant@c1-centos ~]$ sudo yum install -y vim git bash-completion
[vagrant@c1-centos ~]$ git clone https://github.com/petercharlespcg/cka.git
[vagrant@c1-centos ~]$ cd cka
[vagrant@c1-centos cka]$ sudo ./setup-docker.sh
[vagrant@c1-centos cka]$ cat /etc/fstab
[vagrant@c1-centos cka]$ sudo ./setup-kubetools.sh

cka's People

Contributors

petercharlespcg avatar

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.