Giter Club home page Giter Club logo

lab-kubernetes's Introduction

Docker and Kubernetes Lab

Build Status

What is Docker? How can Docker containers help you build and deploy a cloud native solution as micro-services? This lab will teach you what-you-need-to-know to get started building and running Docker Containers in IBM Cloud. It covers what Docker is, and more importantly, what Docker is not! You will learn how to deploy and run existing Docker community images, how to create your own Docker images and push them to IBM Cloud, and how to connect containers together using Docker Compose. If you want to know what all this fuss about containers is about, come to this lab and spin up a few containers and see for yourself why everyone is adopting Docker.

This lab is an example of how to create a Python / Flask / Redis app using Docker on IBM Cloud

Copy your apikey to /home/vscode

docker cp ~/.bluemix/apikey.json lab-kubernetes:/home/vscode
docker exec lab-kubernetes sudo chown vscode:vscode /home/vscode/apikey.json

IBM Cloud Login

ibmcloud login -a cloud.ibm.com -r us-south -g default --apikey @~/apikey.json
ibmcloud ks cluster config --cluster nyu-devops
ibmcloud cr login

Update Image name

(kustomize edit set image hitcounter=us.icr.io/nyu_devops/lab-kubernetes && kustomize build .)
kustomize build kube/overlays/dev | kc apply -f -  

Create a dev namespace

When you create a new namespace you must copy the ImagePullSecret from the default namespace so that deployments in the new namespace can pull images from the IBM Cloud Container Registry.

The command to do this for dev is:

kunectl create namespace dev
kubectl -n default get secret all-icr-io -o yaml | sed 's/default/dev/g' | kubectl -n dev apply -f -

What the second command does is to get the ImagePullSecret named all-icr-io from the default namespace and running it through sed to change the namespace: to whatever is needed, and applying it to the dev namespace.

lab-kubernetes's People

Contributors

rofrano avatar dependabot[bot] avatar

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.