GithubHelp home page GithubHelp logo

geerlingguy / kubernetes-101 Goto Github PK

View Code? Open in Web Editor NEW
539.0 44.0 159.0 2.69 MB

Kubernetes 101 - by Jeff Geerling

Home Page: https://kube101.jeffgeerling.com/

License: MIT License

HTML 42.88% Ruby 26.28% SCSS 16.76% Dockerfile 2.73% Go 11.36%
kubernetes k8s cloud-native docker containers youtube streaming series education

kubernetes-101's Introduction

Kubernetes 101

CI

A YouTube live streaming series and book by Jeff Geerling.

This repository contains code examples from the series and the code that powers the Kubernetes 101 website.

Episodes

Click on an episode title to see the resources for that episode:

Kubernetes 101 Book

Check out the book inspired by this series, Kubernetes 101.

Ansible for Kubernetes

Check out Jeff Geerling's book on automating cloud-native infrastructure, Ansible for Kubernetes.

Static Jekyll site

This GitHub project includes a Jekyll static site configuration inside the site folder, which is used by a GitHub Actions workflow to build the static site displayed at https://kube101.jeffgeerling.com.

Building the site locally

Make sure you have Ruby and Bundler installed, then:

cd site
bundle exec jekyll serve

kubernetes-101's People

Contributors

afrobadger avatar davidbanhos avatar dglinder avatar fuhuxia avatar geerlingguy avatar ndt avatar petrkutalek 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

kubernetes-101's Issues

Kubernetes 101 ep4 - Requirements problem with drupal 9.5.9

When using the drupal-manifest provided for episode 4, the image drupal:9-apache is specified.
At the time, this means that version 9.5.9 is pulled.

When accessing the site there is a Requirements problem.
image

When specifying the image in drupal-manifest to drupal:9.1.0-apache, which is the latest version at the time of recording the video, everything works as intended.

