first practical introduction to Kubernetes and Openshift. container orchestration systems. the slides are meant as a quick introduction to Kubernetes/Openshift to prepare for the hands-on demo.
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Docker Dhahran November 2017 meetup
1. P R ACT IC A L IN T RO DUCT IO N TO O R CH EST R AT IO N :
K UBE R N E T E S/O P ENSH IFT
DH A H R A N DO CKER M EET U P
10T H NOV EM BER 2017
BY : WA LID S H A A R I
2. System engineer, passionate about Open source working for a large enterprise
with anti DevOps patterns. Recently working with network team on evaluating
Network Automation for multi vendor data center.
@walidshaari
walid.shaari@linux.com
https://www.linkedin.com/in/walidshaari/
https://medium.com/@walidshaari/
https://github.com/walidshaari/Kubernetes-Certified-Administrator
$oc whoami
RHCA IV
3. Thank you, our sponsor, TAM
Development LLC for hosting the
Dhahran Docker meetup.
Thank you Mustafa Dahab for
presenting TAM Development LLC
Rancher, and Docker in production.
16. 15
• Openshift is an opiniated Kubernetes - you can use Kubectl Kubernetes client to interact with an OpenShift
cluster
• Red Hat does not use all the Kubernetes abstractions “Objects”, however, they have their own and wrap
around standard Kubernetes objects. e.g. Openshift router vs. K8s ingress controller.
• Medium: difference between kubernetes and openshift
Openshift relationship to Kubernetes
23. 22
oc completion bash > oc-completion.sh
source oc-completion.sh
oc version
oc help
oc types
oc new-project
oc get projects
oc get namespaces
kubectl completion bash > k8s-completion.sh
source k8s-completion.sh
kubectl version
Kubectl help
Kubectl get projects
Kubectl get namespaces
Can kubectl create a namespace ? How about a project?
Client tools demo
24. 23
Pods are the core Kubernetes Component
masters-imac:~ master$ oc run mypod --image=gcr.io/kuar-demo/kuard-amd64:1
deploymentconfig "mypod" created
masters-imac:~ master$ oc run myotherpod --image=gcr.io/kuar-demo/kuard-amd64:2
deploymentconfig "myotherpod" created
masters-imac:~ master$ kubectl get pods
NAME READY STATUS RESTARTS AGE
myotherpod-1-33xmq 0/1 ContainerCreating 0 2m
myotherpod-1-deploy 1/1 Running 0 2m
mypod-1-6p37m 1/1 Running 0 2m
masters-imac:~ master$ kubectl get pods
NAME READY STATUS RESTARTS AGE
myotherpod-1-33xmq 0/1 ContainerCreating 0 2m
myotherpod-1-deploy 1/1 Running 0 2m
mypod-1-6p37m 1/1 Running 0 2m
masters-imac:~ master$ oc get pods
NAME READY STATUS RESTARTS AGE
myotherpod-1-33xmq 1/1 Running 0 3m
mypod-1-6p37m 1/1 Running 0 4m
26. 25
But what did Openshift add to Docker run?
masters-imac:~ master$ oc get all
NAME REVISION DESIRED CURRENT TRIGGERED BY
dc/myotherpod 1 1 1 config
dc/mypod 1 1 1 config
NAME DESIRED CURRENT READY AGE
rc/myotherpod-1 1 1 1 8m
rc/mypod-1 1 1 1 8m
NAME READY STATUS RESTARTS AGE
po/myotherpod-1-33xmq 1/1 Running 0 8m
po/mypod-1-6p37m 1/1 Running 0 8m
27. 26
But what did Openshift add to Docker run?
masters-imac:~ master$ oc get rc
NAME DESIRED CURRENT READY AGE
rc/myotherpod-1 1 1 1 8m
rc/mypod-1 1 1 1 8m
Replication Controllers provides extra feature to pods such as rolling update:
$ kubectl rolling-update NAME [NEW_NAME] --image=IMAGE:TAG
// Update pods of frontend-v1 using new replication controller data in frontend-v2.json.
$ kubectl rolling-update frontend-v1 -f frontend-v2.json
// Update pods of frontend-v1 using JSON data passed into stdin.
$ cat frontend-v2.json | kubectl rolling-update frontend-v1 -f -