Coder Social home page Coder Social logo

collabnix / kubelabs Goto Github PK

View Code? Open in Web Editor NEW
2.6K 2.6K 908.0 61.45 MB

Get Started with Kubernetes

Home Page: https://kubelabs.collabnix.com

License: Apache License 2.0

Shell 0.13% HTML 1.49% CSS 0.45% Python 0.03% Ruby 78.67% SCSS 0.71% JavaScript 1.31% Makefile 0.31% C 11.63% C++ 1.62% Java 1.53% M4 0.28% Perl 0.03% Roff 0.10% Assembly 1.47% Dockerfile 0.01% Ragel 0.19% Yacc 0.04% REXX 0.01% Objective-C 0.01%
beginners hacktoberfest hacktoberfest2020 helm kubernetes kubetools

kubelabs's Introduction

Get Started with Kubernetes | Ultimate Hands-on Labs and Tutorials

stars forks issues GitHub contributors Twitter

A Curated List of Kubernetes Labs and Tutorials

  • A $0 Learning Platform for All Levels - from the ground Up
  • Over 500+ Highly Interactive Docker Tutorials and Guides
  • Well tested on Kubernetes Cluster and can be run on Browser (no Infrastructure required)

๐Ÿ“ Join our Community

Featured Articles

Pre-requisite:

Preparing 5-Node Kubernetes Cluster

PWK:

GKE

Docker Desktop for Mac

Ubuntu

Using Kubectl

Kubernetes CRUD

Using AI

Pods101

Kubernetes Tools for Pods

ReplicaSet101

Deployment101

ConfigMaps101

Scheduler101

Services101

StatefulSets101

DaemonSet101

Jobs101

Ingress101

RBAC101

Service Catalog101

Cluster Networking101

Network Policies101

Monitoring101

Logging101

Helm101

AKS101

Security101

GitOps101

Managed Kubernetes Service

EKS101

LKE101

GKE101

Loft101

Shipa101

DevSpace101

KubeSphere101

Kubernetes with GitLab 101

Kubernetes with Jenkins

Strimzi (Kafka on Kubernetes)

Java client for Kubernetes

KEDA

Terraform EKS

Disaster Recover

For Node Developers

Cheat Sheets

Contributors

Workshop Video

YouTube

Click Here if the link is not working for you.

Contribution Guidelines

Step 1. Clone the repository

 git clone https://github.com/collabnix/kubelabs

Step 2. Add _config_dev.yml

Add the following entry for local access

url: http://127.0.0.1:4000

Step 3. Run the container

docker run --rm \
  -v "$PWD:/srv/jekyll" \
  -e BUNDLE_PATH="/srv/jekyll/.bundles_cache" \
  -p 4000:4000 \
  jekyll/builder:3.8 \
  bash -c "gem install bundler && bundle install && bundle exec jekyll serve --host 0.0.0.0 --verbose --config _config.yml,_config_dev.yml"

Further References:

Next: Kubernetes201

kubelabs's People

Contributors

ajeetraina avatar akshitgrover avatar aliabbask08 avatar anshu049 avatar apurvabhandari avatar ashutoshbhakare avatar bensodenkamp avatar collabnix avatar dependabot[bot] avatar divyajeet-singh avatar gauravrattan avatar guranshdeol avatar iciaran avatar ifs-mebalk avatar johnsanabria avatar julisho1 avatar knutole avatar okanozdemir avatar pavangudiwada avatar phantom-intruder avatar pradhans0906 avatar pratiklomte avatar priyanka010392 avatar ravikiran300 avatar rohith-raju avatar sangam14 avatar shrutiiijoshi avatar tungbq avatar vrashabh-sontakke avatar yemi176 avatar

Stargazers

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

Watchers

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

kubelabs's Issues

Finding Index.html

