Git Product home page Git Product logo

ex280-study-notes's Introduction

EX280-study-notes

Giriş

export KUBECONFIG=INSTALL_DIR/auth/kubeconfig
oc login -u kubeadmin -p my-secure-password-{-_-}

## Cluster sürüm bilgisi öğrenme

```bash
oc get clusterversion

Identity Provider definition

Configuring the OAuth Custom Resource

To use the HTPasswd identity provider, the OAuth custom resource must be edited to add an

entry to the .spec.identityProviders array:
apiVersion: config.openshift.io/v1
kind: OAuth

metadata:

  name: cluster

spec:

  identityProviders:

  - name: my_htpasswd_provider 
    mappingMethod: claim 
    type: HTPasswd
    htpasswd:

      fileData:

        name: htpasswd-secret

Node'ları listele

oc get node
oc adm top nodes

Kullanıcı yarat

oc create user aliokan
oc create user --full-name="Ali Okan Yuksel"

Kullanıcıları listele

oc get user

Sistemde authenticate olmuş olan tüm kullanıcılardan self-provisioner rolünü çıkar

oc adm policy remove-cluster-role-from-group self-provisioner system:authenticated:oauth

ClusterOperators Listeleme

oc get co
oc get clusteroperators

Log görüntüleme

oc adm node-logs -u crio master01
oc adm node-logs -u kubelet master01
oc adm node-logs master01

node'a uzaktan erisim saglama

oc debug node/master01

deployment'a uzaktan erisim saglama

oc debug deployment/my-deployment-name --as-root

pod'a uzaktan erisim saglama

oc rsh my-pod-name

dosya kopyalama

oc cp localfile my-pod-name:/remotefile

tcp tunnel olusturma

oc port-forward my-pod-name local-port:remote-port

increase log level

oc get pod --loglevel 10

authentication token ogrenme

oc whami -t

get projects

switch to project

get status of project

get events

get deployment

modify deployment

oc edit depoyment/bla

yeni bir uygulama yarat

oc new-app --name=mydb --image-stream=mysql:5.7 -e MYSQL_USER=dbuser -e MYSQL_PASSWORD=verysecret -e MYSQL_DATABASE=mydb

uygulamaya ait env variable'ları config den okunacak hale getirmek amacıyla bir configmap ve secret yarat

oc create configmap db-config --from-literal user=dbuser --from-literal=database=mydb
oc create secret generic db-auth --from-literal=password=verysecret
oc set env dc/mydb --list  # mydb isimi uygulama ayağa kaldırırken verdiğimiz isimlendirme, mevcut environment variable'ları listeler
oc set env dc/mydb --from cm/db-config --prefix=MYSQL
oc set env dc/mydb --from cm/db-auth --prefix=MYSQL

image search ve listeleme nasıl yapılır?

oc new-app -L
oc new-app --search mysql

openshift console url bilgisi nasıl öğrenilir?

oc whoami --show-console

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.