<p>I'm struggling with Kubernetes configuration in GitLab.</p>
<p>I'm working on project that someone configured like year ago, project has backend and frontend part and I wanted to update password in application configuration. Unfortunately after deploying using GitLab configuration that previous developer left it seems like new version of code was not deployed and application is still using old password. Tried to make some additional changes in code like adding new table through liquibase and this problem still occurred, no table was created after deploying.</p>
<p>I've decided to delete all objects in dev namespace and redeploy application, it worked for backend part, pod, service, deployment.apps for backend were created but while I'm trying to deploy frontend part I'm getting following error</p>
<pre><code>secret/regcred-dashboard unchanged
service/IE599-dashboard created
ingress.extensions/IE599-dashboard configured
Error from server ([denied by k8sresourcesrequestandatory] container &lt;IE599-dashboard&gt; has no resource requests for deployment &lt;IE599-dashboard&gt;): error when creating &quot;STDIN&quot;: admission webhook &quot;validation.gatekeeper.sh&quot; denied the request: [denied by k8sresourcesrequestandatory] container &lt;IE599-dashboard&gt; has no resource requests for deployment &lt;IE599-dashboard&gt;
</code></pre>
<p>Unfortunately I don't have any experience with Kubernetes and I don't know what's wrong now.</p>
<p>Using following GitLab configuration</p>
<pre><code>deploy to dev:
  extends:
    - .deployment
    - .dev
  stage: dev
  before_script:
    - export CI_ENV=dev
  when: manual
</code></pre>
<pre><code>.deployment:
  dependencies:
    - containerize
  extends:
    - .k8s
  script:
    - envsubst &lt; ./kubernetes/${CI_ENV}/deployment.yaml | kubectl apply -n IE599-${CI_ENV} -f -
</code></pre>
<pre><code>apiVersion: v1
kind: Secret
metadata:
  name: regcred-dashboard
  namespace: IE599-dev
data:
  .dockerconfigjson: 
type: kubernetes.io/dockerconfigjson
---
apiVersion: v1
kind: Service
metadata:
  name: IE599-dashboard
  namespace: IE599-dev
spec:
  ports:
    - port: 8080
  selector:
    app: IE599-dashboard
  type: ClusterIP
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: IE599-dashboard
  namespace: IE599-dev
  labels:
    app: IE599-dashboard
    service: IE599-dashboard
spec:
  rules:
    - host: IE599-dev.app.com
      http:
        paths:
          - backend:
              serviceName: IE599-dashboard
              servicePort: 8080
            path: /
  tls:
    - hosts:
        - IE599-dev.app.com
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: IE599-dashboard
  namespace: IE599-dev
  labels:
    app: IE599-dashboard
spec:
  replicas: 1
  selector:
    matchLabels:
      app: IE599-dashboard
  template:
    metadata:
      labels:
        app: IE599-dashboard
    spec:
      containers:
        - env:
            - name: API_URL
              value: https://IE599-api-dev.app.com/api
          name: IE599-dashboard
          image: registry.app.com/IE599/IE599-dashboard:$CI_COMMIT_SHORT_SHA
          imagePullPolicy: Always
          resources:
            limits:
              cpu: '100m'
              memory: 256Mi
          securityContext:
            runAsNonRoot: true
            runAsUser: 1000
      imagePullSecrets:
        - name: regcred-dashboard
</code></pre>
<p>Not sure why it's not working, I'll appreciate any help here.</p>

Mistic1987PL
<p>In your deployment you have</p>
<pre><code>          resources:
            limits:
              cpu: '100m'
              memory: 256Mi
</code></pre>
<p>Update that to:</p>
<pre><code>          resources:
            limits:
              cpu: '100m'
              memory: 256Mi
            requests:
              cpu: '50m'
              memory: 200Mi
</code></pre>
<p>The error you're getting (<code>has no resource requests for deployment &lt;IE599-dashboard&gt;</code>) is k8's telling you that that you dont have resource requests in your deployment.</p>
