Code Monkey home page Code Monkey logo

kubernetes's Introduction

The Learning Kubernetes Handout

This folder includes all of the different pieces of information you'll need to take the Learning Kubernetes course on Linkedin Learning.

Exercise Files

It is referenced by the chapter number with chapter_lesson format. For example, 03_01 signifies chapter 3, video 01.

Please make sure to download this repository (or the exercise files from the LinkedLearning Exercise File tab for the course), and make sure your command prompt is in the exercise folder for the lesson you are taking.

Course Handout

If you're looking for the course handout, look at the CourseHandout.md file

Questions or Concerns

Please file a bug or a feature with this repository, and I'll be happy to look at it!

kubernetes's People

Contributors

bessex avatar cnmagee avatar kamillepek avatar karthequian 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kubernetes's Issues

03_04 not working for Mac with Apple Sillicon

All the steps until exposing helloworld work alright, but then when tunneling to the service I get:

Starting tunnel for service helloworld.
๐ŸŽ‰  Opening service default/helloworld in default browser...
โ—  Because you are using a Docker driver on darwin, the terminal needs to be open to run it.

and no idea how to proceed from there. I noticed that in the videos minikube is being started with the hyperkit driver. However, when I run it here I get

minikube start
๐Ÿ˜„  minikube v1.25.2 on Darwin 12.0.1 (arm64)
โœจ  Automatically selected the docker driver. Other choices: virtualbox, ssh

and if I try with hyperkit I get

minikube start --driver=hyperkit
๐Ÿ˜„  minikube v1.25.2 on Darwin 12.0.1 (arm64)
โœจ  Using the hyperkit driver based on user configuration

โŒ  Exiting due to DRV_UNSUPPORTED_OS: The driver 'hyperkit' is not supported on darwin/arm64

Thanks!

Learning Kubernetes quiz responses issue

Hi Karthik. Thank you for creating the course on LinkedIn Learning. I went through it and found it valuable.

One minor issue to bring to your attention. In one of the quizzes related to the command for scaling a deployment, it seemed like from the 4 choices, 2 of the choices were duplicated.

kubectl scale --replicas=4 deployment/helloworld-deployment

I believe this was the quiz choice that was duplicated. For me it was answers "c" and "d". Initially I picked "c" and it was wrong, then I picked "d" and it was correct. I couldn't see that they were different answers.

Not a big deal as the quiz score doesn't seem like it's recorded or even mandatory to continue on in the course, but I figured I'd send it along as it might help another learner avoid the issue if it can be identified and corrected.

Thanks.

statefulset.yaml example not working

Hi, I'm following the linkedin course & I'm getting several problems running this StatefulSet:

๐Ÿ˜„  minikube v1.17.1 on Ubuntu 20.04
โœจ  Using the docker driver based on existing profile
๐Ÿ‘  Starting control plane node minikube in cluster minikube
๐Ÿ”„  Restarting existing docker container for "minikube" ...
๐Ÿณ  Preparing Kubernetes v1.20.2 on Docker 20.10.2 ...
๐Ÿ”Ž  Verifying Kubernetes components...
๐ŸŒŸ  Enabled addons: storage-provisioner, metrics-server, default-storageclass, dashboard
๐Ÿ„  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

Folder permissions:

java.io.IOException: Cannot write to data directory /var/lib/zookeeper/data/log/version-2

I can solve this after googling & setting:

      securityContext:
        runAsUser: 0
        fsGroup: 0

After that, I'm stacked with another problem I can't find a solution:

  • The first pod zk-0 is running, but zk-1 hangs on pending status due to 0/1 nodes are available: 1 node(s) didn't match pod affinity/anti-affinity, 1 node(s) didn't match pod anti-affinity rules.

Logs in zk-0 are:

2021-02-09 14:57:18,031 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@883] - Processing ruok command from /127.0.0.1:58436
2021-02-09 14:57:18,032 [myid:1] - INFO  [Thread-11:NIOServerCnxn@1044] - Closed socket connection for client /127.0.0.1:58436 (no session established for client)
2021-02-09 14:57:22,562 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:58468
2021-02-09 14:57:22,562 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@883] - Processing ruok command from /127.0.0.1:58468
2021-02-09 14:57:22,564 [myid:1] - INFO  [Thread-12:NIOServerCnxn@1044] - Closed socket connection for client /127.0.0.1:58468 (no session established for client)
2021-02-09 14:57:28,057 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:58510
2021-02-09 14:57:28,058 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@883] - Processing ruok command from /127.0.0.1:58510
2021-02-09 14:57:28,060 [myid:1] - INFO  [Thread-13:NIOServerCnxn@1044] - Closed socket connection for client /127.0.0.1:58510 (no session established for client)
2021-02-09 14:57:32,563 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:58548
2021-02-09 14:57:32,564 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@883] - Processing ruok command from /127.0.0.1:58548
2021-02-09 14:57:32,566 [myid:1] - INFO  [Thread-14:NIOServerCnxn@1044] - Closed socket connection for client /127.0.0.1:58548 (no session established for client)
2021-02-09 14:57:38,013 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:58590
2021-02-09 14:57:38,013 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@883] - Processing ruok command from /127.0.0.1:58590
2021-02-09 14:57:38,014 [myid:1] - INFO  [Thread-15:NIOServerCnxn@1044] - Closed socket connection for client /127.0.0.1:58590 (no session established for client)
2021-02-09 14:57:42,535 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:58626
2021-02-09 14:57:42,536 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@883] - Processing ruok command from /127.0.0.1:58626
2021-02-09 14:57:42,538 [myid:1] - INFO  [Thread-16:NIOServerCnxn@1044] - Closed socket connection for client /127.0.0.1:58626 (no session established for client)
2021-02-09 14:57:48,000 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:58666
2021-02-09 14:57:48,001 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@883] - Processing ruok command from /127.0.0.1:58666
2021-02-09 14:57:48,001 [myid:1] - INFO  [Thread-17:NIOServerCnxn@1044] - Closed socket connection for client /127.0.0.1:58666 (no session established for client)
2021-02-09 14:57:52,525 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:58700
2021-02-09 14:57:52,526 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@883] - Processing ruok command from /127.0.0.1:58700
2021-02-09 14:57:52,526 [myid:1] - INFO  [Thread-18:NIOServerCnxn@1044] - Closed socket connection for client /127.0.0.1:58700 (no session established for client)
2021-02-09 14:57:58,060 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:58742
2021-02-09 14:57:58,061 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@883] - Processing ruok command from /127.0.0.1:58742
2021-02-09 14:57:58,063 [myid:1] - INFO  [Thread-19:NIOServerCnxn@1044] - Closed socket connection for client /127.0.0.1:58742 (no session established for client)
2021-02-09 14:57:59,968 [myid:1] - WARN  [QuorumPeer[myid=1]/0.0.0.0:2181:QuorumCnxManager@588] - Cannot open channel to 2 at election address zk-1.zk-hs.default.svc.cluster.local:3888
java.net.UnknownHostException: zk-1.zk-hs.default.svc.cluster.local
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:562)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:614)
	at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:843)
	at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:913)
2021-02-09 14:57:59,971 [myid:1] - WARN  [QuorumPeer[myid=1]/0.0.0.0:2181:QuorumPeer$QuorumServer@173] - Failed to resolve address: zk-1.zk-hs.default.svc.cluster.local
java.net.UnknownHostException: zk-1.zk-hs.default.svc.cluster.local: Name or service not known
	at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
	at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
	at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
	at java.net.InetAddress.getAllByName0(InetAddress.java:1276)
	at java.net.InetAddress.getAllByName(InetAddress.java:1192)
	at java.net.InetAddress.getAllByName(InetAddress.java:1126)
	at java.net.InetAddress.getByName(InetAddress.java:1076)
	at org.apache.zookeeper.server.quorum.QuorumPeer$QuorumServer.recreateSocketAddresses(QuorumPeer.java:166)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:595)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:614)
	at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:843)
	at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:913)
2021-02-09 14:57:59,972 [myid:1] - WARN  [QuorumPeer[myid=1]/0.0.0.0:2181:QuorumCnxManager@588] - Cannot open channel to 3 at election address zk-2.zk-hs.default.svc.cluster.local:3888
java.net.UnknownHostException: zk-2.zk-hs.default.svc.cluster.local
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:562)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:614)
	at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:843)
	at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:913)