I am completely new person here nut after looking at your website (https://kubelabs.collabnix.com/) , I found a couple of things I can improve. But I am unable to find the source code for the respective webpage i.e index.html. If someone can point that out maybe I can contribute to this project

Portainer K8S Image doesn't exist. Please consider to update the README of Portainer.

I found that the K8S image <portainerci/portainer:k8s-linux-amd64> in https://github.com/collabnix/kubelabs/blob/master/portainer.yaml doesn't exist.

spec:  
      serviceAccountName: portainer-sa-clusteradmin  
      containers:  
      - name: portainer  
        image: portainerci/portainer:k8s-linux-amd64  
        imagePullPolicy: Always  

So this service could not provision into K8S cluster. Go around, then I found another K8S image https://raw.githubusercontent.com/portainer/portainer-k8s/master/portainer-nodeport.yaml that is running well in K8S. There is source.

Can you please verify and update this README. I don't have a permission to do.
Thank you.

unable to access pod from external world

apiVersion: v1
kind: Pod
metadata:
  name: nginx-pod
  labels:
    name: nginx-pod
spec:
  containers:
    - name: nginx
      image: nginx
      ports:
        - containerPort: 80

I used this yml config to create a pod.
I tried to access pod through network namespace, but unable to do so resulted in connection timeout.
but when curl inside the container index.html loads correctly.

image
image

Boot script refers to unresolvable endpoint in kube101

cloud.weave.works is unresolvable. Please see below

[node1 ~]$ git clone https://github.com/collabnix/kubelabs
Cloning into 'kubelabs'...
remote: Enumerating objects: 3523, done.
remote: Counting objects: 100% (246/246), done.
remote: Compressing objects: 100% (132/132), done.
remote: Total 3523 (delta 135), reused 201 (delta 107), pack-reused 3277
Receiving objects: 100% (3523/3523), 21.74 MiB | 17.60 MiB/s, done.
Resolving deltas: 100% (1745/1745), done.
[node1 ~]$ ls
anaconda-ks.cfg kubelabs
[node1 ~]$ cd kubelabs/
[node1 kubelabs]$ chmod a+x bootstrap.sh
[node1 kubelabs]$ sh bootstrap.sh
Initializing machine ID from random generator.
I0210 00:26:17.594721 562 version.go:251] remote version is much newer: v1.26.1; falling back to: stable-1.20
[init] Using Kubernetes version: v1.20.15
[preflight] Running pre-flight checks
[WARNING Service-Docker]: docker service is not active, please run 'systemctl start docker.service'
[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
[WARNING FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables does not exist
[preflight] The system verification failed. Printing the output from the verification:
KERNEL_VERSION: 4.4.0-210-generic
DOCKER_VERSION: 20.10.1
OS: Linux
CGROUPS_CPU: enabled
CGROUPS_CPUACCT: enabled
CGROUPS_CPUSET: enabled
CGROUPS_DEVICES: enabled
CGROUPS_FREEZER: enabled
CGROUPS_MEMORY: enabled
CGROUPS_PIDS: enabled
CGROUPS_HUGETLB: enabled
[WARNING SystemVerification]: this Docker version is not on the list of validated versions: 20.10.1. Latest validated version: 19.03
[WARNING SystemVerification]: failed to parse kernel config: unable to load kernel module: "configs", output: "", err: exit status 1
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
[certs] Using certificateDir folder "/etc/kubernetes/pki"
[certs] Generating "ca" certificate and key
[certs] Generating "apiserver" certificate and key
[certs] apiserver serving cert is signed for DNS names [kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local node1] and IPs [10.96.0.1 192.168.0.13]
[certs] Generating "apiserver-kubelet-client" certificate and key
[certs] Generating "front-proxy-ca" certificate and key
[certs] Generating "front-proxy-client" certificate and key
[certs] Generating "etcd/ca" certificate and key
[certs] Generating "etcd/server" certificate and key
[certs] etcd/server serving cert is signed for DNS names [localhost node1] and IPs [192.168.0.13 127.0.0.1 ::1]
[certs] Generating "etcd/peer" certificate and key
[certs] etcd/peer serving cert is signed for DNS names [localhost node1] and IPs [192.168.0.13 127.0.0.1 ::1]
[certs] Generating "etcd/healthcheck-client" certificate and key
[certs] Generating "apiserver-etcd-client" certificate and key
[certs] Generating "sa" key and public key
[kubeconfig] Using kubeconfig folder "/etc/kubernetes"
[kubeconfig] Writing "admin.conf" kubeconfig file
[kubeconfig] Writing "kubelet.conf" kubeconfig file
[kubeconfig] Writing "controller-manager.conf" kubeconfig file
[kubeconfig] Writing "scheduler.conf" kubeconfig file
[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
[kubelet-start] Starting the kubelet
[control-plane] Using manifest folder "/etc/kubernetes/manifests"
[control-plane] Creating static Pod manifest for "kube-apiserver"
[control-plane] Creating static Pod manifest for "kube-controller-manager"
[control-plane] Creating static Pod manifest for "kube-scheduler"
[etcd] Creating static Pod manifest for local etcd in "/etc/kubernetes/manifests"
[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s
[apiclient] All control plane components are healthy after 14.005094 seconds
[upload-config] Storing the configuration used in ConfigMap "kubeadm-config" in the "kube-system" Namespace
[kubelet] Creating a ConfigMap "kubelet-config-1.20" in namespace kube-system with the configuration for the kubelets in the cluster
[upload-certs] Skipping phase. Please see --upload-certs
[mark-control-plane] Marking the node node1 as control-plane by adding the labels "node-role.kubernetes.io/master=''" and "node-role.kubernetes.io/control-plane='' (deprecated)"
[mark-control-plane] Marking the node node1 as control-plane by adding the taints [node-role.kubernetes.io/master:NoSchedule]
[bootstrap-token] Using token: p9xdxy.f59aaeekggwlhrx2
[bootstrap-token] Configuring bootstrap tokens, cluster-info ConfigMap, RBAC Roles
[bootstrap-token] configured RBAC rules to allow Node Bootstrap tokens to get nodes
[bootstrap-token] configured RBAC rules to allow Node Bootstrap tokens to post CSRs in order for nodes to get long term certificate credentials
[bootstrap-token] configured RBAC rules to allow the csrapprover controller automatically approve CSRs from a Node Bootstrap Token
[bootstrap-token] configured RBAC rules to allow certificate rotation for all node client certificates in the cluster
[bootstrap-token] Creating the "cluster-info" ConfigMap in the "kube-public" namespace
[addons] Applied essential addon: CoreDNS
[addons] Applied essential addon: kube-proxy

Your Kubernetes control-plane has initialized successfully!

To start using your cluster, you need to run the following as a regular user:

mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config

Alternatively, if you are the root user, you can run:

export KUBECONFIG=/etc/kubernetes/admin.conf

You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
https://kubernetes.io/docs/concepts/cluster-administration/addons/

Then you can join any number of worker nodes by running the following on each as root:

kubeadm join 192.168.0.13:6443 --token p9xdxy.f59aaeekggwlhrx2
--discovery-token-ca-cert-hash sha256:5eae1ab83e67e7cb7b95100f73964f6325e6d57a0108df097cb63eda13eb4144
Waiting for api server to startup
Warning: resource daemonsets/kube-proxy is missing the kubectl.kubernetes.io/last-applied-configuration annotation which is required by kubectl apply. kubectl apply should only be used on resources created declaratively by either kubectl create --save-config or kubectl apply. The missing annotation will be patched automatically.
daemonset.apps/kube-proxy configured
No resources found
Unable to connect to the server: dial tcp: lookup cloud.weave.works on 127.0.0.11:53: no such host

Provide license file

Could you add a license file to the project? Currently it is not clear under which license the project is released.

Create section for Helm101

I noticed that there are no tutorials on Helm. Has this been worked on before, and is a section on Helm appropriate here? If so, I can contribute.

Secrets101

Mustufa Mithaiwala - Assigned - secrets101 track

Add ConfigMaps tutorial

I don't see ConfigMaps tutorial. It would be great to have a separate section on ConfigMaps.

Duplicate README file under Scheduler101

$ git clone https://github.com/collabnix/kubelabs.git
Cloning into 'kubelabs'...
remote: Enumerating objects: 17, done.
remote: Counting objects: 100% (17/17), done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 1215 (delta 6), reused 0 (delta 0), pack-reused 1198
Receiving objects: 100% (1215/1215), 18.22 MiB | 12.92 MiB/s, done.
Resolving deltas: 100% (531/531), done.

warning: the following paths have collided (e.g. case-sensitive paths
on a case-insensitive filesystem) and only one from the same
colliding group is in the working tree:

'Scheduler101/README.md'
'Scheduler101/readme.md'

Unable to bootstrap the node cluster.

While preparing 5 nodes Kubernetes Cluster, after cloning the repository, the given command was not working.
It says -> cannot access 'bootstrap.sh': No such file or directory

To change mode executable for bootstrap.sh, it asks to type the following command:
Screenshot from 2022-01-18 11-27-36

After typing the command, the result I got:
Screenshot from 2022-01-18 11-27-46

Please correct me if I misunderstood any step.

Contributor

Name Assigned Topics
Meera Biradar RBAC 101
Rachit Network Policies 101 , Cluster Networking 101

More information about jobs

Currently, there are only a few lines of code detailing information about kubernetes jobs. Is this currently being worked on? If not, I'm willing to contribute here.

Ingress101.md is outdated

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/mandatory.yaml

The URL is a 404.

Cleaning up all the external links

It's time to revisit Kubelabs and make it more cleaner and structured. Remove the external links and tweets and keep it in structured format.

Preparing 5-Node Kubernetes Cluster

While doing Preparing 5-Node Kubernetes Cluster lab , i guess we should add

Adding New K8s Cluster Node
Click on Add Instances to setup first k8s node cluster

Wait for 1 minute time till it gets completed.

Copy the command starting with kubeadm join ..... We will need it to be run on the worker node.

In case if we missed the token , we can reprint using

kubeadm token create --print-join-command

The above 2 lines should be added, the new learner able to understand , how to get the token printed again if we missed it

Kubelab 101 directions omit necessary directory change

It is a simple thing, but if you follow the directions to the letter, there is a command missing to cd into the kubelabs directory.

[node2 ~]$ git clone https://github.com/collabnix/kubelabs
Cloning into 'kubelabs'...
remote: Enumerating objects: 3523, done.
remote: Counting objects: 100% (246/246), done.
remote: Compressing objects: 100% (132/132), done.
remote: Total 3523 (delta 135), reused 201 (delta 107), pack-reused 3277
Receiving objects: 100% (3523/3523), 21.74 MiB | 22.98 MiB/s, done.
Resolving deltas: 100% (1744/1744), done.
[node2 ~]$ chmod a+x bootstrap.sh
chmod: cannot access 'bootstrap.sh': No such file or directory
[node2 ~]$ ls
anaconda-ks.cfg kubelabs
[node2 ~]$ cd kubelabs/
[node2 kubelabs]$ sh bootstrap.sh

Issue while Creating First Deployment

When running the command from this page
https://collabnix.github.io/kubelabs/Deployment101/

I get the following error
error: unable to recognize "nginx-dep.yaml": no matches for kind "Deployment" in version "apps/v1beta2"

The same issue was also open in dockerlabs
collabnix/dockerlabs#311

When tried to run this in terminal

git clone https://github.com/collabnix/dockerlabs
cd dockerlabs/kubernetes/workshop/Deployment101
kubectl create -f nginx-dep.yaml
deployment.apps/nginx-deployment created  

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.