oc scale --replicas=0 $(oc get dc -o name | xargs) -n
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' |
What do the resource requests and limits mean in OpenShift and how might they effect your Java application?
To the extent it is implementation specific the discussion below is based on the OpenJDK HotSpot runtime.
The JVM maps threads in Java to OS threads 1:1 , i.e., there are no "green threads" in Java like there are in some other virtual machines, for example BEAM, the Erlang virtual machine.
A thread in the JVM can be in one of the following states:
thread_new
: a new thread in the process of being initialized
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
[Unit] | |
Description=SonarQube service | |
After=syslog.target network.target | |
[Service] | |
Type=forking | |
ExecStart=/opt/sonarqube/bin/linux-x86-64/sonar.sh start | |
ExecStop=/opt/sonarqube/bin/linux-x86-64/sonar.sh stop |
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
/********** Step 1 ********************** | |
*********** File Imports ***************/ | |
import com.amazonaws.services.transcribe.AmazonTranscribe; | |
import com.amazonaws.services.transcribe.AmazonTranscribeClientBuilder; | |
import com.amazonaws.services.transcribe.model.DeleteTranscriptionJobRequest; | |
import com.amazonaws.services.transcribe.model.GetTranscriptionJobRequest; | |
import com.amazonaws.services.transcribe.model.GetTranscriptionJobResult; | |
import com.amazonaws.services.transcribe.model.LanguageCode; | |
import com.amazonaws.services.transcribe.model.Media; | |
import com.amazonaws.services.transcribe.model.StartTranscriptionJobRequest; |
The most gracefull way is to trigger a restart for the deployment. In this case, a pod will only be terminated once the new pod is ready. It will slowly replace all pods one after the other.
kubectl rollout restart deployment <deployment-name>
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: PersistentVolumeClaim | |
metadata: | |
name: microcks-pvc | |
labels: | |
app: microcks | |
spec: | |
resources: | |
requests: |
OlderNewer