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
https://access.redhat.com/solutions/2178611 | |
### How to Force a pod to schedule to a specific node using nodeSelector in OCP | |
Pods get scheduled to nodes based on the node labels. NodeSelector will get set either for the cluster, project, or pod to determine which node or group of nodes the pod will be scheduled to. | |
The easiest way to test and ensure a pod is scheduled to a node is by setting it at the project level. This can only be done by cluster-admins or users with elevated privileges. | |
# oc adm project <NAME> --node-selector='foo=bar' |
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
oauthConfig: | |
assetPublicURL: https://ocpmaster.example.com:8443/console/ | |
grantConfig: | |
method: auto | |
identityProviders: | |
#- challenge: true | |
# login: true | |
# mappingMethod: claim | |
# name: allow_all | |
# provider: |
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
#!/bin/bash | |
oc project logging | |
anypod=$(oc get po --selector=component=es --no-headers -o jsonpath='{range .items[?(@.status.phase=="Running")]}{.metadata.name}{"\n"}{end}' | head -n1) | |
ES_URL='https://localhost:9200' | |
curl_get='curl -s -X GET --cacert /etc/elasticsearch/secret/admin-ca --cert /etc/elasticsearch/secret/admin-cert --key /etc/elasticsearch/secret/admin-key' | |
date | |
$curl_get $ES_URL/_cat/health?v | |
# See https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cat-nodes.html for header meanings |
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
--- | |
- hosts: clients | |
tasks: | |
- name: Install additional packages needed | |
yum: | |
name: "{{ item }}" | |
state: latest | |
with_items: | |
- wget | |
- git |
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
--- | |
- hosts: clients | |
tasks: | |
- name: Check Swap, make sure it's off | |
shell: ansible nodes -m shell -a 'free -m | grep "^Swap"' | |
- name: Check Kubelet Config | |
shell: ansible nodes -m shell -a 'grep -A10 "^kubeletArguments" /etc/origin/node/node-config.yaml' | |
- name: Selinux Status |
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
--- | |
- name: perform postinstallation steps | |
hosts: masters[0] | |
tasks: | |
- block: | |
- name: create yaml for cassandra pv | |
copy: | |
content: | | |
apiVersion: v1 | |
kind: PersistentVolume |
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: ConfigMap | |
metadata: | |
name: aci-containers-config | |
namespace: kube-system | |
labels: | |
aci-containers-config-version: "ac19175f-667f-4bf7-8b2c-4e6ed07802cd" | |
network-plugin: aci-containers | |
data: | |
controller-config: |- |
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: extensions/v1beta1 | |
kind: DaemonSet | |
metadata: | |
annotations: | |
kubectl.kubernetes.io/last-applied-configuration: | | |
{"apiVersion":"extensions/v1beta1","kind":"DaemonSet","metadata":{"annotations":{},"labels":{"aci-containers-config-version":"ac19175f-667f-4bf7-8b2c-4e6ed07802cd","network-plugin":"aci-containers"},"name":"aci-containers-host","namespace":"kube-system"},"spec":{"template":{"metadata":{"annotations":{"scheduler.alpha.kubernetes.io/critical-pod":""},"labels":{"name":"aci-containers-host","network-plugin":"aci-containers"}},"spec":{"containers":[{"env":[{"name":"KUBERNETES_NODE_NAME","valueFrom":{"fieldRef":{"fieldPath":"spec.nodeName"}}}],"image":"noiro/aci-containers-host:1.6r15","imagePullPolicy":"Always","livenessProbe":{"httpGet":{"path":"/status","port":8090}},"name":"aci-containers-host","securityContext":{"capabilities":{"add":["SYS_ADMIN","NET_ADMIN"]},"privileged":true},"volumeMounts":[{"mountPath":"/mnt/cni-bin","name":"cni-bin"},{"mountPath":"/mnt/cni-conf","name":"cn |
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
# | |
# ansible inventory for OpenShift Container Platform 3.11.16 | |
# AgnosticD ansible-config: ocp-ha-lab | |
[OSEv3:vars] | |
########################################################################### | |
### Ansible Vars | |
########################################################################### | |
timeout=60 |
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
--- | |
- hosts: clients | |
tasks: | |
- name: Install additional packages needed | |
yum: | |
name: "{{ item }}" | |
state: latest | |
with_items: | |
- wget | |
- git |
OlderNewer