This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- apiVersion: v1 | |
kind: LimitRange | |
metadata: | |
creationTimestamp: null | |
name: ${PROJECT_NAME}-limits | |
spec: | |
limits: | |
- type: Container | |
default: | |
cpu: 1000m |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: template.openshift.io/v1 | |
kind: Template | |
metadata: | |
creationTimestamp: null | |
name: project-request | |
namespace: openshift-config | |
objects: | |
- apiVersion: project.openshift.io/v1 | |
kind: Project | |
metadata: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- apiVersion: v1 | |
kind: ResourceQuota | |
metadata: | |
name: ${PROJECT_NAME}-quota | |
spec: | |
hard: | |
pods: "10" | |
requests.cpu: "4" | |
requests.memory: 8Gi | |
limits.cpu: "6" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: template.openshift.io/v1 | |
kind: Template | |
metadata: | |
creationTimestamp: null | |
name: project-request | |
namespace: openshift-config | |
objects: | |
- apiVersion: project.openshift.io/v1 | |
kind: Project | |
metadata: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ oc patch project.config.openshift.io/cluster \ | |
--type=merge \ | |
-p '{"spec":{"projectRequestTemplate":{"name":"project-request"}}}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ oc new-project test-new-stuff | |
Now using project "test-new-stuff" on server "https://example.com:6443". | |
You can add applications to this project with the 'new-app' command. For example, try: | |
oc new-app ruby~https://github.com/sclorg/ruby-ex.git | |
to build a new example application in Ruby. Or use kubectl to deploy a simple Kubernetes application: | |
kubectl create deployment hello-node --image=gcr.io/hello-minikube-zero-install/hello-node | |
$ oc project | |
Using project "test-new-stuff" on server "https://example.com" | |
$ oc get limitrange | |
NAME CREATED AT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ oc get project.config.openshift.io cluster -o=jsonpath='{.spec.projectRequestTemplate.name}' | |
project-request # should say "project-request" unless you customized it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A shortcut function that simplifies usage of xclip. | |
# - Accepts input from either stdin (pipe), or params. | |
# Retrieved from: http://madebynathan.com/2011/10/04/a-nicer-way-to-use-xclip/ | |
# ------------------------------------------------ | |
cb() { | |
local _scs_col="\e[0;32m"; local _wrn_col='\e[1;31m'; local _trn_col='\e[0;33m' | |
# Check that xclip is installed. | |
if ! type xclip > /dev/null 2>&1; then | |
echo -e "$_wrn_col""You must have the 'xclip' program installed.\e[0m" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: application-nginx | |
name: application-nginx | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spec: | |
containers: | |
- image: quay.io/<username>/nginx:latest | |
name: application-nginx | |
imagePullPolicy: Always | |
ports: | |
- containerPort: 8443 | |
protocol: TCP | |
readinessProbe: | |
httpGet: |