Created a pullrequest (#50) to specify drupal version to 9.1.0 since that is the version used in the recordings

Unable to download `geerlingguy/kube101:intro`

First of all, thank you for this tutorial!

I started to follow with the first video, but when i got to the step minikube service hello-k8s the browser page opens with an error message This site can’t be reached.

When I did kubectl get pods :

NAME                         READY   STATUS             RESTARTS   AGE
hello-k8s-75d8c7c996-c4c46   0/1     ImagePullBackOff   0          22s
$ kubectl logs hello-k8s-75d8c7c996-c4c46
Error from server (BadRequest): container "kube101" in pod "hello-k8s-75d8c7c996-c4c46" is waiting to start: trying and failing to pull image

When i did kubectl describe pod hello-k8s-75d8c7c996-c4c46:

Name:         hello-k8s-75d8c7c996-c4c46
Namespace:    default
Priority:     0
Node:         minikube/192.168.64.4
Start Time:   Sun, 06 Dec 2020 15:01:13 +0100
Labels:       app=hello-k8s
              pod-template-hash=75d8c7c996
Annotations:  <none>
Status:       Pending
IP:           172.17.0.2
IPs:
  IP:           172.17.0.2
Controlled By:  ReplicaSet/hello-k8s-75d8c7c996
Containers:
  kube101:
    Container ID:
    Image:          geerlingguy/kube101:intro
    Image ID:
    Port:           <none>
    Host Port:      <none>
    State:          Waiting
      Reason:       ErrImagePull
    Ready:          False
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-rztr5 (ro)
Conditions:
  Type              Status
  Initialized       True
  Ready             False
  ContainersReady   False
  PodScheduled      True
Volumes:
  default-token-rztr5:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-rztr5
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                 node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type     Reason     Age                From               Message
  ----     ------     ----               ----               -------
  Normal   Scheduled  33s                default-scheduler  Successfully assigned default/hello-k8s-75d8c7c996-c4c46 to minikube
  Warning  Failed     33s                kubelet            Failed to pull image "geerlingguy/kube101:intro": rpc error: code = Unknown desc = Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 192.168.64.1:53: read udp 192.168.64.4:54750->192.168.64.1:53: read: connection refused
  Normal   Pulling    16s (x2 over 33s)  kubelet            Pulling image "geerlingguy/kube101:intro"
  Warning  Failed     16s (x2 over 33s)  kubelet            Error: ErrImagePull
  Warning  Failed     16s                kubelet            Failed to pull image "geerlingguy/kube101:intro": rpc error: code = Unknown desc = Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 192.168.64.1:53: read udp 192.168.64.4:47285->192.168.64.1:53: read: connection refused
  Normal   BackOff    5s (x3 over 32s)   kubelet            Back-off pulling image "geerlingguy/kube101:intro"
  Warning  Failed     5s (x3 over 32s)   kubelet            Error: ImagePullBackOff

Any idea on where I should start looking ?

PS: Doing a basic docker pull geerlingguy/kube101:intro from my machine works as expected.

Chapter 4 README.md typo?

@geerlingguy, I suspect a typo in the k8s-manifests/README.md of chapter 4.

Shouldn't the line:
kubectl logs -n -f drupal -l app=drupal

read:
kubectl logs -f -n drupal -l app=drupal ?

Thanks!

MinimumReplicasUnavailable

on episode-4 failing to start mariadb

k8s-manifests % kubectl apply -f mariadb.yml

k8s-manifests % kubectl get deployment -n drupal mariadb
NAME      READY   UP-TO-DATE   AVAILABLE   AGE
mariadb   0/1     1            0           8m17s

k8s-manifests % kubectl describe deployment -n drupal mariadb
Name:                   mariadb
Namespace:              drupal
CreationTimestamp:      Mon, 16 Jan 2023 16:24:51 -0500
Labels:                 <none>
Annotations:            deployment.kubernetes.io/revision: 1
Selector:               app=mariadb
Replicas:               1 desired | 1 updated | 1 total | 0 available | 1 unavailable
StrategyType:           RollingUpdate
MinReadySeconds:        0
RollingUpdateStrategy:  25% max unavailable, 25% max surge
Pod Template:
  Labels:  app=mariadb
  Containers:
   mariadb:
    Image:      mariadb:10.5
    Port:       3306/TCP
    Host Port:  0/TCP
    Limits:
      cpu:     2
      memory:  512Mi
    Requests:
      cpu:     500m
      memory:  256Mi
    Environment:
      MYSQL_DATABASE:              drupal
      MYSQL_USER:                  drupal
      MYSQL_PASSWORD:              drupal
      MYSQL_RANDOM_ROOT_PASSWORD:  yes
    Mounts:
      /var/lib/mysql/ from database (rw)
  Volumes:
   database:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  mariadb-pvc
    ReadOnly:   false
Conditions:
  Type           Status  Reason
  ----           ------  ------
  Available      False   MinimumReplicasUnavailable
  Progressing    True    ReplicaSetUpdated
OldReplicaSets:  <none>
NewReplicaSet:   mariadb-7b6c4ffbff (1/1 replicas created)
Events:
  Type    Reason             Age    From                   Message
  ----    ------             ----   ----                   -------
  Normal  ScalingReplicaSet  8m47s  deployment-controller  Scaled up replica set mariadb-7b6c4ffbff to 1

Any idea what I am doing wrong?

Chapter 3: Exposing deployment does not seem to work as described

Hi,

I have followed the sequence of statements in Chapter 3.
See below

`$ kubectl get pods,svc -A
NAMESPACE NAME READY STATUS RESTARTS AGE
default pod/hello-go-7445c6c654-5wrrc 1/1 Running 0 4m48s
kube-system pod/coredns-6d4b75cb6d-5vwg6 1/1 Running 0 19m
kube-system pod/etcd-minikube 1/1 Running 0 20m
kube-system pod/kube-apiserver-minikube 1/1 Running 0 20m
kube-system pod/kube-controller-manager-minikube 1/1 Running 0 20m
kube-system pod/kube-proxy-dzjhv 1/1 Running 0 19m
kube-system pod/kube-scheduler-minikube 1/1 Running 0 20m
kube-system pod/storage-provisioner 1/1 Running 1 (19m ago) 20m

NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default service/hello-go NodePort 10.99.245.118 80:32477/TCP 3m51s
default service/kubernetes ClusterIP 10.96.0.1 443/TCP 20m
kube-system service/kube-dns ClusterIP 10.96.0.10 53/UDP,53/TCP,9153/TCP 20m
`

According to page 25 the service should be accessible via ip address 10.99.245.118 and port 32477.
However nothing is available at port 32477.

I also tried :
kubectl expose deployment hello-go --port=80 --target-port=8180 --type=NodePort --external-ip 112.14.19.151
Of which the external-ip is the ip address of the host. That however does not make a difference

With ss -an|grep LISTEN|grep ^tcp nothing seems to listen at the port.

Regards Hans

Lesson Learned

Been using Docker for years so I'm not exactly paying close attention. I've used kubespray and vagrant to build a cluster. While on episode 3 I wanted to be able to hit the hello app from my work station so I modified the expose command.

kubectl expose deployment hello-go --port=80 --target-port=8180 --type=NodePort --external-ip=192.168.1.171

192.168.1.171 being the IP of one of my two master nodes...

A.... few hours latter...

watch -n1 -x ip addr del 192.168.1.171/32 dev kube-ipvs0 <-- on each node

That continuously deletes the service ip from the ipvs interface give me time to run

kubectl delete service hello-go

Obviously, I could have just blown up the cluster and rebuilt it but I learned so much about how k8s works vs docker swarm.

Jeff as always keep up the good work! I started my DevOps journey many years ago with your book on Ansible.

Episode 6, K8S 1.23.3

Hi Jeff,

In episode 6 I had to use the following ingress yml file instead of the one provided to get it to work, looks like the format has changed.

Regards,
Dan Saul

---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: drupal
  namespace: drupal
  annotations:
    kubernetes.io/ingress.class: nginx
spec:
  rules:
  - host: example.com
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: drupal
            port:
              number: 80

geerlingguy/kube101:hello-go-v2 crashes

Chapter 3 - "Updating the Go App"

❯ kubectl get pods
NAME                        READY   STATUS    RESTARTS   AGE
hello-go-57db6d78c7-6nvwj   1/1     Running   0          88m
hello-go-57db6d78c7-tcdjw   1/1     Running   0          86m
hello-go-57db6d78c7-zrmqq   1/1     Running   0          86m

❯ kubectl set image deployment/hello-go kube101=geerlingguy/kube101:hello-go-v2
deployment.apps/hello-go image updated

❯ kubectl get pods
NAME                        READY   STATUS             RESTARTS   AGE
hello-go-57db6d78c7-6nvwj   1/1     Running            0          88m
hello-go-57db6d78c7-tcdjw   1/1     Running            0          87m
hello-go-57db6d78c7-zrmqq   1/1     Running            0          86m
hello-go-69c8fd4b66-khd89   0/1     CrashLoopBackOff   1          7s

❯ kubectl rollout undo deployment hello-go
deployment.apps/hello-go rolled back

❯ kubectl get pods
NAME                        READY   STATUS    RESTARTS   AGE
hello-go-57db6d78c7-6nvwj   1/1     Running   0          88m
hello-go-57db6d78c7-tcdjw   1/1     Running   0          87m
hello-go-57db6d78c7-zrmqq   1/1     Running   0          86m

Log only shows: [pod/hello-go-69c8fd4b66-hddqv/kube101] standard_init_linux.go:219: exec user process caused: exec format error

Episode 05 - NFS client mount does not work

I was replaying episode 05 with minikube on macOS and a (virtual) NFS server. The deployment of the NFS client provisioner did not complete, it was stuck on ContainerCreating. It turned out the nfs mount failed:

$ minikube logs
Dec 17 10:05:13 minikube kubelet[3718]: E1217 10:05:13.307608    3718 mount_linux.go:150] Mount failed: exit status 32
Dec 17 10:05:13 minikube kubelet[3718]: Mounting command: systemd-run
Dec 17 10:05:13 minikube kubelet[3718]: Mounting arguments: --description=Kubernetes transient mount for /var/lib/kubelet/pods/b565540e-b4f5-46d3-8f64-ce66aaa43a9d/volumes/kubernetes.io~nfs/nfs-client-root --scope -- mount -t nfs 192.168.10.153:/home/nfs /var/lib/kubelet/pods/b565540e-b4f5-46d3-8f64-ce66aaa43a9d/volumes/kubernetes.io~nfs/nfs-client-root
Dec 17 10:05:13 minikube kubelet[3718]: Output: Running scope as unit: run-r22a4e8b61b3042b297a56104863805ce.scope
Dec 17 10:05:13 minikube kubelet[3718]: mount.nfs: Operation not permitted
Dec 17 10:05:13 minikube kubelet[3718]: E1217 10:05:13.308413    3718 nestedpendingoperations.go:301] Operation for "{volumeName:kubernetes.io/nfs/b565540e-b4f5-46d3-8f64-ce66aaa43a9d-nfs-client-root podName:b565540e-b4f5-46d3-8f64-ce66aaa43a9d nodeName:}" failed. No retries permitted until 2020-12-17 10:07:15.30839042 +0000 UTC m=+4153.768001039 (durationBeforeRetry 2m2s). Error: "MountVolume.SetUp failed for volume \"nfs-client-root\" (UniqueName: \"kubernetes.io/nfs/b565540e-b4f5-46d3-8f64-ce66aaa43a9d-nfs-client-root\") pod \"nfs-client-provisioner-1608197305-85bc6fcff7-htnbt\" (UID: \"b565540e-b4f5-46d3-8f64-ce66aaa43a9d\") : mount failed: exit status 32\nMounting command: systemd-run\nMounting arguments: --description=Kubernetes transient mount for /var/lib/kubelet/pods/b565540e-b4f5-46d3-8f64-ce66aaa43a9d/volumes/kubernetes.io~nfs/nfs-client-root --scope -- mount -t nfs 192.168.10.153:/home/nfs /var/lib/kubelet/pods/b565540e-b4f5-46d3-8f64-ce66aaa43a9d/volumes/kubernetes.io~nfs/nfs-client-root\nOutput: Running scope as unit: run-r22a4e8b61b3042b297a56104863805ce.scope\nmount.nfs: Operation not permitted\n"

