Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apiVersion: extensions/v1beta1 deprecated in 1.16 #6

Open
nishantrama opened this issue Apr 10, 2020 · 1 comment
Open

apiVersion: extensions/v1beta1 deprecated in 1.16 #6

nishantrama opened this issue Apr 10, 2020 · 1 comment

Comments

@nishantrama
Copy link

nishantrama commented Apr 10, 2020

Hey All,

I tried deploying sockshops on my k8s cluster and ran into the following error message:
unable to recognize "k8s-deploy-production-master\carts.yml": no matches for kind "Deployment" in version "extensions/v1beta1"

I believe its due to apiVersion: extensions/v1beta1 being deprecated in 1.16 of kubernetes.

https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/

EDIT:
as a workaround: adding the below after the replicas lets the yaml files to be built.
selector:
matchLabels:
app: queue-master
version: v1

FInal output for one yaml:

apiVersion: apps/v1
kind: Deployment
metadata:
name: queue-master-v1
namespace: production
spec:
replicas: 1
selector:
matchLabels:
app: queue-master
version: v1
template:
metadata:
labels:
app: queue-master
version: v1
spec:
containers:
- name: queue-master
image: to-be-replaced-by-jenkins
env:
- name: JAVA_OPTS
value: -Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=128m -XX:+UseG1GC -Djava.security.egd=file:/dev/urandom
- name: DT_TAGS
value: "product=sockshop"
- name: DT_CUSTOM_PROP
value: "SERVICE_TYPE=BACKEND"
resources:
limits:
cpu: 500m
memory: 1024Mi
requests:
cpu: 400m
memory: 1024Mi
ports:
- containerPort: 8080
volumeMounts:
- mountPath: /tmp
name: tmp-volume
livenessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 120
periodSeconds: 10
timeoutSeconds: 15
readinessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 120
periodSeconds: 10
timeoutSeconds: 15
volumes:
- name: tmp-volume
emptyDir:
medium: Memory
nodeSelector:
beta.kubernetes.io/os: linux

apiVersion: v1
kind: Service
metadata:
name: queue-master
labels:
app: queue-master
namespace: production
spec:
ports:

  • name: http
    port: 80
    targetPort: 8080
    selector:
    app: queue-master

hope this helps.

@jetzlstorfer
Copy link
Contributor

Hi,
seems that you have resolved the issue yourself if I understand correctly.
Would be great if you can open a PR with your changes (updating the apiVersion) so we can merge it into the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants