GithubHelp home page GithubHelp logo

cka's People

Contributors

johannes-engler-mw avatar sandervanvugt 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

cka's Issues

Lesson:5 - Installing Nginx Ingress Controller

Hi Sander,

I am able to install the ingress controller. able to deploy the nginxsvc pod, able to create nginxsvc service without any issues. However, while creating ingress i am getting below error:

error: failed to create ingress: Internal error occurred: failed calling webhook "validate.nginx.ingress.kubernetes.io": failed to call webhook: Post "https://ingress-nginx-controller-admission.ingress-nginx.svc:443/networking/v1/ingresses?timeout=10s": context deadline exceeded

Can you suggest what could be the issue?

Regards,
Love Masta

deprecated setup-kubetools.sh

The legacy package repositories (apt.kubernetes.io and yum.kubernetes.io) have been deprecated and frozen starting from September 13, 2023. Using the new package repositories hosted at pkgs.k8s.io is strongly recommended and required in order to install Kubernetes versions released after September 13, 2023. The deprecated legacy repositories, and their contents, might be removed at any time in the future and without a further notice period. The new package repositories provide downloads for Kubernetes versions starting with v1.24.0.

Update setup-kubetools.sh script

replace lines:

sudo apt-get update && sudo apt-get install -y apt-transport-https curl
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
cat <<EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list
deb https://apt.kubernetes.io/ kubernetes-xenial main
EOF

with

sudo apt-get update && sudo apt-get install -y apt-transport-https curl
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.28/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.28/deb/ /" | sudo tee /etc/apt/sources.list.d/kubernetes.list

Issue with cluster installation

Hi Sander,

I was highly motivated to learn k8s from your course. I have 3 Ubuntu 22.04 instances running in AWS EC2 out of which on one of them I followed the steps mentioned in your course to set as control plane.

I used both the .sh files to install container runtime and Kube tools. After that I used sudo kubeadm init as mentioned in the video. Then performed steps to get cluster context. After that I simply did kubectl create -f cka/calico.yaml but my calico container is in crashloopbackoff state.

can you suggest if there are any changes I need to know to make it work ?

lab 7: nslookup (resolver) in busybox:latest fails to lookup service (mydb, myservice)

initContainers of init-pod pod (lab7-1.yaml) may not run at all because it depends on the latest busybox image.
I found the behavior change is in busybox:1.29 to busybox:1.32 (latest) see Nslookup does not work in latest busybox image #48.

[root@master01 learn]# kubectl run --attach busybox --rm --image=busybox:latest --restart=Never -- \
> sh -c "sleep 4 && nslookup kubernetes"
If you don't see a command prompt, try pressing enter.
Server:         10.96.0.10
Address:        10.96.0.10:53

** server can't find kubernetes.default.svc.cluster.local: NXDOMAIN

*** Can't find kubernetes.svc.cluster.local: No answer
*** Can't find kubernetes.cluster.local: No answer
*** Can't find kubernetes.default.svc.cluster.local: No answer
*** Can't find kubernetes.svc.cluster.local: No answer
*** Can't find kubernetes.cluster.local: No answer

pod "busybox" deleted
pod default/busybox terminated (Error)

busybox:1.28 is working fine.

[root@master01 learn]# kubectl run --attach busybox --rm --image=busybox:1.28 --restart=Never -- \
> sh -c "sleep 4 && nslookup kubernetes"
If you don't see a command prompt, try pressing enter.
Server:    10.96.0.10
Address 1: 10.96.0.10 kube-dns.kube-system.svc.cluster.local

Name:      kubernetes
Address 1: 10.96.0.1 kubernetes.default.svc.cluster.local
pod "busybox" deleted
[root@master01 learn]#

So, a simple solution to solve this problem is to use busybox:1.28 as in this snippet.

[root@master01 learn]# cat lab7-1.yaml
apiVersion: v1
kind: Pod
metadata:
  name: init-pod
  labels:
    app: initapp
spec:
  containers:
  - name: main-container
    image: busybox
    command: ['sh', '-c', 'echo main app running && sleep 3600']
  initContainers:
  - name: init-myservice
    image: busybox:1.28
    command: ['sh', '-c', 'until nslookup myservice; do echo waiting for myservice; sleep 2; done']
  - name: init-mydb
    image: busybox:1.28
    command: ['sh', '-c', 'until nslookup mydb; do echo waiting for mydb; sleep 2; done']
[root@master01 learn]#

Another useful tool to troubleshoot DNS problem in kubernetes in dnsutils.

Accessabillity issue with the videos

I don't see well enough to read the yaml files in the videos, because there isn't enough contrast between the light text and the bright background. Please add all of the yaml files to the repo. Please consider using a dark theme in the future videos.

issues as soon as I issue vagrant up.

Need help with the following after running vagrant up. PLEASE.
START ERROR*****
control: 2023-02-22 15:58:40 (1.60 MB/s) - ‘go1.13.linux-amd64.tar.gz’ saved [120050424/120050424]
control:
control: + tar -C /usr/local -xzf go1.13.linux-amd64.tar.gz
control: + git clone https://github.com/Mirantis/cri-dockerd.git
control: Cloning into 'cri-dockerd'...
control: + cd cri-dockerd/src
control: /tmp/vagrant-shell: line 90: cd: cri-dockerd/src: No such file or directory
control: + cd ..
control: + install -o root -g root -m 0755 bin/cri-dockerd /usr/local/bin/cri-dockerd
control: install: cannot stat ‘bin/cri-dockerd’: No such file or directory
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
END ERROR*****

/home/vagrant/cri-dockerd exists but /home/vagrant/cri-dockerd/src doesn't.

suggestion: categorize the yaml files in directories per lesson

Just a quick suggestion, how about categorizing all these YAML files in the respective lessons as per your CKA course on O'Reilly, e.g. lesson_10/rolebind.yaml.
If this is okay with you, I could go ahead and do a PR.

Otherwise, great course and thanks for doing this!

Kubeadm version

The kubeadm version and the dockerd version are giving troubles to join the nodes

CRI not running after running ./cka/setup-container.sh

[root@controller cka]# ./setup-container.sh 
setting up CentOS 7 with Docker
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: download.cf.centos.org
 * extras: download.cf.centos.org
 * updates: download.cf.centos.org
Package 2:vim-enhanced-7.4.629-8.el7_9.x86_64 already installed and latest version
Package yum-utils-1.1.31-54.el7_8.noarch already installed and latest version
Package device-mapper-persistent-data-0.8.5-3.el7_9.2.x86_64 already installed and latest version
Package 7:lvm2-2.02.187-6.el7_9.5.x86_64 already installed and latest version
Nothing to do
Loaded plugins: fastestmirror
adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
grabbing file https://download.docker.com/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: download.cf.centos.org
 * extras: download.cf.centos.org
 * updates: download.cf.centos.org
Package 3:docker-ce-20.10.23-3.el7.x86_64 already installed and latest version
Nothing to do
Failed to execute operation: No such file or directory
printing MYOS CentOS

[root@controller cka]# kubeadm init
[init] Using Kubernetes version: v1.26.1
[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred:
        [ERROR CRI]: container runtime is not running: output: time="2023-01-24T17:21:08Z" level=fatal msg="validate service connection: CRI v1 runtime API is not implemented for endpoint \"unix:///var/run/containerd/containerd.sock\": rpc error: code = Unimplemented desc = unknown service runtime.v1.RuntimeService"
, error: exit status 1
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
To see the stack trace of this error execute with --v=5 or higher
[root@controller cka]# 

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.