The /var/log/daemon.log log on the NFS server (Debian Buster):

Dec 17 11:05:13 debian-10 rpc.mountd[867]: refused mount request from 192.168.10.32 for /home/nfs (/home/nfs): illegal port 42367

Right, illegal port. I had to add the insecure option to the NFS export in /etc/exports:

/home/nfs *(rw,insecure,sync,no_root_squash,no_subtree_check)

After rebooting the NFS server and helm uninstall / helm install of the NFS client provisioner, the deployment did complete and I could complete episode 05.

Tip for README Episode 7

Hey Jeff. Thanks for all the awesome work! I'm a big fan.

I ran into a problem wiht the Dockerfile that was generated but the oprator-sdk that I thought you may want to mention for anyone following along.

The generated dockerfile references
FROM quay.io/operator-framework/ansible-operator:v1.4.1

but as at today, there is only 1.4.0 available here https://quay.io/repository/operator-framework/ansible-operator?tab=tags

The upshot is the make step will fail at the docker-build step complaining that the image wasn't found. A quick manual modification to that line to change it to 1.4.0 fixes the problem.

Hope you're getting at least a little sleep with the new baby!

Episode 3(book): secret need to be removed in order to pull image correctly

Hello Jeff,

In book version 0.3, at page 24, we use following command:

