Giter VIP home page Giter VIP logo

bmuschko / cka-study-guide Goto Github PK

View Code? Open in Web Editor NEW
157.0 5.0 142.0 296 KB

Code example from the book "Certified Kubernetes Administrator (CKA) Study Guide" published by O'Reilly Media.

Home Page: https://www.oreilly.com/library/view/certified-kubernetes-administrator/9781098107215/

License: Apache License 2.0

Shell 80.33% Dockerfile 2.60% JavaScript 17.07%
certification kubernetes

cka-study-guide's Introduction

Hi, I'm Ben ๐Ÿ‘‹๐Ÿป

I'm an Independent Consultant, Trainer, and Author.

  • ๐Ÿ’ก I specialize in cloud-native application development and transformation, container solutions, DevSecOps, and Continuous Integration/Continuous Delivery implementations.
  • ๐Ÿ’ป Delivered high-impact, short- and long-term consulting engagements to Fortune 500 companies, large enterprises, and startups.
  • ๐Ÿ‘จโ€๐Ÿซ Taught 1000+ students on topics, such as Kubernetes, Terraform, Jenkins, Gradle, Bazel, and Go.
  • ๐Ÿ“ฉ Reach out to me for consulting or training.

Connect with Me On Social Media ๐Ÿค๐Ÿป

My Books ๐Ÿ“š

My Certifications ๐Ÿ…

Udemy Course Discount Coupons ๐Ÿ’ฅ

Course Coupon Code Valid Until
GitHub Actions Certification Practice Exam APR2024 May 1, 2024
Certified Jenkins Engineer (CJE) Practice Exam 2023 APR2024 May 1, 2024

cka-study-guide's People

Contributors

bmuschko 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

cka-study-guide's Issues

Chap 2: Can't sign CSR (Minikube, Docker driver, Arm M1)

In Chapter 2, following the instructions for Creating a Subject (pp. 15-16). Step 4 ("Sign the CSR...") fails as below:

openssl x509 -req -in johndoe.csr -CA /.minikube/ca.crt -CAkey /.minikube/ca.key -CAcreateserial -out johndoe.crt -days 364
Can't open /.minikube/ca.crt for reading, No such file or directory

I have confirmed that on my local machine, ~/.minikube contains ca.key and ca.crt:

user@LOCAL .minikube % ls
addons			certs			machines
ca.crt			config			profiles
ca.key			files			proxy-client-ca.crt
ca.pem			key.pem			proxy-client-ca.key
cache			logs
cert.pem		machine_client.lock

(and both files have content, i.e. certificate and key). Running:

  • Minikube v.1.32.2
  • Docker Engine 24.0.6
  • Apple M1/ARM.

Thanks!

Chapter 2: M1/M2 vagrant fails to build on virtual box beta for ARM

Received the following error:

There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["showvminfo", "6f6af36a-297c-44b2-b6d3-c61fea9a9b90", "--machinereadable"]

Stderr: VBoxManage: error: The object is not ready
VBoxManage: error: Details: code E_ACCESSDENIED (0x80070005), component SessionMachine, interface IMachine, callee nsISupports
VBoxManage: error: Context: "COMGETTER(ChipsetType)(&aChipset)" at line 53 of file VBoxManageUtils.cpp
VBoxManage: error: The object is not ready
VBoxManage: error: Details: code E_ACCESSDENIED (0x80070005), component SessionMachine, interface IMachine, callee nsISupports
VBoxManage: error: Context: "COMGETTER(BandwidthControl)(bwCtrl.asOutParam())" at line 2695 of file VBoxManageInfo.cpp

It might work if virtual box x86 was ran using Rosetta 2, but I didn't try. Instead, I'm going to try the following to setup the cluster from scratch and get kubeadm practice using docker-in-docker: https://github.com/brightzheng100/kubernetes-the-hard-way-on-docker

Chapter 07 - troubleshooting pod does not work on ARM architecture

This is caused by the mysql server supported is 8.0 and up and the web-app bmuschko/web-app in the container does not support the cyphers for authentication:
The application cannot connect to the the database and returns this error.

Failed to connect to database: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client

Request to let the example use mysql 8.0+ that is supported by ARM and AMD

There is a workaround by setting the password directly in the database console by

ALTER USER root IDENTIFIED WITH mysql_native_password BY 'password';

Or more kubenetes nativly:

k exec -it mysql-db -- mysql -u root -p mysql -e "ALTER USER root IDENTIFIED WITH mysql_native_password BY 'password';"

Then you only have fix the actual error :)

Kind regards.

Chapter 02

I would suggest updating Exercise 4 in Chapter 02 to reflect the solution for the most recent k8s version.
Issuing Service Account Token

Service Account Tokens no longer get generated automatically and should use the TokenRequest API

โžœ  RBAC git:(main) โœ— kubectl describe serviceaccount api-access -n apps
Name:                api-access
Namespace:           apps
Labels:              <none>
Annotations:         <none>
Image pull secrets:  <none>
Mountable secrets:   <none>
Tokens:              <none>
Events:              <none>

Mistake in Appendix A solution

Hello!

I think that I found a mistake in appendix A, ch02's solutions.

Shouldn't this

$ kubectl create clusterrolebinding api-clusterrolebinding \
  --serviceaccount=apps:api-access --verb=watch,list,get \
  --resource=pods

be simply

$ kubectl create clusterrolebinding api-clusterrolebinding --clusterrole=api-clusterrole --serviceaccount=apps:api-access

since we defined api-clusterrole already right before ?

Chapter02 (Vagrant & Virtualbox, on ARM M1)

Description

I'm attempting to do the fifth exercise of Chapter02.
For the problem, I've downloaded the beta version of Virtualbox for Apple Silicon.

It seems like the machine crashes while booting up.
I thought this might be an issue with Virtualbox on an M1.
I've attempted to change the code to use UTM but I get the same problem.

Are there any tips or tweaks to make this run on my machine?

upgrade-version git:(master) โœ— vagrant up
Bringing machine 'k8s-control-plane' up with 'virtualbox' provider...
Bringing machine 'worker-1' up with 'virtualbox' provider...
Bringing machine 'worker-2' up with 'virtualbox' provider...
Bringing machine 'worker-3' up with 'virtualbox' provider...
==> k8s-control-plane: Setting the name of the VM: k8s-control-plane
==> k8s-control-plane: Clearing any previously set forwarded ports...
==> k8s-control-plane: Clearing any previously set network interfaces...
==> k8s-control-plane: Preparing network interfaces based on configuration...
    k8s-control-plane: Adapter 1: nat
    k8s-control-plane: Adapter 2: hostonly
==> k8s-control-plane: Forwarding ports...
    k8s-control-plane: 22 (guest) => 2222 (host) (adapter 1)
==> k8s-control-plane: Running 'pre-boot' VM customizations...
==> k8s-control-plane: Booting VM...
==> k8s-control-plane: Waiting for machine to boot. This may take a few minutes...
    k8s-control-plane: SSH address: 127.0.0.1:2222
    k8s-control-plane: SSH username: vagrant
    k8s-control-plane: SSH auth method: private key
    k8s-control-plane: Warning: Connection reset. Retrying...
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'aborted' state. Please verify everything is configured
properly and try again.

If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run `vagrant up` while the
VirtualBox GUI is open.

The primary issue for this error is that the provider you're using
is not properly configured. This is very rarely a Vagrant issue.

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.