2021-02-09 14:57:59,975 [myid:1] - WARN  [QuorumPeer[myid=1]/0.0.0.0:2181:QuorumPeer$QuorumServer@173] - Failed to resolve address: zk-2.zk-hs.default.svc.cluster.local
java.net.UnknownHostException: zk-2.zk-hs.default.svc.cluster.local: Name or service not known
	at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
	at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
	at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
	at java.net.InetAddress.getAllByName0(InetAddress.java:1276)
	at java.net.InetAddress.getAllByName(InetAddress.java:1192)
	at java.net.InetAddress.getAllByName(InetAddress.java:1126)
	at java.net.InetAddress.getByName(InetAddress.java:1076)
	at org.apache.zookeeper.server.quorum.QuorumPeer$QuorumServer.recreateSocketAddresses(QuorumPeer.java:166)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:595)
	at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:614)
	at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:843)
	at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:913)
2021-02-09 14:57:59,976 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@852] - Notification time out: 60000
2021-02-09 14:58:02,551 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:58774
2021-02-09 14:58:02,551 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@883] - Processing ruok command from /127.0.0.1:58774
2021-02-09 14:58:02,553 [myid:1] - INFO  [Thread-20:NIOServerCnxn@1044] - Closed socket connection for client /127.0.0.1:58774 (no session established for client)
2021-02-09 14:58:08,046 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:58814
2021-02-09 14:58:08,047 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@883] - Processing ruok command from /127.0.0.1:58814
2021-02-09 14:58:08,048 [myid:1] - INFO  [Thread-21:NIOServerCnxn@1044] - Closed socket connection for client /127.0.0.1:58814 (no session established for client)
2021-02-09 14:58:12,560 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:58846
2021-02-09 14:58:12,561 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@883] - Processing ruok command from /127.0.0.1:58846
2021-02-09 14:58:12,563 [myid:1] - INFO  [Thread-22:NIOServerCnxn@1044] - Closed socket connection for client /127.0.0.1:58846 (no session established for client)
2021-02-09 14:58:18,026 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:58890
2021-02-09 14:58:18,026 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@883] - Processing ruok command from /127.0.0.1:58890
2021-02-09 14:58:18,027 [myid:1] - INFO  [Thread-23:NIOServerCnxn@1044] - Closed socket connection for client /127.0.0.1:58890 (no session established for client)
2021-02-09 14:58:22,561 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:58922
2021-02-09 14:58:22,561 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@883] - Processing ruok command from /127.0.0.1:58922
2021-02-09 14:58:22,563 [myid:1] - INFO  [Thread-24:NIOServerCnxn@1044] - Closed socket connection for client /127.0.0.1:58922 (no session established for client)
2021-02-09 14:58:28,045 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:58970
2021-02-09 14:58:28,045 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@883] - Processing ruok command from /127.0.0.1:58970
2021-02-09 14:58:28,047 [myid:1] - INFO  [Thread-25:NIOServerCnxn@1044] - Closed socket connection for client /127.0.0.1:58970 (no session established for client)
2021-02-09 14:58:32,559 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:59008
2021-02-09 14:58:32,560 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@883] - Processing ruok command from /127.0.0.1:59008
2021-02-09 14:58:32,562 [myid:1] - INFO  [Thread-26:NIOServerCnxn@1044] - Closed socket connection for client /127.0.0.1:59008 (no session established for client)
2021-02-09 14:58:38,025 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:59048
2021-02-09 14:58:38,026 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@883] - Processing ruok command from /127.0.0.1:59048
2021-02-09 14:58:38,027 [myid:1] - INFO  [Thread-27:NIOServerCnxn@1044] - Closed socket connection for client /127.0.0.1:59048 (no session established for client)
2021-02-09 14:58:42,558 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:59096
2021-02-09 14:58:42,559 [myid:1] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@883] - Processing ruok command from /127.0.0.1:59096
2021-02-09 14:58:42,561 [myid:1] - INFO  [Thread-28:NIOServerCnxn@1044] - Closed socket connection for client /127.0.0.1:59096 (no session established for client)
Logs from Feb 9, 2021 to Feb 9, 2021 UTC

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.