kubectl set image deployment/hello-go kube101-go=geerlingguy/kube101:hello-go

in order to switch from a private image to a public image.

However, before doing this, we added a secret to the deployment.

It looks like until:

imagePullSecrets:
- name: regcred

is defined for the deployment, pull of new image doesn't work.

I did my test using:

# kubectl version --output=yaml
clientVersion:
  buildDate: "2022-05-03T13:46:05Z"
  compiler: gc
  gitCommit: 4ce5a8954017644c5420bae81d72b09b735c21f0
  gitTreeState: clean
  gitVersion: v1.24.0
  goVersion: go1.18.1
  major: "1"
  minor: "24"
  platform: windows/amd64
kustomizeVersion: v4.5.4
serverVersion:
  buildDate: "2022-08-17T18:26:59Z"
  compiler: gc
  gitCommit: 7e54d50d3012cf3389e43b096ba35300f36e0817
  gitTreeState: clean
  gitVersion: v1.23.10
  goVersion: go1.17.13
  major: "1"
  minor: "23"
  platform: linux/amd64

Episode 7 on WSL2 Docker Desktop Kubernetes

Hello Jeff,

Following up on the episode 7 in WSL2, entering the command below

make docker-build docker-push IMG=ttl.sh/example-memcached:1h

leads to this output:

