carlosalexei / aks-workshop Goto Github PK
View Code? Open in Web Editor NEWIntroduction to Docker, Containers and Kubernetes with Azure Kubernetes Service
Introduction to Docker, Containers and Kubernetes with Azure Kubernetes Service
Before successfully being able to perform task 7 it is necessary to change the "image:" parameter in the .yaml file to the own registry, otherwise the deployment fails.
Hi Carlos, can you please share the links to the videos of Day1, 2 and 3 please?
When installing in the Kubernetes cluster I created for this lab, I get:
% kubectl apply --validate=false -f https://raw.githubusercontent.com/jetstack/cert-manager/release-0.14/deploy/manifests/00-crds.yaml
resource mapping not found for name: "certificaterequests.cert-manager.io" namespace: "" from "https://raw.githubusercontent.com/jetstack/cert-manager/release-0.14/deploy/manifests/00-crds.yaml": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1"
ensure CRDs are installed first
This is in a Kubernetes 1.22 cluster.
This issue can also be seen at https://docs.microsoft.com/en-us/answers/questions/898689/getting-error-while-installing-cert-manager.html, and the cause given is that cert-manager was using extention APIs that have since been deprecated and removed.
According to https://cert-manager.io/docs/installation/supported-releases/, cert-manager release 0.18 should be used for new installations, supporting Kubernetes version 1.19 through 1.24
As such, the CRDs should be installed using the following command:
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.8.2/cert-manager.crds.yaml
And installing cert-manager should be
helm install \
cert-manager jetstack/cert-manager \
--namespace cert-manager \
--create-namespace \
--version v1.8.2
The YAML that creates the ClusterIssuer will need updated in accordance with
https://cert-manager.io/docs/reference/api-docs/#cert-manager.io/v1.ClusterIssuer
The significant change is just to the apiVersion
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: letsencrypt
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: "[email protected]"
privateKeySecretRef:
name: letsencrypt
solvers:
- http01:
ingress:
class: nginx
No other changes appear to be required.
Cheers,
Cameron
This step Task 6 - Deploy a ClusterIssuer resource is failing. Here is proof that the CRDs were installed earlier.
$ kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.8.2/cert-manager.crds.yaml
customresourcedefinition.apiextensions.k8s.io/certificaterequests.cert-manager.io unchanged
customresourcedefinition.apiextensions.k8s.io/certificates.cert-manager.io unchanged
customresourcedefinition.apiextensions.k8s.io/challenges.acme.cert-manager.io unchanged
customresourcedefinition.apiextensions.k8s.io/clusterissuers.cert-manager.io unchanged
customresourcedefinition.apiextensions.k8s.io/issuers.cert-manager.io unchanged
customresourcedefinition.apiextensions.k8s.io/orders.acme.cert-manager.io unchanged
Despite that:
$ kubectl apply --namespace ratingsapp -f cluster-issuer.yaml
error: resource mapping not found for name: "letsencrypt" namespace: "" from "cluster-issuer.yaml": no matches for kind "ClusterIssuer" in version "apiextensions.k8s.io/v1"
ensure CRDs are installed first
Bash on Linux VM (not using cloud shell).
Building the container image works okay, but when running:
ckerr@Camerons-Air HelloWorld % docker run -it -p 8080:80 helloworld:latest
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly '/HelloWorld.dll'. The system cannot find the file specified.
File name: '/HelloWorld.dll'
^C
Here's a working version of the Dockerfile. I think the two significant changes are:
# Define base image that includes dev tools
FROM mcr.microsoft.com/dotnet/sdk:6.0 as DevEnv
# Create a folder
WORKDIR /source
# Copy the project file
COPY *.csproj ./
# Restore dotnet libraries for the project
RUN dotnet restore
# Copy all application files
COPY . ./
# Compile project and create production binaries
RUN dotnet publish -c Release -o /app
# Download another images with aspnet runtime
FROM mcr.microsoft.com/dotnet/aspnet:6.0
WORKDIR /app
# Copy from the first image (DevEnv) binaries
COPY --from=DevEnv /app ./
# Define the process to be executed in the container
ENTRYPOINT [ "dotnet", "HelloWorld.dll" ]
Compare with https://docs.microsoft.com/en-nz/aspnet/core/host-and-deploy/docker/building-net-docker-images?view=aspnetcore-6.0
ckerr@Camerons-Air HelloWorld % docker version
Client:
Version: 20.10.16
Server: Docker Desktop 4.9.1 (81317)
Version: 20.10.16
ckerr@Camerons-Air HelloWorld % git log
commit 6e49b5600e1f2e54e12bb99fddc721f21669d4be (HEAD -> main, origin/main, origin/HEAD)
Author: Carlos A. Marquez <[email protected]>
Date: Tue May 24 20:38:55 2022 -0700
Update HelloWorld.csproj
Update .NET version require by the project
Hi,
While trying to set up the certificate manager, the certificate is not getting generated and failing with an error message, Failed to wait for order resource "ratings-web-cert-xxxxxxxxxxx" to become ready: order is in "invalid" state. After trying the Describe command on the order till Challenges, the Challenges has got an error message, Accepting challenge authorization failed: acme: authorization error for frontend.xx-xxx-xxx-xxx.nip.io: 400 urn:ietf:params:acme:error:connection: xx-xxx-xxx-xxx: Fetching http://frontend.xx-xxx-xxx-xxx.nip.io/.well-known/acme-challenge/1NDm2l_DY4s0KaC25XVyYvU3rP2_Xm5XtSow95ZF9Uo: Timeout during connect (likely firewall problem).
Note : The firewall has been disabled and still the problem persists.
Thanks,
Shanthi
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.