env: ‘Files’: No such file or directory
env: ‘Files’: No such file or directory
docker build . -t ttl.sh/example-memcached:1h
env: ‘Files’: No such file or directory
make: *** [Makefile:42: docker-build] Error 127

But commenting the SHELL line fixes everything.

You might wanna add that to the warning you wrote about the macOS Big Sur.

episode-03 Image name incorrect

In episode-03 when we create the deployment and it fails to pull because the secret is not present. After adding the secret it still fails to pull with the same error.

Failed to pull image "geerlingguy/kube101-go:1.0.0": rpc error: code = Unknown desc = Error response from daemon: pull access denied for geerlingguy/kube101-go, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

This is because the repository geerlingguy/kube101-go no longer exists.
I assume the correct repository is geerlingguy/kube101 with image tag hello-go and have worked around the error by editing the deployment to use this image.

spec:
  ...
  template:
    ...
    spec:
      containers:
      - image: geerlingguy/kube101:hello-go

Validation of kubernettes-101 episodes against Apple M1 build

With the release of Docker Preview for M1, Go 1.16beta1 for M1, and minikube v1.17.0 test, we can now run Minikube on an M1 with native ARM packages as per kubernetes/minikube#9224

  • Kubectl comes from Docker's M1 preview builds
  • An M1 build Go-lang formula is available in the M1 Brew preview. While it installs "1.15.7", it's actually 1.16beta1

I've tested episode-01 and it works fine.

❯ go version
go version go1.16beta1 darwin/arm64
❯ ./out/minikube version
minikube version: v1.17.0
commit: b1ccf54f8327aa0dc5421f92f49af057e8e9ebee
❯ ./out/minikube start --driver=docker
😄  minikube v1.17.0 on Darwin 11.1 (arm64)
✨  Using the docker driver based on existing profile
👍  Starting control plane node minikube in cluster minikube
🚜  Pulling base image ...
🤷  docker "minikube" container is missing, will recreate.
🔥  Creating docker container (CPUs=2, Memory=1981MB) ...
🐳  Preparing Kubernetes v1.20.2 on Docker 20.10.2 ...
🔎  Verifying Kubernetes components...
🌟  Enabled addons: storage-provisioner, default-storageclass
🏄  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
❯ kubectl get nodes
NAME       STATUS   ROLES    AGE   VERSION
minikube   Ready    <none>   41s   v1.20.2
❯ kubectl create deployment hello-k8s --image=geerlingguy/kube101:intro
deployment.apps/hello-k8s created
❯ kubectl expose deployment hello-k8s --type=NodePort --port=80
service/hello-k8s exposed
❯ ./out/minikube service hello-k8s
|-----------|-----------|-------------|---------------------------|
| NAMESPACE |   NAME    | TARGET PORT |            URL            |
|-----------|-----------|-------------|---------------------------|
| default   | hello-k8s |          80 | http://192.168.49.2:31305 |
|-----------|-----------|-------------|---------------------------|
🏃  Starting tunnel for service hello-k8s.
|-----------|-----------|-------------|------------------------|
| NAMESPACE |   NAME    | TARGET PORT |          URL           |
|-----------|-----------|-------------|------------------------|
| default   | hello-k8s |             | http://127.0.0.1:56603 |
|-----------|-----------|-------------|------------------------|
🎉  Opening service default/hello-k8s in default browser...
❗  Because you are using a Docker driver on darwin, the terminal needs to be open to run it.

Got drupal pod with pending status in Episode 05

I tried two times for building it up, but I still can not figure out how I can fix it.

NAME                                                 READY   STATUS    RESTARTS   AGE
nfs-client-provisioner-1626519840-5d45c6b567-hf9tb   1/1     Running   0          13m
NAME                      READY   STATUS    RESTARTS   AGE
drupal-79f84f8697-rmmzw   0/1     Pending   0          10m
mariadb-7d4bd4bf8-2j5cn   1/1     Running   0          15m

And I used the describe command to the drupal then I got two events below.
It seemed like it stuck there.

Events:
  Type     Reason            Age   From               Message
  ----     ------            ----  ----               -------
  Warning  FailedScheduling  5m9s  default-scheduler  0/3 nodes are available: 3 pod has unbound immediate PersistentVolumeClaims.
  Warning  FailedScheduling  5m8s  default-scheduler  0/3 nodes are available: 3 pod has unbound immediate PersistentVolumeClaims.

Episode 5 (book): missing step to increase replicas

Hello,

In book version 0.3, at page 49, we need to re-deploy drupal.yml and mariadb.yml to see if Drupal can scale with more than one replica. However, the step to change replicas setting from 1 to 3 is missing.

In fact, it's necessary to redo:

kubectl edit deployment drupal -n drupal

and to increase number of replicas.

Episode 05 nfs server client provioner is deprecated

In the readme of Episode 5, the new nfs-subdir-external-provisioner is mentioned, but the helm chart installs the old (?) one, from ckotzbauer/nfs-client-provisioner. According to their github his repo is indeed deprecated, and moved to nfs-subdir-external-provisioner.

Kubernetes 1.20 removed support for SelfLink, rendering this example no longer working on newer versions. It also doesn't work natively on raspberry pi's.

The new helm does work without issues and can probably replaced as is. But this will render the video outdated?

Add 'Episodes' overview page on website

The website currently just has two posts on it, and the sidebar. I would like to add a full listing of episodes, which has a link to each episode's page on the site. Maybe as a post, and backdate it so it shows up before the first episode, or maybe as a page, and add a link somewhere...

geerlingguy/kubectl-go:1.0.0 not available (episode 03)

Hey Jeff, looks like you renamed your dockerhub repo from
geerlingguy/kube101-go:1.0.0
to
geerlingguy/kube101:hello-go

This in particular affects episode 3 - thanks again for all you do and congrats on the new addition!

Kubernetes-101, Chapter 1, "Instructions for Minikube" Fail

I purchased the Kubernetes-101 book via Amazon via your link several months ago and then I contracted COVID and it lingering effects. So I am just now running through the book.
I use a MacBook Pro, 2019 running Ventura 13.3.1., 32 Gb DDR4, Radeon Pro 55600 -8Gb.
I use Virtual Box 7.0 and, recently, Parallels newest version to support Windows.
(Retired Programmer 42+ years OTJ now helping out family and friends with computer issues for free.)
Following the instructions to install minikube it failed with a notification to use VirtualBox 5.6 and the 3 GitHub issues listed that basically said the same thing as the install fail notification upon examination.
I deleted minikube, kubectl, and VirtualBox. Shutdown to a cold boot and then followed the instructions again with the same issue resulting. So, I deleted all again, hard boot and this time use curl instead of brew to install the three packages. Same thing. (I know that was a "if x ='1' then move '1' to x" solution but I thought what the heck, stranger things have happened.)
I am now thinking that this obviously worked at the writing date in 2021 so it must be a time and versioning bug.
I went to the Kubernetes K8s minikube start page and followed the instruction but this time I used Parallels with the minikube start as my VM and it worked.
At this point I thought about redoing using the start and the --VirtualBox option but I was so happy to have a working system and to be able to continue with the book that I said I'd try that at a later date.
Just thought this might be something to incorporate in a revision.
However--
One caveat: All of this could be the way I have setup my MacBook. Up until about 2 years prior to my retirement, my work involved IBM iron and Microsoft. Mac and Linux were really only used after 4/1/2016 with regularity. So a big block of salt.
Big fan of you vids and always look forward to the next installment. Kudos!

Episode 6 - warning about ingress kind in Kubernetes 1.19+

When applying the ingress manifest in Episode 6, I'm getting:

$ kubectl apply -f drupal-ingress.yml
Warning: networking.k8s.io/v1beta1 Ingress is deprecated in v1.19+, unavailable in v1.22+; use networking.k8s.io/v1 Ingress

So that manifest needs to be updated.

Episode 3 - changing number of replicas does not work

When I change the replicas number, the command returns that the deployment was edited:

$ kubectl edit deployment hello-go
deployment.apps/hello-go edited

but I cannot see any additional pods getting rolled out:

$ kubectl get deployment hello-go
NAME       READY   UP-TO-DATE   AVAILABLE   AGE
hello-go   1/1     1            1           86m

If I use the command $ kubectl edit deployment hello-go to check the configuration, I see that the replicas line has been changed back to 1.

Additional info:

$ kubectl describe deployment hello-go
Name:                   hello-go
Namespace:              default
CreationTimestamp:      Sat, 08 Jan 2022 15:29:02 +0000
Labels:                 app=hello-go
Annotations:            deployment.kubernetes.io/revision: 2
Selector:               app=hello-go
Replicas:               1 desired | 1 updated | 1 total | 1 available | 0 unavailable
StrategyType:           RollingUpdate
MinReadySeconds:        0
RollingUpdateStrategy:  25% max unavailable, 25% max surge
Pod Template:
  Labels:  app=hello-go
  Containers:
   kube101-go:
    Image:        geerlingguy/kube101:hello-go
    Port:         <none>
    Host Port:    <none>
    Environment:  <none>
    Mounts:       <none>
  Volumes:        <none>
Conditions:
  Type           Status  Reason
  ----           ------  ------
  Available      True    MinimumReplicasAvailable
  Progressing    True    NewReplicaSetAvailable
OldReplicaSets:  <none>
NewReplicaSet:   hello-go-7459b5c854 (1/1 replicas created)
Events:          <none>
$ kubectl get all --selector app=hello-go
NAME                            READY   STATUS    RESTARTS   AGE
pod/hello-go-7459b5c854-rmrrc   1/1     Running   0          80m

NAME               TYPE       CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
service/hello-go   NodePort   10.107.98.168   <none>        80:32699/TCP   77m

NAME                       READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/hello-go   1/1     1            1           86m

NAME                                  DESIRED   CURRENT   READY   AGE
replicaset.apps/hello-go-5944979865   0         0         0       86m
replicaset.apps/hello-go-7459b5c854   1         1         1       80m

OS: Debian 10.11
minikube: v1.24.0
Docker: 20.10.8

Topic missing from all K8s

How does one use K8s for development? There are many other tools that have been launched to try and solve this problem but they only seem to hide how the sausage it made. I am referring to tools such as: lando, ddev, lagoon, and others.

What I need is someone to publish a guide on how to use K8s as a developer of a Drupal site.

Small corrections to episode 1

Hi, thanks for creating the tutorial. I am following along.

A few comments/corrections:

  • You might like to mention that Docker has to be pre-installed before starting the tutorial. Otherwise you get this:

track:~$ minikube start
😄 minikube v1.15.1 on Darwin 11.0.1
👎 Unable to pick a default driver. Here is what was considered, in preference order:
▪ virtualbox: Not installed: unable to find VBoxManage in $PATH
▪ vmware: Not installed: exec: "docker-machine-driver-vmware": executable file not found in $PATH
▪ vmwarefusion: Not installed: vmrun path check: exec: "vmrun": executable file not found in $PATH
▪ docker: Not installed: exec: "docker": executable file not found in $PATH
▪ hyperkit: Not installed: exec: "hyperkit": executable file not found in $PATH
▪ parallels: Not installed: exec: "prlctl": executable file not found in $PATH
▪ podman: Not installed: exec: "podman": executable file not found in $PATH

❌ Exiting due to DRV_NOT_DETECTED: No possible driver was detected. Try specifying --driver, or see https://minikube.sigs.k8s.io/docs/start/

  • "minikube halt" -> "minikube stop"

track:~$ minikube halt
Error: unknown command "halt" for "minikube"

  • Missing final “.” from “docker build -t geerlingguy/kube101:intro”

Thanks,

Frank.

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.